Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

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:
    220
    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:
    331
    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:
    220
    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:
    331
    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:
    220
    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:
    220
    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:
    220
    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:
    331
    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:
    5
    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:
    331
    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:
    331
    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:
    8
    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:
    5
    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
  27. rocknit

    rocknit

    Joined:
    Jul 30, 2019
    Posts:
    1
    Same problem here. It is Aug 2019 and you cannot even test your own installer to work after one year?
     
  28. abdjaouni

    abdjaouni

    Joined:
    Oct 8, 2017
    Posts:
    1
    September 1 2019 ....
     
  29. avi_unity835

    avi_unity835

    Joined:
    Mar 5, 2019
    Posts:
    7
    On Windows I resolved it by doing the following:
    Run the unity hub with elevated privileges (click windows button, type unity hub, right click on the icon, hit run as administrator)
     
  30. LordBelasco

    LordBelasco

    Joined:
    May 1, 2017
    Posts:
    28
    On Windows, launching as administrator doesn't solve the problem for me
    I get the problem after the install of last Hub release, before it was ok

    So, I have uninstalled the Unity Hub, and manually removed all the remaining files in Programmes, User\AppData\Local, User\AppData\LocalLow and User\AppData\Roaming
    After that, it's ok

    For Mac, try to find all the files and delete it
     
    Last edited: Sep 20, 2019
  31. anomas

    anomas

    Joined:
    Jul 3, 2016
    Posts:
    33
    Having the same problem on windows, and it started after the 2.1.2 update. Tried everything people said in this thread and it did not work. Well what can i say, this is unity being unity.
     
  32. samTheMacPakRat

    samTheMacPakRat

    Joined:
    Mar 14, 2018
    Posts:
    1
    October 2019.... bump!

    This is not a terribly complicated implementation, why such a wait?
    Download packages -> test folder permissions -> prompt user and request admin privileges -> fixed.

    (Changing permissions or pre-creating the directory is not a big deal, but it really seems that this should have been fixed after a year and a half...)
     
  33. PPNSteve

    PPNSteve

    Joined:
    Nov 17, 2018
    Posts:
    4
    Oct 2019 still same thing on a mac with NO ACCESS to root or an ADMIN user account .. FIX THIS!
     
  34. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    359
    Still happening @afshinunity. Seems the same issue as others describe here; installing a version from Hub silently fails. The folder where it tried to write to seems to be read-only for some reason (despite being on an administrator account).

    Even worse, the versions I tried to install now all show in the "Add Version" list multiple times (?!):
    (I tried installing 2019.1.3f1 - it kept failing - now there's 4 copies of it in the "Add Unity Version" list)
    Screenshot 2019-10-20 at 21.22.14.png

    Reported as (Case 1192844)
     
  35. peterparnes

    peterparnes

    Joined:
    Jul 5, 2016
    Posts:
    1
  36. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    359
    @LeonhardP not sure if this falls in your area but the Unity person originally writing here hasn't replied for a year and it seems to be a pretty common issue judging from this thread.
     
  37. corkransp

    corkransp

    Joined:
    Oct 25, 2019
    Posts:
    1
    Found this thread after Googling around. I just wasted two days trying to install on a bunch of macs unsuccessfully. Peter's link worked a treat for me, for anyone else who finds their way here looking for 2019.2.9f.

    And, for real, how is this actually a thing that happens in 2019? Installing Unity was very nearly a drag and drop operation for years, iirc. Has science gone too far?
     
    Resin likes this.
  38. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    359
    I reported a bug (seems no-one did in the last 2 years?) and it's been verified as bug:
    (Case 1192844) Unity Editor install via Hub fails silently when installing it on Mac account without admin privileges
     
    LeonhardP likes this.
  39. sheng2008

    sheng2008

    Joined:
    Aug 18, 2016
    Posts:
    2
    I use unity hub 2.1.3.install unity to mac。unity hub can download finished。but cannot install unity。and has not error log。as though download finished is over。no next step。I am use Admin account。this is some log:

    {"moduleName":"UnityLicenseCore","level":"info","message":"[ 'Writing file: /Library/Application Support/Unity/Unity_lic.ulf' ]","timestamp":"2019-11-05T09:50:16.153Z"}
    {"moduleName":"RestEvent:License","level":"info","message":"[ 'onLicenseChange',\n 'data:',\n { kind: 'Unity Personal' },\n 'connections: ',\n Map {} ]","timestamp":"2019-11-05T09:50:16.154Z"}
    {"moduleName":"ApplicationRouteHelper","level":"info","message":"[ 'hadOnboarding is false' ]","timestamp":"2019-11-05T09:55:44.888Z"}
    {"moduleName":"EditorDownloader","level":"info","message":"[ 'Editor Downloader 2019.2.11f1: starting' ]","timestamp":"2019-11-05T09:55:53.279Z"}
    {"moduleName":"DownloadsCluster","level":"info","message":"[ 'Cluster total download size: 1.34GB' ]","timestamp":"2019-11-05T09:55:53.817Z"}
    {"moduleName":"DownloadsCluster","level":"info","message":"[ 'Cluster cluster-2019.2.11f1: downloads starting' ]","timestamp":"2019-11-05T09:55:53.818Z"}
    {"moduleName":"DownloadRequest","level":"info","message":"[ 'Starting the download of https://download.unitychina.cn/down...ySetup-iOS-Support-for-Editor-2019.2.11f1.pkg to /var/folders/3c/b5cmmg_10b756srp5xcyq2q00000gp/T/unityhub-74591ed0-ffb2-11e9-ae63-6fe3ccfc4813/UnitySetup-iOS-Support-for-Editor-2019.2.11f1.pkg' ]","timestamp":"2019-11-05T09:55:53.818Z"}
    {"moduleName":"DownloadRequest","level":"info","message":"[ 'Starting the download of https://download.unitychina.cn/download_unity/5f859a4cfee5/MacEditorInstaller/Unity-2019.2.11f1.pkg to /var/folders/3c/b5cmmg_10b756srp5xcyq2q00000gp/T/unityhub-74591ed0-ffb2-11e9-ae63-6fe3ccfc4813/Unity-2019.2.11f1.pkg' ]","timestamp":"2019-11-05T09:55:54.365Z"}
    {"moduleName":"EditorDownloader","level":"info","message":"[ 'Editor Download 2019.2.11f1: downloads starting, total size: 2.70GB)' ]","timestamp":"2019-11-05T09:55:54.366Z"}
    {"moduleName":"EditorDownloader","level":"info","message":"[ 'Editor Downloader 2019.2.11f1: end event for editor' ]","timestamp":"2019-11-05T09:59:05.311Z"}
    {"moduleName":"DownloadManager","level":"info","message":"[ 'download ended with status: 3 /var/folders/3c/b5cmmg_10b756srp5xcyq2q00000gp/T/unityhub-74591ed0-ffb2-11e9-ae63-6fe3ccfc4813/Unity-2019.2.11f1.pkg' ]","timestamp":"2019-11-05T09:59:05.311Z"}
    {"moduleName":"DownloadsCluster","level":"info","message":"[ 'Cluster cluster-2019.2.11f1: Finished' ]","timestamp":"2019-11-05T10:00:01.889Z"}
    {"moduleName":"EditorDownloader","level":"info","message":"[ 'Editor Downloader 2019.2.11f1: end event for cluster' ]","timestamp":"2019-11-05T10:00:01.889Z"}
    {"moduleName":"EditorDownloader","level":"info","message":"[ 'Editor Download 2019.2.11f1: Finished' ]","timestamp":"2019-11-05T10:00:01.890Z"}
    {"moduleName":"DownloadManager","level":"info","message":"[ 'download ended with status: 3 /var/folders/3c/b5cmmg_10b756srp5xcyq2q00000gp/T/unityhub-74591ed0-ffb2-11e9-ae63-6fe3ccfc4813/UnitySetup-iOS-Support-for-Editor-2019.2.11f1.pkg' ]","timestamp":"2019-11-05T10:00:01.891Z"}
    {"moduleName":"BaseWindow","level":"warn","message":"[ 'Failed to load page https://connect.unity.com/hub. Error: -3 - ' ]","timestamp":"2019-11-05T10:05:45.974Z"}
    {"moduleName":"ApplicationRouteHelper","level":"info","message":"[ 'hadOnboarding is false' ]","timestamp":"2019-11-05T10:23:10.680Z"}
     

    Attached Files:

  40. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    1,654
    Thanks for the report! Issue tracker link: https://issuetracker.unity3d.com/product/unity/issues/guid/1192844/
     
  41. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    359
    @LeonhardP the title of that issue is wrong - the installation of Unity Editor versions fails, even with admin rights, if another admin account has installed the Hub.

    Also note that another sideeffect (as outlined in my report) is that the version you tried to install is now listed in the versions available for download (multiple times if you try it multiple times).
     
    Last edited: Nov 5, 2019
    LeonhardP likes this.
  42. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    1,654
    There's a note about this aspect in the description. I've reached out to QA to see whether they reproduced point 2 as well.
     
    fherbst likes this.
  43. Resin

    Resin

    Joined:
    May 3, 2017
    Posts:
    13
    This explains how I've wasted hours on end. I'm trying to set up a class of ~15 young students on macs without admin rights. Just to walk them through some basic tutorials. Is there a work around for this? If possible I would like to download once and use airdrop. I couldn't get that link from peter to work, I'm assuming because it is too old? I'm not sure I understood how to obtain it for myself.
     
  44. pawcza

    pawcza

    Joined:
    Apr 16, 2019
    Posts:
    1
    @Resin you can navigate to the log by using
    Code (CSharp):
    1. cd ~/Library/Application\ Support/UnityHub/logs/
    open the log file with nano
    Code (CSharp):
    1. nano info-log.json
    scroll to the bottom and you should find a line similar to this
    Code (CSharp):
    1. {"moduleName":"DownloadRequest","level":"info","message":"[ 'Starting the download of https://beta.unity3d.com/download/40e46701fee5/MacEditorInstaller/Unity-2020.1.0a12.pkg ...
    The error I'm getting that results in a silent installer fail is:
    Code (CSharp):
    1. {"moduleName":"UnityInstallerMac","level":"warn","message":"[ ' Error while installing the Editor',\n  { error: \n     { code: 'MISSING_DESTINATION',\n       message: 'The install destination was invalid or missing.' } } ]","timestamp":"2019-11-14T10:52:32.024Z"}
    Okay, I suspect this might be related to the fact that Unity doesn't support MacOS Catalina
     
    Last edited: Nov 14, 2019 at 1:39 PM