OneDrive File Issues

Fix OneDrive JavaScript Error Preventing Desktop Sync

Adam DavisAdam Davis Oct 26, 2026 868 views

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.
Before you start

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.

Solution 1Recommended

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.

1
Open Internet Properties

Press the Windows key + R to open the Run dialog box. Type inetcpl.cpl and press Enter to launch the Internet Properties window.

2
Lower Security Level

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.

3
Sign In to OneDrive

Open File Explorer, click on the OneDrive folder, and attempt to sign in to your account again. The JavaScript error should now be bypassed.

4
Restore Security Settings

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.

Adjust Internet Properties Security Settings
Security Warning: It is crucial to restore your browser security settings back to their default higher levels immediately after successfully logging into OneDrive to maintain your system's protection against malicious scripts.
Free Microsoft Office alternative

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.

Highly compatible with all major Microsoft Office file formats, including Word (.docx), Excel (.xlsx), and PowerPoint (.pptx).Includes reliable built-in WPS Cloud storage, eliminating the need to deal with third-party sync or JavaScript errors.Lightweight software architecture ensures fast installation and a smooth experience even on older computers.Features a familiar, all-in-one tabbed user interface, making the transition from Microsoft Office completely effortless.
microsoft office alternative - wps office

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.