Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-2163

[macOS] Move the application to $HOME/Applications on auto-update

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1.0
    • Fix Version/s: 5.1.1
    • Component/s: Application update
    • Release Notes Summary:
      macOS Auto-Update Change
    • Release Notes Description:
      Hide

      By default the app is installed in the /Applications folder. It implies several issues because that folder is protected and one needs to enter a password to apply changes. We found it blocked several users when the app is auto-updating itself.

      A better location for apps is the $HOME/Application folder. It is not password-protected and allowes to separate apps for all users from ones from the current user.

      Starting with Nuxeo Drive 5.1.1 the auto-updater will automatically move the app from /Applications to $HOME/Applications. It should be transparent for the user.

      Show
      By default the app is installed in the /Applications folder. It implies several issues because that folder is protected and one needs to enter a password to apply changes. We found it blocked several users when the app is auto-updating itself. A better location for apps is the $HOME/Application folder. It is not password-protected and allowes to separate apps for all users from ones from the current user. Starting with Nuxeo Drive 5.1.1 the auto-updater will automatically move the app from /Applications to $HOME/Applications . It should be transparent for the user.
    • Epic Link:
    • Story Points:
      2

      Description

      Issue

      Sentry Issue: NUXEO-DRIVE-28X

      PermissionError: [Errno 13] Permission denied: '/Applications/Nuxeo Drive.app.old'
        File "nxdrive/engine/workers.py", line 181, in run
        File "nxdrive/engine/workers.py", line 269, in _execute
        File "nxdrive/updater/base.py", line 363, in _poll
        File "nxdrive/updater/base.py", line 307, in _handle_status
        File "nxdrive/updater/base.py", line 120, in update
        File "nxdrive/updater/base.py", line 335, in _install
        File "nxdrive/updater/darwin.py", line 54, in install
        File "nxdrive/updater/darwin.py", line 96, in _backup
        File "shutil.py", line 577, in move
        File "shutil.py", line 324, in copytree
        File "os.py", line 221, in makedirs
      
      PermissionError: [Errno 13] Permission denied: '/Applications/Nuxeo Drive.app' -> '/Applications/Nuxeo Drive.app.old'
        File "shutil.py", line 566, in move
      

      Analysis

      Before doing the upgrade, a copy of the application is done in order to be able to revert any changes on case the upgrade failed.

      The default path for the application is /Applications. But sometimes the user does not have enough rights or denied the copy to that folder.

      Fix

      Another possible location of the application is $HOME/Applications (NXDRIVE-1892). This is the only alternative on that OS and we already support it.

      TODO:

      • Always make the copy to the folder $HOME/Applications.
      • And always copy the new version into $HOME/Applications.
      • And ensure the new version is started from $HOME/Applications.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.