How to Fix Discord Javascript Error Ocurred in the Main Process

Do you want to launch Discord, but you always get the warning message: A javascript error occurred in the main process. Well, this problem is quite usual for Windows 10 users, and on this post, I will show you how you can fix it.

If you think that this javascript error on Discord has something to do with javascript itself, that isn’t true. This problem appears when there is some conflict in your Discord client that doesn’t seem to be fixed automatically.

Maybe you are missing some core services that have been disabled recently, or even the app doesn’t have the appropriate permission to run the client correctly.

There are several reasons why the javascript error appears on Discord, and you can try to each the solutions below to fix it quickly.

discord javascript error

Run Discord as Administrator

This should be the first step that you can try to fix this javascript error. Sometimes Discord needs to apply some update or change some files, and for that, it needs some individual permissions.

By default, Windows should grant that permission, but you can try to give them directly following these steps:

  1. First, you need to open the Task Manager utility pressing the keys Ctrl + Shift + Esc. Once there, click on the button More details and find the processes Discord
  2. You will need to click on the button End task for all the Discord processes
    end task discord
  3. Now, you need to navigate to the Windows desktop, and there find a Discord shortcut. Rightclick on this shortcut and select the option Run as Administrator
    discord run as administrator
  4. Wait for Discord to apply some updates and launch correctly and then continue talking with your servers as usual
  5. If you experience this javascript error again, you can try once again to enable the administrator permissions

Clear Discord Data Cache

Discord, like some other programs, store some data on your computer to be able to run smoothly on your computer and because you have it enabled to run at startup.

These data sometimes get old or corrupted by some virus or even some bad update of the program, and you can try to remove them manually to fix javascript error on Discord.

First, you will need to use the Run dialog on two steps; therefore, when I ask to open the Run dialog, you need to press the keys Win + R to do that. Let’s start.

  1. As I said, you need to open the Run dialog and there copy the following path: %AppData%
  2. Now, hit Enter to open the AppData Roaming folder where you should locate the Discord folder. Rightclick on it and select the option Delete
    delete discord appdata
  3. Once again open the Run dialog and this time copy this other path: %LocalAppData%
  4. Hit Enter to open it, and there you should seek for the Discord folder to remove it as well
  5. Once you have removed both folders, restart your computer
  6. After that, launch Discord and verify that the javascript error has been fixed successfully

Change Windows Service Settings

Discord requires some Windows services to be able to run properly, and when you find a javascript error, maybe the problem is that some of these services have been disabled recently.

One known service to be the cause of this issue is: Quality Windows Audio Video Experience Service and you can try to enable it again following these steps:

  1. Open the Run dialog with Win + R and copy the command services.msc. Hit Enter to open the Services
  2. There you should look for the Quality Windows Audio Video Experience Service and double click on it
  3. You will open the Properties window, there open the dropdown menu Startup type and choose the option Automatic
    Quality Windows Audio Video Experience Service
  4. Click on Apply and OK to save the changes and restart your computer
  5. Now, you can try to launch Discord and verify that the issue has been fixed

Reinstall Discord

Nobody wants to end here, but if you continue having a problem with the javascript error, you should reinstall the app to fix the problem.

Hopefully, the process of reinstalling Discord is easy, and you will only need to uninstall the current version and download the latest one from the official website.

  1. To uninstall Discord on Windows 10, you need to open the Settings utility from the Start Menu.
  2. There click on the section Apps and now find the Discord program and click on the button Uninstall
  3. If you have another Windows version, you can open the Control Panel and there navigate to Programs, then to Programs and Features
  4. There you can also find the Discord program and click on the Uninstall button. Finally, only follow the wizard instructions until your remove this app from your computer
    uninstall discord
  5. Navigate to the Discord website and click on the button Download for Windows.
  6. Save the Discord installer and then run it to install the program
  7. In most cases, the javascript error should be fixed, and you can continue chatting with your friends.

Wrapping Up

This error on Discord is something usual and has been reported several times, that’s why there are multiple solutions that you can try.

If you continue having a problem with Discord, you can check these other articles where you can find more information:

Scroll to Top