Categories: Opinion

How to Solve OneDrive for macOS issues (including stuck files)

If you’re having issues with high CPU usage with your OneDrive for macOS installation you might want to try the following fix suggestions.

Microsoft has made Files On-Demand available for High Sierra or later back in January 2019.

I have been using this in order to keep the Files On-Demand feature that has been available for some time now in a specific preview build. I can’t say though, if there has been any kind of update to this build Microsoft is making available (download here).

The Files On-Demand feature works well enough on this build and it’s so useful that I’ve been using despite the issues it has.

Files On-Demand!

The main issue I’ve been struggling with is that OneDrive will stop working after some days – it will just crash without any warning soon after the app loads. As this is a silent crash, you won’t even be aware that your files are not being synced at all uploading files correctly, at least some files appear to get stuck in the upload queue.

Check File Permissions and Attributes

One issue that may be causing files getting stuck in Onedrive for Mac’s upload queue is wrong permissions. While Apple has a specific permission reset instructions article available, my experience it didn’t help. I found that the files getting stuck had 644 permissions in contrast to the rest, which had 755.

ls -l
-rw-r--r--@ 1 me  staff 107260 7 Apr 2018 File 1.xlsx
-rw-r--r--@ 1 me  staff 343518 26 Feb 11:51 File 2.xlsx
-rwxr-xr-x@ 1 me  staff 342727 15 Feb 14:52 File 3.xlsx
-rwxr-xr-x@ 1 me  staff 81301 5 Feb 13:20 File 4.xlsx
-rwxr-xr-x@ 1 me  staff 234993 26 Feb 12:58 File 5.xlsx

In the example above the two top files were stuck in the upload queue.

So using Terminal I reset these permissions for all files back to 755 by issuing the command below within the OneDrive folder:

sudo chmod -R u=rwx,g=rx,o=rx .

If your OneDrive folder is in the default user home location you can get there by issuing cd ~/OneDrive after which you can issue the command above.

The files didn’t upload straight away after these commands, but a few minutes later all were uploaded. After that I exited OneDrive, and started it again, after which I had no more excessive CPU usage.

Another Fix

The following instructions are only for the Standalone version of OneDrive (i.e. if you didn’t get OneDrive for Mac via the Mac Store; if this is your case, just try removing the app and clearing the KeyChain manually).

Considering that OneDrive is not loading or if it is constantly crashing, you might want to follow the steps below. This will reset all KeyChain entries (including the login), and some other settings, so you’ll basically have to login again and wait for OneDrive to check all your local files against the online stored versions.

Here we go:

  1. Close OneDrive using the app (if open), by pressing the cloud icon and selecting Settings > Quit.
  2. Open Activity Monitor and kill any OneDrive related task you find (there might be some OneDrive Finder Integration entries there as well).
  3. Open Finder, navigate to Applications > OneDrive.app, right-click it and select Show Package Contents.
  4. Navigate to Contents > Resources
  5. Find “ResetOneDriveApp.command” or “ResetOneDriveAppStandalone.command” and double-click it.
  6. After that a Console script should run on its own and you can close it when completed.
  7. Open OneDrive again and login.

Caveats for the Fix above

Note that if you are using Files On-Demand and experiencing similar issues to mine, the procedure above will probably also reset your default selection for files and folders you have manually excluded from your synchronization selection (i.e. “Free up space”).

Essentially, you’ll have to choose whichever ones you want or leave it to OneDrive to manage it.

For More on OneDrive for Mac troubleshooting

Microsoft FAQ:

https://support.office.com/en-us/article/onedrive-for-mac-faq-3fc4062c-8051-4392-bff1-551e32840cd0

sete

Recent Posts

Synology – Modify public link metadata (site description and keywords)

If you have a Synology DiskStation and you have shared your public NAS link on…

4 years ago

Ubuntu Linux VM on Hyper-V – Expand Virtual disk to full size

Ubuntu initial setup does not do expand the virtual disk image to it's full size.…

4 years ago

Synology DSM 7 Docker error – Container crashes on boot – Solution / Fix

A common issue that appeared with DSM 7 is that some well known containers started…

4 years ago

Windows Sandbox – How to install Windows Store apps

The Windows Sandbox image is useful for many test setups, but it lacks much of…

5 years ago

Windows 10 Snip & Sketch app fails – “Failed to open the file” error fix

If you're used to Snip & Sketch for adding some scribbles placed over desktop screenshots,…

6 years ago

How to solve “Contacting the server for information” in Microsoft / Office 365 apps

On some occasions Microsoft 365 Office applications might open a popup with "Contacting server for…

6 years ago