sodcalculator

10 Tech How-To

Fix OneDrive Error 0x8004de40 on Windows 10

Guide 10-30475 · Updated · Step by step

OneDrive error 0x8004de40 on Windows 10 usually means the app can’t connect to Microsoft’s servers, often due to a corrupted cache, a blocked network port, or an outdated credential. You can fix it by clearing the OneDrive cache, resetting the app, or checking your proxy/firewall settings — most users resolve it in under 15 minutes without reinstalling Windows.

What Causes Error 0x8004de40?

This error appears when OneDrive tries to sync but fails to establish a secure connection. The code itself is generic — Microsoft doesn’t publish a single root cause, but common triggers include:

  • Corrupted OneDrive cache files — leftover temporary data that confuses the sync engine.
  • Stale login tokens — your password changed or the session expired, but OneDrive kept using old credentials.
  • Proxy or VPN interference — corporate proxies, VPNs, or security software that blocks OneDrive’s IP ranges.
  • Windows or OneDrive updates — a partial update can leave the app in a broken state.
  • Date/time misalignment — if your system clock is off by more than a few minutes, TLS certificates fail validation.

You’ll typically see the error in the OneDrive notification area icon, and files may stop syncing entirely. The good news: it’s rarely a sign of data loss — your files remain on the cloud and on your local drive.

Before You Start: Quick Checks

Try these simple steps first — they solve about 20% of cases:

  1. Restart your PC. A fresh boot clears temporary glitches.
  2. Check your internet connection — open a browser and visit onedrive.com. If that fails, the problem is your network, not OneDrive.
  3. Verify your system date and time: right-click the clock → Adjust date/time → toggle Set time automatically on.
  4. Sign out of OneDrive and sign back in: right-click the cloud icon → Settings → Account → Sign out.

If the error persists, move to the fixes below.

Fix 1: Reset OneDrive (Most Effective)

The built-in reset command clears the app’s cache and re-initializes the sync engine without deleting your files. Here’s how:

  1. Press Win + R to open the Run dialog.
  2. Type %localappdata%\Microsoft\OneDrive\onedrive.exe /reset and press Enter.
  3. A command window may flash — wait for it to close. Then OneDrive should restart automatically.
  4. If it doesn’t restart, open the Start menu, search “OneDrive,” and launch it manually.

If the path above doesn’t exist (some versions install to %ProgramFiles%\Microsoft OneDrive\onedrive.exe), use that path instead. After reset, you’ll be asked to sign in again. Your files will re-sync — the process can take a while if you have many files, but it won’t download duplicates.

Fix 2: Clear the OneDrive Cache Manually

If the reset doesn’t work, the cache may be deeply corrupted. You can delete it manually:

  1. Right-click the OneDrive cloud icon in the system tray → Exit.
  2. Press Win + R, type %localappdata%\Microsoft\OneDrive\cache, and press Enter.
  3. Select all files in that folder (Ctrl+A) and delete them. If some files are locked, restart your PC and try again.
  4. Restart OneDrive from the Start menu.

This only removes temporary files — your actual synced documents are safe. After restart, OneDrive will rebuild the cache and attempt to sync again.

Fix 3: Check Proxy and Firewall Settings

OneDrive needs to reach specific Microsoft endpoints. If you use a proxy (common in corporate or VPN setups), the connection may be blocked. To check:

  1. Open Settings → Network & Internet → Proxy.
  2. If “Use a proxy server” is on, try turning it off temporarily and test OneDrive.
  3. If you’re on a corporate network, contact your IT admin — they may need to allowlist *.onedrive.com and *.sharepoint.com.
  4. Also check Windows Firewall: go to Control Panel → Windows Defender Firewall → Allow an app through the firewall → ensure OneDrive is checked for both Private and Public networks.

If you use a third-party antivirus with a firewall, temporarily disable its protection (not just the firewall) to test — some suites block OneDrive even when Windows Firewall allows it.

Fix 4: Reinstall OneDrive

If nothing else works, a clean reinstall often fixes persistent sync errors:

  1. Press Win + I → Apps → find Microsoft OneDrive → Uninstall.
  2. Restart your PC.
  3. Download the latest OneDrive from onedrive.com/download and install it.
  4. Sign in with your Microsoft account and let it sync.

Your files remain in the cloud — uninstalling doesn’t delete them. After reinstall, OneDrive will re-download any files that aren’t already on your PC.

Frequently Asked Questions

Will resetting OneDrive delete my files?

No. The reset command and cache deletion only remove temporary sync data. Your actual files stay on your hard drive and in the cloud. After reset, OneDrive re-syncs — it may re-download files that were only stored locally, but nothing is lost.

Why does error 0x8004de40 appear after a Windows update?

Windows updates can change network settings or leave OneDrive in a partially updated state. The reset command (Fix 1) usually resolves this. If not, reinstalling OneDrive (Fix 4) is the next step.

Does this error mean my OneDrive account is hacked?

No. The error is a connection problem, not a security alert. However, if you see unusual activity in your account (like files you didn’t create), change your password immediately and review recent sign-ins at account.microsoft.com.

Can I fix this error on Windows 11 the same way?

Yes, the steps are identical on Windows 11. The reset command and cache path are the same. If you’re on Windows 11, you may also need to check that OneDrive is allowed through the firewall — the settings location is slightly different but the process is the same.

What if OneDrive still fails after all these steps?

If the error persists, try creating a new Windows user account and test OneDrive there. If it works, your original profile is corrupted. As a last resort, use the Sync web app to access files in a browser until you can perform a full system repair.

Is there a way to prevent this error in the future?

Keep Windows and OneDrive updated, avoid using VPNs that block Microsoft services, and periodically restart OneDrive if you notice sync issues. Also, ensure your system clock is set to automatic — a drifting clock is a common cause of TLS errors.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →