Fix OneDrive JavaScript Error Preventing Desktop Sync
Question details
The user is unable to sync files because the OneDrive desktop app displays a JavaScript blocked error during the sign-in process.
- Product
- Microsoft OneDrive
- Device & OS
- Windows
- Scenario
- Attempting to sign in to the OneDrive desktop application to start synchronizing local and cloud files.
- Observed behavior
- An error message states JavaScript is unavailable or blocked within the sign-in window, despite being enabled in Chrome and Edge, preventing successful login and file synchronization.
Ensure your Windows operating system is up to date and temporarily pause any strict third-party firewall or antivirus software that might be actively blocking background scripts.
Adjust Internet Properties Security Settings
Temporarily lower the Windows Internet security settings to allow the OneDrive sign-in script to run properly.
The OneDrive desktop application relies on underlying Windows legacy Internet settings to render the sign-in window. Adjusting these settings resolves script blocking issues.
Press the Windows key + R to open the Run dialog box. Type inetcpl.cpl and press Enter to launch the Internet Properties window.
Navigate to the Security tab. Select the Internet zone and temporarily drag the security level slider down to Medium. Click Apply to save the changes.
Open File Explorer, click on the OneDrive folder, and attempt to sign in to your account again. The JavaScript error should now be bypassed.
Once you have successfully signed in, return to the Internet Properties Security tab, restore the security level to Medium-high or High, disable Active Scripting if necessary, and click Apply.

Reset or Reinstall OneDrive
If adjusting the internet security settings does not resolve the script error, resetting the OneDrive application can clear corrupted configuration files.
Sync Documents Seamlessly with WPS Office
If you are tired of troubleshooting continuous Microsoft OneDrive sync errors, consider switching to WPS Office. It provides a lightweight, fully compatible document environment with built-in, reliable cloud synchronization to keep your files safe and accessible across all your devices without script errors.

Frequently Asked Questions
Why does OneDrive say JavaScript is blocked when it works in Google Chrome?
The OneDrive desktop app utilizes the underlying Windows Internet Properties (legacy Internet Explorer settings) to load its login interface. Therefore, the sign-in dialog ignores the settings you have established in modern default browsers like Chrome, Edge, or Firefox.
Is it safe to lower my Internet Security settings to fix OneDrive?
Yes, it is safe as a temporary troubleshooting measure. Lowering the settings to 'Medium' allows the necessary login scripts to execute. However, you must restore the security level to its original state immediately after logging in to ensure your system remains protected.
Will running the reset command delete my stored OneDrive files?
No, executing the OneDrive reset command only clears the local synchronization settings and application configuration state. Your local files and the files safely stored in the cloud will remain completely untouched.




