Search Unity

  1. We want you to join us at GDC this year! Take a peek at all of the events we will be hosting during the week of GDC.
    Dismiss Notice
  2. Tell us about your experience here and you’ll get early access to the 2018 Game Studios report + more goodies.
    Dismiss Notice
  3. Unity 2017.3 has arrived! Read about it here.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  5. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice

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

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

  1. pbhogan

    pbhogan

    Joined:
    Aug 17, 2012
    Posts:
    154
    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:
    37
    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:
    154
    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:
    37
    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:
    154
    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:
    154
    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:
    154
    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:
    37
    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.