Discord "A fatal JavaScript error occurred"? 6 fixes that work
✓ Reviewed & updated June 2026You double-click Discord and instead of your servers you get a grey box titled "A fatal JavaScript error occurred", packed with a wall of code you didn't ask for. It looks alarming, but it's a known Discord bug on Windows — not a virus and not something broken on your PC for good. In most cases it's fixed in two or three minutes.
The fixes below are ordered by how often they solve it. One in particular — the audio service fix in step 3 — is the one most people miss, so don't skip ahead if the first two don't work.
Quick checklist
- Close Discord completely from Task Manager
- Stop running Discord as administrator
- Turn on the "Quality Windows Audio Video Experience" service
- Delete Discord's cache folders
- Allow Discord through your antivirus
- Reinstall Discord cleanly
What causes this error?
The fatal JavaScript error usually comes down to one of three things: a corrupted Discord install or cache after an update, a Windows audio service being disabled (Discord quietly depends on it), or antivirus blocking part of the app. Each fix below targets one of those, so work down the list until one sticks.
The 6 fixes
Close Discord completely first
A half-crashed copy hanging in the background will keep throwing the same error. Clear it out before anything else.
- Press
Ctrl + Shift + Escto open Task Manager. - Find every Discord entry, click it, and hit End task.
- Try opening Discord again.
Stop running Discord as administrator
This one surprises people: with this particular error, running Discord with admin rights often causes it rather than fixing it. Turn that off.
- Right-click the Discord shortcut → Properties.
- Open the Compatibility tab.
- If Run this program as an administrator is ticked, untick it → OK.
- Open Discord normally (just double-click, don't "Run as admin").
Turn on the audio service Discord needs
This is the fix most guides skip, and it's the one that works when nothing else does. Discord relies on a Windows service called Quality Windows Audio Video Experience. If it's disabled, you get the fatal error on launch.
- Press
Windows + R, typeservices.mscand press Enter. - Scroll to Quality Windows Audio Video Experience and double-click it.
- Set Startup type to Automatic.
- Click Start if the service isn't already running, then OK.
- Reopen Discord.
Delete Discord's cache folders
Corrupted cache after an update is a classic trigger. Deleting these folders is safe — you stay logged in and Discord rebuilds them.
- Close Discord fully (step 1).
- Press
Windows + R, type%appdata%, press Enter, and delete the Discord folder. - Press
Windows + Ragain, type%localappdata%, press Enter, and delete the Discord folder there too. - Reopen Discord.
Let Discord through your antivirus
Some antivirus tools wrongly flag Discord's files and block the bits it needs to launch.
- Open your antivirus and check its quarantine or blocked list — restore Discord if it's there.
- Add the Discord folder to your antivirus exclusions.
- As a test, briefly disable third-party antivirus and try launching. If it works, add the exclusion, then switch protection back on.
Reinstall Discord cleanly
If the error still shows, a fresh install replaces whatever's broken. Your account and servers are safe — they live on Discord's servers, not your PC.
- Press
Windows + I→ Apps → Discord → Uninstall. - Delete leftover files using the cache steps in fix 4.
- Download the latest installer only from
discord.com/download. - Install and log back in.
Frequently asked questions
Is the fatal JavaScript error a virus?
No. It's a known Discord launch bug on Windows, usually caused by corrupted cache, a disabled audio service, or antivirus interference — not malware. The fixes above resolve it safely.
Why did running as administrator cause it?
With this specific error, admin mode can leave Discord's updater writing files with the wrong permissions, which breaks the next launch. Running Discord normally avoids that conflict.
I don't see "Quality Windows Audio Video Experience" in services. What now?
Make sure you opened services.msc (not Task Manager's Services tab) and scroll carefully — the list is alphabetical. If it's genuinely missing, move on to clearing the cache (fix 4) and a clean reinstall (fix 6).
Will I lose my messages if I reinstall?
No. Everything is stored on Discord's servers. Reinstalling only replaces the app on your computer.
Still stuck? Related Discord fixes: Discord won't open at all · Discord stuck on "Update Failed". Or send us your exact error and we'll help.
Send us the details →