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

Fix endless synchronization on permission error when setting the remote ID on a file

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 4.4.0
    • Fix Version/s: 5.1.0
    • Component/s: Local client

      Description

      Problem

      I put a critical severity as the one error filled our Sentry quota in only one hour.

      Sentry Issue: NUXEO-DRIVE-2MQ

      PermissionError: [Errno 13] Permission denied: '\\\\?\\C:\\Users\\USER\\OneDrive - Company\\Documents\\Nuxeo Drive\\folder\\file.docx:ndrive'
        File "nxdrive\client\local\windows.py", line 160, in set_path_remote_id
      
      PermissionError: [Errno 13] Permission denied: \\\\?\\C:\\Users\\USER\\OneDrive - Company\\Documents\\Nuxeo Drive\\folder\\file.docx:ndrive'
        File "nxdrive\engine\watcher\local_watcher.py", line 1082, in handle_watchdog_event
        File "nxdrive\engine\watcher\local_watcher.py", line 835, in _handle_watchdog_event_on_known_pair
        File "nxdrive\engine\watcher\local_watcher.py", line 942, in _handle_watchdog_event_on_known_acquired_pair
        File "nxdrive\client\local\base.py", line 223, in set_remote_id
        File "nxdrive\client\local\windows.py", line 176, in set_path_remote_id
      
      Watchdog OS exception
      

      The code.

      Analysis

      This is happening on Windows when a synchronized file is being modified. The OS will refuse modifications because either the file is opened by another software or the file is not fully written to the file system.
      Drive understands the case but still tries to set the remote ID in extended attributes, because the sooner the better.

      Solution

      Let's skip that specific error and let's Drive retry later.

        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 - 15 minutes
                  15m