Tips and Tricks

Discord Fatal JavaScript Error: 6 Quick Fixes

Discord Fatal JavaScript Error: 6 Quick Fixes

Are you facing the "Discord Fatal JavaScript Error"? Discord is one of the most popular instant messaging apps among gamers. But sometimes Discord acts strangely and shows different errors, such as the No Route error when connecting to voice chat, or a JavaScript error with a message like "A fatal JavaScript error occurred"

Discord Fatal Javascript Error
Discord Fatal JavaScript Error

or "A JavaScript error occurred in the main process".

Discord Javascript Error
Discord JavaScript Error

As you can see in the screenshot above, the error message mentions the reason for the error. But not everyone has a technical background, so it can be hard to understand what it says.

If you are reading this article, you are probably also not sure what is happening with Discord or how to solve the error.

Also, if you have ever faced the Discord No Route problem, we have posted a solution for that too.

Note: Do you want a Discord Nitro free trial? We have a working method for that. Just read this article.

Causes of the Discord Fatal JavaScript Error

The JavaScript error in your Discord app may be caused by any one of the following, although there are other possible reasons too.

  1. There is a misconfiguration in the Discord app.
  2. Discord is set to run as administrator.
  3. There is an issue with the Windows Audio Video Experience service.
  4. There are unwanted files in AppData.

Solutions for the Discord Fatal JavaScript Error

As in our earlier articles, we will go through different methods to solve the problem. Follow the solutions one by one, and by the end of this article your error should be fixed.

Note: This article is for Windows 10 users. If you are using another version of Windows, the steps are similar, so just follow along.

Solution 1: Restart Your Computer

A computer is a bit like a human being. Think how much more alert you feel after sleeping, even if only for 10 minutes. So the first step in solving any computer problem is restarting the computer.

Restart the computer and check whether the problem is solved. If you still get the JavaScript error, continue to the next solution below.

Solution 2: Close All Discord Processes

Even after you close the Discord application, background processes for Discord may still be running on your device. So before going further, make sure everything related to Discord is closed, including background tasks. If you are not sure how to do this, follow the steps below.

  1. Right-click on the taskbar at the bottom of the screen and select "Task Manager".
  2. In Task Manager, find all the applications and processes named "Discord" and close them all.

Once you have closed all the Discord processes, follow the next step to solve the JavaScript error.

Solution 3: Delete Discord's Temporary Files

When you open or edit something in the Discord app, the data is stored in AppData and LocalAppData. If something has gone wrong in Discord and it is giving a JavaScript error as a result, you can delete its data and cache from AppData. This restores Discord to its initial settings and removes all the misconfigured files.

To delete the data in AppData and LocalAppData, follow these steps:

  1. Open "My Computer" on your desktop and go to "Local Disk C" (the default disk where Windows is installed).
  2. In Local Disk C, go to "Users", then "YourUsername" (the username you chose when setting up the computer), and then "AppData".
    Note: You must enable "Show Hidden Files" in your file manager. If you are not sure how to do this, use the alternative method below.

Alternatively, you can open AppData like this:

  1. Press Windows + R on your keyboard to open the Run dialog.
  2. Then type "%appdata%".
    Discord JavaScript Error
    Discord JavaScript Error

With either method, the AppData folder should now be open, showing a list of folders. Find the one named "Discord" and delete it to solve the JavaScript error.

Discord JavaScript Error - Delete Discord
Discord JavaScript Error: Delete Discord

Once you have deleted the Discord files from AppData, it's time to delete the files from LocalAppData. To do so, follow these steps.

  1. Press Windows + R on your keyboard to open the Run dialog.
  2. Then type "%localappdata%".
  3. Once LocalAppData is open, find the folder named Discord and delete it.

Deleting the LocalAppData files has proven to be one of the most effective ways to solve the Discord JavaScript error. This method has worked for almost 70% of the people facing this error. We hope it has solved your problem.

If this method has not solved your problem, continue to the next solution.

Solution 4: Whitelist the Discord Application

Like the No Route error in Discord voice channels, the Discord JavaScript error can also be caused by your antivirus, so you need to whitelist Discord in your antivirus. As mentioned in our previous post, the method for whitelisting an application differs between antivirus programs. To whitelist the application, check your antivirus documentation, or comment below and we will be happy to help.

If you are not using any third-party antivirus, you can follow this method to whitelist the Discord application in Windows Defender.

After whitelisting the Discord application, you should no longer see the JavaScript error. If it still doesn't solve your problem, try the next solution.

Solution 5: Change the Windows Audio Video Experience Service Settings

The Windows Audio Video Experience service must be enabled for Discord to run properly. By default it is set to Manual, and you can change it to Automatic if you are facing the JavaScript error. Changing it to Automatic fixes the Discord JavaScript error and can fix JavaScript errors in other programs as well. To change it, follow these steps carefully:

  1. Press Windows + R on your keyboard to open the Run dialog.
  2. Then type "services.msc" and press Enter.
  3. You will see a long list of services. Scroll down, right-click on "Quality Windows Audio Video Experience" and click Properties.
  4. Under Startup type, change Manual to Automatic.
  5. Then click "Start" under Service status and click "Apply".
  6. Once you have clicked Apply, restart your computer.

That's all. Your JavaScript error should now be fixed. If the problem is still not fixed, try reinstalling the application.

Solution 6: Reinstall the Application

If none of the methods above have solved the Discord JavaScript error, the last option is to reinstall the Discord application. First, uninstall the application from the Control Panel and delete the AppData and LocalAppData folders as described above. Then restart your computer and install the Discord app again.

Written by

ABHIYAN

Published on TheTechRim in Tips and Tricks.