Sign-in & Login Problems

How to Fix OneDrive JavaScript Required Error on Windows 11

Algirdas JasaitisAlgirdas Jasaitis Oct 26, 2026 868 views

Question details

Users are unable to sign into the OneDrive desktop app because it displays a message stating that JavaScript must be enabled, despite it already being enabled in installed web browsers.

Fixing the OneDrive JavaScript Required Error on Windows 11
Product
OneDrive Desktop App
Device & OS
Windows 11
Scenario
Signing into the OneDrive desktop app after a Windows upgrade or changes to the application installation path.
Observed behavior
A 'JavaScript must be enabled' error blocks the sign-in process, sometimes associated with an unusual installation path involving Lightroom or other unexpected folders.
Before you start

Verify that you can successfully sign into your OneDrive account using a standard web browser to ensure your account credentials are correct and your account is active.

Solution 1Recommended

Reinstall OneDrive and Correct the Installation Path

Uninstalling the corrupted OneDrive app and performing a clean installation is the most effective way to resolve built-in web authentication and path-related errors.

The OneDrive desktop app relies on internal Windows web components to display the sign-in screen. When the installation path is corrupted or points to an unusual directory, these components fail to load correctly, triggering a false JavaScript error.

1
Uninstall Current OneDrive

Open Windows Settings, navigate to 'Apps' > 'Installed apps', search for Microsoft OneDrive, click the three dots next to it, and select 'Uninstall'.

2
Restart Your Computer

Restart Windows 11 to clear out any lingering temporary files or registry keys associated with the broken installation.

3
Download the Latest Installer

Visit the official Microsoft website to download the newest version of the OneDrive desktop client.

4
Install and Verify the Path

Run the downloaded installer. Once installed, launch OneDrive and attempt to sign in again. The clean install forces the application into its default Windows directory, resolving path conflicts.

Reinstall OneDrive and Correct the Installation Path
Check Security Software: If the issue persists after reinstalling, temporarily disable your antivirus or firewall to ensure they are not blocking OneDrive's built-in web authentication scripts.
Free Microsoft Office alternative

Experience Seamless Document Management with WPS Office

If Microsoft Office and OneDrive are causing persistent sign-in headaches, consider switching to WPS Office. It provides a lightweight, highly compatible, and free alternative with its own reliable built-in cloud storage system.

  1. 1. Download WPS Office: Visit the official WPS website and click the free download button for Windows.
  2. 2. Install the Software: Run the lightweight installer to quickly set up the office suite on your PC.
  3. 3. Use WPS Cloud: Sign in with your email to automatically save and sync your documents without complex folder paths.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats.Built-in WPS Cloud storage minimizes third-party desktop sync errors.Lightweight installation with minimal impact on system resources.Free to download and use with a familiar, easy-to-navigate interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why does OneDrive say JavaScript is required when it is already enabled in Chrome?

The OneDrive desktop app relies on Windows' built-in internet components (like Edge WebView) for its sign-in screen, not your default web browser like Chrome or Firefox. A corrupted installation prevents these internal components from running properly, triggering a false error.

How do I fix unusual OneDrive installation paths on Windows 11?

The easiest way to correct an abnormal installation path is to uninstall the current version of OneDrive, restart your computer, and reinstall it from the official Microsoft website. This forces the application to install in its default, secure Windows directory.

Can system policies or antivirus software cause the JavaScript error in OneDrive?

Yes. Overly strict firewall rules, antivirus software, or Windows security policies can block the scripts OneDrive uses to render the sign-in page. Temporarily disabling your antivirus or checking your firewall permissions can help identify if this is the root cause.