SharePoint / OneDrive Sync Error On Windows 10 – Files On Demand

Some users can experience an unexpected error while using synced SharePoint libraries. This is a very common issue if you have used the “SharePoint Migration Tool” for migrating your data to SharePoint.

The error occurs when a user tries to open a file from the SharePoint library using the “OneDrive Sync” function for that specific library. In my testing, it seems to be mostly related to “Office” file formats, but I have experienced it on documents like .txt and .PDF.

I have experienced this with a bunch of users, and it’s always the same story.
Their data has been moved from on-premise to SharePoint online via the “SharePoint Migration Tool” and after some time the users can experience this weird popup regarding the files not being able to be opened.

This can quickly be resolved for the specific file just by repeatedly clicking the “Try Again” button 4-10 times, but this is not a solution it’s more of a quick workaround while you fix the real issue behind the scenes.

The solution that worked for me:

I started by creating a VM of windows 10 where I would have enough space to sync the entire library down without having to worry about disk space. After syncing the library it’s time to loop through every document with the “Office” file format.
Use PowerShell to loop through all documents in the library and read the first line. This triggers the file repair in the cloud.

When you are done running the script and every file has been successfully read by the script you can ask the users to restart their computers. They should now be able to open the damaged files with no problems.

In some cases, a restart of the machine is not enough and you have to run an “OneDrive Sync Reset” on the machine. This can be done easily via the following method:

How to reset the OneDrive Desktop Sync in Windows 10.

On the affected machine open the “Run Dialog” by pressing the Windows Key + R and copy and paste the following into the “Run Dialog”.

This will trigger the OneDrive client to shut down and when you start it back up it will force a resync of all files. It’s very important to let it run through before you start checking files again.

Credits to: JustinKropp for doing the intense research.

Error codes:
0x80070184 Error
0x80070185 Error
0x8007017F Error
The Cloud sync engine failed
The cloud operation was unsuccessful

If you have any questions / feedback or would like to correct me on any of the stuff above.
Please use the comment section or contact me directly using the blue button in the bottom right corner.

Leave a Comment