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.
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:
- 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
- You will need to click on the button End task for all the Discord processes
- 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
- Wait for Discord to apply some updates and launch correctly and then continue talking with your servers as usual
- 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.
- As I said, you need to open the Run dialog and there copy the following path:
%AppData%
- Now, hit Enter to open the AppData Roaming folder where you should locate the Discord folder. Rightclick on it and select the option Delete
- Once again open the Run dialog and this time copy this other path:
%LocalAppData%
- Hit Enter to open it, and there you should seek for the Discord folder to remove it as well
- Once you have removed both folders, restart your computer
- 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:
- Open the Run dialog with Win + R and copy the command
services.msc
. Hit Enter to open the Services - There you should look for the Quality Windows Audio Video Experience Service and double click on it
- You will open the Properties window, there open the dropdown menu Startup type and choose the option Automatic
- Click on Apply and OK to save the changes and restart your computer
- 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.
- To uninstall Discord on Windows 10, you need to open the Settings utility from the Start Menu.
- There click on the section Apps and now find the Discord program and click on the button Uninstall
- If you have another Windows version, you can open the Control Panel and there navigate to Programs, then to Programs and Features
- 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
- Navigate to the Discord website and click on the button Download for Windows.
- Save the Discord installer and then run it to install the program
- 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: