A JavaScript error occurred in the main process
Discord Discord
Severity: CriticalWhat Does This Error Mean?
This error means Discord's core app code crashed before it could finish loading. It looks scary because it mentions JavaScript, but it almost always means Discord's local files are damaged or outdated. A clean reinstall fixes this in most cases.
Affected Models
- Discord (Windows)
- Discord (macOS)
- Discord Canary
- Discord PTB
Common Causes
- Discord's app files are corrupted — often caused by an interrupted update
- A conflicting program or antivirus deleted or quarantined Discord's files
- The Discord cache has become corrupted over time
- An incompatible GPU driver is crashing the app's rendering engine
- The operating system is missing a required update that Discord depends on
How to Fix It
-
Close Discord and delete its cache. Navigate to %appdata%\discord and delete the 'Cache', 'Code Cache', and 'GPUCache' folders.
These folders hold temporary data that can become corrupted and prevent Discord from loading.
-
Restart your computer. Then open Discord normally.
A restart clears memory and resolves conflicts that can cause the crash.
-
If the error returns, uninstall Discord via Windows Settings > Apps. Then delete the folders at %appdata%\discord and %localappdata%\discord.
Removing all leftover files ensures you get a true clean slate.
-
Download a fresh installer from discord.com and install it. Run the installer as administrator.
Always download from the official Discord website to make sure the installer is not corrupted.
-
If Discord still crashes after a clean install, update your GPU drivers. Open Device Manager, find your graphics card, right-click, and choose 'Update driver'.
An outdated GPU driver can cause rendering crashes in Electron-based apps like Discord.
When to Call a Professional
This is a software error that does not require professional help. If you have tried a clean reinstall and the error still appears, the issue may be with a GPU driver or a Windows system file. A tech-savvy friend or PC repair shop can help diagnose those deeper issues.
Frequently Asked Questions
What does 'main process' mean in this error?
Discord is built on a framework called Electron. Electron apps have a 'main process' that handles the core app logic. If this crashes, the whole app fails to start. It does not mean anything is wrong with your internet or your Discord account.
Why did this error appear out of nowhere when Discord was working fine yesterday?
An automatic Discord update likely failed partway through. This leaves the app in a broken state. A clean reinstall puts everything back to normal. Your account and settings are not affected.
Does this error mean my computer has a virus?
Not necessarily. While malware can corrupt app files, this error is far more commonly caused by a failed update or corrupted cache. Run a virus scan to be safe, but start with the clean reinstall first. Most users fix it without finding any malware.