Some users may encounter an error when using synced SharePoint libraries, which is a common problem if you have migrated your data to SharePoint using the SharePoint Migration Tool. This error occurs when a user attempts to open a file from the SharePoint library using the OneDrive Sync function for that library. In my testing, it seems to mostly affect Office file formats, but I have also experienced it with .txt and .PDF files.
I have encountered this issue with several users, and it always follows the same pattern: their data was migrated from on-premises to SharePoint Online using the SharePoint Migration Tool, and after some time they encounter this error when trying to open files.
A quick workaround is to repeatedly click the “Try Again” button 4-10 times, but this does not resolve the underlying issue.
The solution that worked for me:
To begin, create a Windows 10 VM with enough space to sync the entire SharePoint library without worrying about disk space. After syncing the library, use PowerShell to loop through all documents with the “Office” file format and read the first line. This will trigger the file repair process in the cloud.
1 2 3 4 |
Get-ChildItem -Path 'C:\Users\%username%\OneDriveSharePointPath' -Include "*.xls*","*.doc*","*.ppt*" -Recurse | ForEach-Object { $_.FullName Get-Content -Path $_.FullName -first 1 | Out-Null } |
After running the script and successfully repairing all damaged files, ask your users to restart their computers. This should allow them to open the files without any issues. In some cases, a simple restart may not be enough, and you may need to run an “OneDrive Sync Reset” on the machine. This can be done using 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”.
1 |
%localappdata%\Microsoft\OneDrive\onedrive.exe /reset |
This will shut down the OneDrive client and force it to resync all files when it is restarted. It is important to let the sync process complete before checking the 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.
Thanks for the info here! I believe I ran into this with a user today, and the retry file open method seems to have resolved the issue.