• Linkedin
  • Reddit

Summary :

Discord JavaScript error

When installing or launching Discord on your Windows PC, the error message “a JavaScript error occurred in the main process” pops up. Are you still troubled by the Discord JavaScript error? Now, let’s explore the troubleshooting methods together with MiniTool.

Quick Navigation :

Why Discord a Fatal JavaScript Error Occurred

What causes the Discord JavaScript error? It is important to figure this question out in order to fix the error. According to an investigation, there are 2 main reasons behind the issue “a JavaScript error occurred in the main process”.

a JavaScript error occurred in the main process

  • Corrupted Discord Files: Discord will store the temporary files constantly on your computer to make sure it can run as normal. However, once these files get corrupted, it can trigger the Discord fatal JavaScript error. Besides, the corrupted settings and installation files also lead to the Discord JavaScript error.
  • Antivirus software: It’s well known that many antivirus programs block your computer from installing some specific Discord files and quarantine them. If you haven’t added it to the whitelist of your antivirus software, you may encounter a fatal JavaScript error Discord.

Now, let’s see how to fix Discord fatal JavaScript error.

discord no route thumbnail
Here Are 4 Solutions to Fix Discord No Route Error in 2020

This post has summarized the best fixes to get rid of Discord No Route Error in 2020. If you don't know how to fix No Route Discord, check out this post now.

Read More

Fix 1. Clear up the Temporary Discord Files

The first and simplest method is to clear up the temporary Discord files. To do so, follow the steps below to fix the issue “a JavaScript error occurred in the main process”.

Step 1. Press Ctrl + Alt + Delete keys to open the Task Manager window, and then right-click the Discord process and select End task option to close the program.

Step 2. Press Win + R keys to open the Run dialog box, and then type %appdata% in the box and hit Enter.

open the appdata folder

Step 3. In the Roaming folder, navigate to the Discord folder and right-click it and select Delete from the context menu.

delete Discord folder in the Roaming folder

Step 4. After deleting the folder, open the Run dialog box again and type %Localappdata% in it and hit Enter.

Tip: Are you still struggling to restore the accidentally deleted files? Don’t be alarmed! This post will help you find the lost files back.

Step 5. Find the Discord folder in the local AppData folder and delete it.

Step 6. Launch the Discord setup file again and follow the steps provided by the installation wizard.

This method has helped lots of people fix the Discord JavaScript error. If not, just move on to the next methods.

discord push to talk thumbnail
Step by Step Guide: How to Setup Discord Push to Talk in 2020

How to use Push to Talk on Discord? If you don't know how to enable and configure Discord Push to Talk, you can check out this post for instructions.

Read More

Fix 2. Add Discord to the Whitelist of Your Antivirus Program

As mentioned above, some antivirus programs especially Avast is also responsible for Discord a fatal JavaScript error. To get rid of the error, you can try adding Discord to the whitelist. Here we take Avast for example.

Step 1. Right-click the Avast icon on the desktop and select Open Avast user interface from the listed options.

Step 2. Navigate to the Protection tab on the left side, and click on the Virus Chest on the right side.

click on Virus Chest

Step 3. Then all the unsafe files quarantined by the antivirus software will be listed here. Now, navigate to all files related to Discord. These files start with discord_ in most cases.

Step 4. Click on the three dots and select the Restore and add exception from the context menu. Then repeat this step for each discord file.

Step 5. Now, you can install Discord again and see if the Discord fatal JavaScript error disappears.

To make sure you can launch the Discord setup file without any potential issues, you follow the steps below to add the executable setup folder to an exception in Avast. For that:

Step 1. Open Avast by the above steps.

Step 2. Click on the Menu icon at the upper right corner and then select Settings from the drop-down menu.

Step 3. Navigate to the General tab on the left side, and then select Exceptions option from the submenu.

click on Exceptions Avast

Step 4. In the pop-up window, click on the Add Exception button and select the Discord executable folder and installation files.

Step 5. Click on the Add Exception button to confirm and relaunch Discord.

Fix 3. Reinstall Discord

In some cases, many users encounter the error message “a JavaScript error occurred in the main process” even they install it successfully. For this situation, you need to clean up all files and reinstall Discord. Here’s how:

Step 1. Type control in the search box and select Control Panel from the context menu.

Step 2. Change the View by to Category. Then scroll down and click on Uninstall a program.

click on Uninstall a program

Step 3. Right-click Discord from the list of programs and select Uninstall.

Step 4. After the uninstallation is complete, open the Run box, type %appdata% in it, and hit Enter.

Step 5. Delete the Discord folder in the Roaming folder.

Step 6. Open the Run box, type %localappdata% in it, and hit Enter. Then delete the Discord folder.

Step 7. Download the latest Discord version from its official website. Then double click the executable file and follow the on-screen prompts to complete this reinstallation.

  • Linkedin
  • Reddit