Search Unity

Unity Hub cannot install Unity when it needs to elevate privileges on Mac

Discussion in 'Unity Hub' started by pbhogan, Jan 24, 2018.

  1. pbhogan

    pbhogan

    Joined:
    Aug 17, 2012
    Posts:
    209
    It downloads Unity fine, but then gets stuck on "installing" forever. The only unusual situation on this Mac is that writing to the Applications folder requires elevated privileges. No dialog ever shows up asking for admin password.
     
  2. afshinity

    afshinity

    Unity Technologies

    Joined:
    Jul 31, 2017
    Posts:
    320
    Hi there,
    Thank you for using hub :)
    Regarding the first question that installing takes forever, we enabled a better logging system in the new version of the hub. You should receive the update in the next 24hrs. This will help us to investigate why the installation didn't finish.

    Regarding the privileges in Mac, since we are installing in `/Applications/Unity/`, most of the times it doesn't ask for your permission (normally once for creating this folder if does not exist)
     
    Last edited: Feb 7, 2018
  3. pbhogan

    pbhogan

    Joined:
    Aug 17, 2012
    Posts:
    209
    I'm still having the issue with 0.12.0. Where can I find the log?

    To be clear, Unity Hub is not asking for permission even once.
     
  4. afshinity

    afshinity

    Unity Technologies

    Joined:
    Jul 31, 2017
    Posts:
    320
    Regarding the logs, on Mac you can find it here: ~/Library/Application\ Support/UnityHub/logs

    Regarding the permission, since you had Unity folder in the /Applications (due to the previous installation of editor I believe), MacOs does not require admin permissions.

    Every time, we are trying to install without UAC, and if we failed due to access issue, we redo it with user permission.
     
  5. pbhogan

    pbhogan

    Joined:
    Aug 17, 2012
    Posts:
    209
    Here are the relevant lines from the log:
    {"moduleName":"Download","level":"info","message":"Editor download ended successfully. Download id: 2017.3.1f1","timestamp":"2018-02-08T19:18:19.567Z"}
    {"moduleName":"Installer","level":"info","message":"Install 2017.3.1f1: /var/folders/m7/nbnys2253fq8zw92qk2vh43rhynfqv/T/unityhub-6b883901-0d04-11e8-b48e-53730d6418d9/Unity-2017.3.1f1.pkg to /Applications/Unity/Hub/Editor/2017.3.1f1 started","timestamp":"2018-02-08T19:18:19.570Z"}
    {"moduleName":"UnityInstallerMac","level":"warn","message":"{ Error: EACCES: permission denied, mkdir '/Applications/Unity/Hub'\n errno: -13,\n code: 'EACCES',\n syscall: 'mkdir',\n path: '/Applications/Unity/Hub' }","timestamp":"2018-02-08T19:18:19.584Z"}

    So the download succeeds but it then fails to create the folder required during install. Usually the standalone Unity installers ask for elevated permissions while installing, but this fails silently.

    The Unity folder is owned by root/admin, so requires elevated permissions:
    drwxrwxr-x 5 root admin 170 Jan 18 15:32 Unity
     
  6. pbhogan

    pbhogan

    Joined:
    Aug 17, 2012
    Posts:
    209
    To be clear, this situation happens in certain office environments where the current user does not have admin rights on the machine, and writing to the Applications folder requires this, so it must elevate permissions requiring an admin to enter their credentials. The Unity folder above was created by a standard Unity installer after elevating permissions.
     
  7. pbhogan

    pbhogan

    Joined:
    Aug 17, 2012
    Posts:
    209
    An additional point: even if the Unity folder doesn't exist, it still fails with the same error because the Applications folder requires admin access to write to.
     
  8. afshinity

    afshinity

    Unity Technologies

    Joined:
    Jul 31, 2017
    Posts:
    320
    Thank you for the log. As you discovered, the folder needs admin rights, and the hub is failing to create that. We will add a better UX to tell the user about the problem.

    Workaround to that problem would be creating that folder and let hub install.

    Solution to that problem would be a secondary location outside of Applications folder. We are working on this feature. Stay tuned for the updates.
     
  9. richard_daimler

    richard_daimler

    Joined:
    Nov 6, 2017
    Posts:
    3
    This problem still exists.
     
    juan-jo, okankose and pahe like this.
  10. okankose

    okankose

    Joined:
    Jul 7, 2017
    Posts:
    1
    bump, bump aaand bump!
     
  11. afshinity

    afshinity

    Unity Technologies

    Joined:
    Jul 31, 2017
    Posts:
    320
    Sorry for the inconvenience.
    Would you please report a bug through hub bug reporter (accessible through my account or the tray menu), then we can take a look into the logs.

    It would be great if you can explain the issue in the bug report and maybe a link to this thread.

    Thanks a lot
     
  12. pfleetwood22

    pfleetwood22

    Joined:
    Jun 6, 2016
    Posts:
    28
    I have also been unable to install the editor through the hub for months. I am on Mac OS. My installation directory is "/Applications/Unity Versions" and the error I get is: "Editor Installation Failed: The install destination was missing or invalid".

    I tried moving the folder to my home directory, and that did not help. I then tried giving my personal user Read & Write permissions on the folder (the original permissions only allowed system and wheel to have R&W permissions). That worked. I then tried moving the folder back to Applications (keeping the modified permissions) and that also worked. Now, it prompts me to type in my password during install and doesn't fail.
     
    Last edited: Nov 27, 2018
  13. afshinity

    afshinity

    Unity Technologies

    Joined:
    Jul 31, 2017
    Posts:
    320
    Hi @pfleetwood22 ,

    Sorry for the inconvenience.
    Would you please report a bug through the Hub bug reporter (accessible from the tray menu or "my account" dropdown menu). That way we can take a closer look into the logs and realize the issue.

    Thanks,
    Afshin
     
  14. RunCat

    RunCat

    Joined:
    Apr 19, 2019
    Posts:
    1
    I generally do all of my work from in a non-Admin account. Continuously failed to open the installer. Problem was solved by doing the download from an Admin account.
     
  15. unity_4lAYq8DmmC2Kjg

    unity_4lAYq8DmmC2Kjg

    Joined:
    Apr 20, 2019
    Posts:
    2
    You
    A big problemthat everyone faces that everyone download the hub that are not latest . I request to download the latest version of unity hub
     
  16. AlyxJones

    AlyxJones

    Joined:
    Dec 2, 2014
    Posts:
    1
    This is STILL a problem :(
     
  17. benbergman

    benbergman

    Joined:
    Jan 15, 2018
    Posts:
    1
    I had the same problem today too. I managed to get around it my creating `/Applications/Unity/` in Finder with an admin account, then the installer was able to prompt me for admin creds to do the actual installation.

    I wasn't able to get Visual Studio installed though. I've got this in the log:

    {"moduleName":"UnityInstallerMac","level":"warn","message":"[ 'Error while copying the dmg file /Volumes/Visual Studio 1/Visual Studio.app to /Applications',\n { Error: stderr maxBuffer exceeded\n at Socket.onChildStderr (child_process.js:354:14)\n at emitOne (events.js:115:13)\n at Socket.emit (events.js:210:7)\n at addChunk (_stream_readable.js:252:12)\n at readableAddChunk (_stream_readable.js:235:13)\n at Socket.Readable.push (_stream_readable.js:197:10)\n at Pipe.onread (net.js:589:20)\n cmd: 'cp -a \"/Volumes/Visual Studio 1/Visual Studio.app\" \"/Applications\"' } ]","timestamp":"2019-04-26T19:10:01.553Z"}
     
  18. play_unity729

    play_unity729

    Joined:
    Apr 18, 2018
    Posts:
    51
    Looks like use Unity Hub it's worst than just download the Unity Download Assistance, Don't install my apps on my Applications folder because I have a really Small SSD to run everything, so I install all this on a secondary HDD, Unity Hub, Download the files, but when it's trying to install just disappear, with all the downloaded files, doesn't show errors, doesn't say anything, just stay as if I cancel the download/installation, it's annoying because I don't see any error, and take a lot of time for me download the installation files, so what I do it's just download the UDA, and Locate the Install on Unity Hub
     
  19. htglvl

    htglvl

    Joined:
    May 23, 2019
    Posts:
    1
    I got that same thing
     
  20. micah25

    micah25

    Joined:
    May 27, 2019
    Posts:
    1
    For those still trying to figure out how to install unity on their mac, I was able to download the 2019.1.4 version by following this link: https://unity3d.com/get-unity/download/archive
    It's technical an "older" version of unity, but seeing as the newer versions are still in beta, I think this is personally ok. On this page, you are able to directly download unity, instead of having to go through the UNITY HUB. Go ahead and download it to whatever drive works for you, and HUB should automatically recognize unity and become accessible through the HUB.
    I hope this help, cheers!
    Micah
     
    hogdotmac and catharz like this.
  21. djzielin

    djzielin

    Joined:
    Sep 6, 2013
    Posts:
    7
    I also had similar issues (never completing) install of 2019.1 via Unity Hub on mac. The standalone installer however did work.
     
    mrchnk and binarykitten like this.
  22. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,039
    Unbelievably, this is still an issue. Unity Hub downloads, but doesn't install anything. Can we please have the old installer back? At least it worked.
     
    Coeur_EF and hogdotmac like this.
  23. Mr-Midnight

    Mr-Midnight

    Joined:
    Nov 29, 2017
    Posts:
    2
    Having the same issue, myself and a colleague can't install it via unity hub. Trying the standalone installer now.
     
    hogdotmac likes this.
  24. rocket6488

    rocket6488

    Joined:
    Aug 6, 2019
    Posts:
    1
    Standalone installer works perfectly fine, what I don't see is how it's been an issue for more than a YEAR and no progress has been made on this issue for anyone, Apple makes their development environments easy to access and even supplies extra tools to registered developers.
     
  25. hedgehog10101

    hedgehog10101

    Joined:
    Dec 3, 2017
    Posts:
    2
    Try renaming your destination folder "Unity".
     
  26. subramh

    subramh

    Joined:
    Jan 22, 2016
    Posts:
    1
    For those struggling with Unity Hub not installing the latest version of Unity on MacOS...

    Using a terminal window:
    • Create the `Applications/Unity` folder using sudo or Admin privileges.
    • Change permissions using `chmod` (775) to the above folder to your user account.
    • Now the install should work without any hitches.
    For added measure, in a terminal window monitor the UnityHub log file using `tail -f` command. This log file is by default located at `/Library/Application Support/UnityHub/logs/info-log.json`

    I hope this helps someone who may still be having issues installing the latest version of Unity using UnityHub.
     
    Last edited: Aug 15, 2019