ViCadia is supported by its readers. If you buy products through affiliate links, we may earn a commission. Learn more
How To's

How to Fix Discord JavaScript Error

5 Mins read

Advertisement

In the last couple of years, Discord has become an immensely popular web platform for gaming. Not only does it allow gamers to communicate with each other, but it also allows them to share information and data. This way, Discord has also become a gaming hub.

Like all the other applications, Discord is also prone to errors and bugs, and Discord Javascript Error is one of them.

What is Discord JavaScript Error and how can you fix it?

The JavaScript Error has been reported by many Discord users. Unfortunately, it is one of those errors that has no apparent cause. Even on Discord’s official website you won’t find much information about this error. Despite that, this error can be fixed, and there are multiple solutions for it.

Solution #1: Delete Discord files

Like many other programs, Discord has a special folder in which it stores temporary data. Sometimes this data can get corrupted, and cause the infamous JavaScript error. In order to fix this error, all you have to do is delete the corrupted data. To do that, follow these steps:

Advertisement
  1. Make sure that Discord is closed. If you are not sure whether Discord is not running, open up the Task Manager and check if Discord is present in the Apps list. If you spot Discord running in the background, right-click on it and select “End Task”.
  2. Once you are sure that Discord is not running, hover with your mouse over the Windows icon in the taskbar and right-click. In the popup menu select “Run”. Now type %appdata% in the dialogue box and hit Enter.
  1. A new folder will open up. Find the discord folder, right-click and press “Delete” from the menu.
  1. Repeat step 2, but this time type %localappdata% in the dialogue box, and hit Enter.
  2. A new folder will open up. Find Discord folder again and delete it by right-clicking and selecting “Delete” option from the menu.
  3. Once you’ve done all that, go to Discord installation folder and relaunch the Discord installation setup file. Follow the on-screen instructions to reinstall Discord.

Solution #2: Exclude Discord files and folder from antivirus scanning

Many antivirus programs block or red flag Discord installation files, when in fact they are not malicious. These false positive detections do more harm then good, as they corrupt Discord’s core files.

This can sometimes cause the JavaScript error to appear. For example, many antivirus programs have a tendency to delete “discord_voice” file for no apparent reason. To fix this issue, you will need to whitelist, or exclude Discord’s files and folders from scanning by your antivirus program. This will prevent Discord’s files accidentally ending up in your antivirus’ quarantine.

Since there are many antivirus programs out there, it is impossible to provide a simple procedure on how to whitelist Discord files in each every one of them. For purpose of this guide we’ll show you how to exclude Discord files and folders from scanning by ESET Internet Security antivirus software.

  1. Firstly, open the ESET Internet Security by double-clicking its icon in the taskbar.
  2. Once the programs interface opens, click “Setup” in the left menu, and on that page click “Advanced setup” in the lower right corner of the screen.
  1. Once you do that, a new window will pop-up. In the left menu click on “DETECTION ENGINE”. In the right pane expand the “EXCLUSIONS” section, and click on “Edit” button near the “Detection exclusions”.
  1. Once you do that, a new window with a list of all excluded files and folders will appear. In the lower part of the windows press on “Add” button.
  2. Another window will pop-up. Here, press on the three dots in the field next to the “Path” text. Now navigate to your Discord installation folder, and add this folder to your exclusions. We highly recommend adding both your Discord installation folder and the Discord installation file to the list of exclusions in order to prevent any possible errors.
  1. Once you’ve done all that, close ESET Internet Security, and install or re-install Discord. The JavaScript error shouldn’t occur anymore.

Solution #3: Fix for Windows 7 users

This solution will only work Windows 7 users who have a hard time installing and running Discord on their computer. The fix is quite simple, and all you have to do is perform these simple steps:

  1. Click on the Start Menu, then locate the “Computer” in the left menu, right-click on it and select “Manage” from the drop-down menu. Allow the administrative permissions to proceed.
  2. After that, go to the Server Manager and then find “Features”. Click on “Add features” located on the right side.
  3. Once the add feature wizard opens, find the “Quality Windows Audio Video Experience” option. Check the given box and then click on “Next” to proceed forward.
  4. Now, confirm the installation and ensure that you have selected an option named QWAVE when confirming.
  5. Click the “Install” button and wait until the installation completes. Once the installation finishes, restart your computer.

Solution #4: Perform the clean reinstall of Discord

If you are not using Windows server, and you have no issues with your antivirus software flagging Discord files as false positives, then this solution should help you fix the infamous JavaScript error. This fix is pretty intuitive, however, it is extremely important to perform all the necessary steps, otherwise it won’t work. To properly reinstall Discord, do the following:

  1. Make sure you are logged in to your PC as an administrator. This is extremely important, because only an administrator has all the privileges to delete program files.
  2. Search “Control Panel” in the Start menu, and open it.
  3. In the Control Panel, locate and click on the “Uninstall a program” option under the Programs section.
  4. Alternatively, if you are using the Settings app on the Windows, click on the “Apps” option. This will open the list of all the installed programs on your PC.
  5. Find the Discord app in the Settings app or Control Panel.
  1. Click “Uninstall”. A message will appear asking you whether you want to completely remove Discord from you computer. Hit “Yes” and proceed with the uninstallation.
  2. Click “Finish” once the uninstallation process ends.

If you think that this is all it takes to remove Discord files and fix the JavaScript error, then you are wrong. This was only the first phase of this solution. In the next phase you will have to find and manually delete leftover Discord files in order to create conditions for clean reinstall. To delete these files, do the following:

  1. Open the Run dialog box, either by searching it on the search bar or by clicking the Windows + R keys simultaneously. This will open the run box.
  2. Type %appdata% in the search field and hit “OK”.
  3. This will open a directory in which you have to locate Discord folder. Once you find it, right-click on it, and select “Delete”.
  4. Open the Run dialog box again, but this time type %localappdata% in the search field. Hit “OK” or press Enter on your keyboard.
  5. New directory will open up. Locate the Discord folder again and delete it.

Now that you completely uninstalled and deleted all Discord files, you can now reinstall Discord from scratch. Go to discord.com and download the latest version of Discord. Then, open the setup file and follow the on-screen instructions carefully. Now, hopefully, the JavaScript error won’t happen again.

5. Run Discord without administrative rights

This may sound counter-intuitive, but running Discord without administrative rights or privileges may help fixing the JavaScript error. To run Discord every time without administrative privileges, do the following:

  1. Right-click on the Discord app icon and select “Properties”. You can find the application on your Desktop, or in you Start menu. Pin the Discord to Taskbar to quickly launch it whenever you need it.
  2. Once the window opens, go to the shortcut tab and select “Advanced…” button.
  1. Untick the box next to the “Run as administrator” text, and click “OK” to save changes.
  2. Finally, go to the Compatibility tab and also untick the box next to the “Run as administrator” text. Apply changes by clicking OK.

And that’s it. This marks the end of our guide on how to fix the Discord JavaScript error. Above you can find the most common solutions which help to resolve this infamous problem. We hope that you liked this guide, and found the information provided here to be useful.

Read more

Advertisement

28 posts

About author
Emma is an avid lover of cats, Japanese anime, deep existential works, and video games. She graduated with a master's degree in anthropology and occasionally writes articles for ViCadia.
Articles
    Related posts
    How To's

    Undervolting Graphics Cards: What It Means and How It Works?

    6 Mins read
    The best way to retain maximum performance and decrease power consumption of your GPU is to undervolt it. Here is how to do it.
    How To's

    What To Do With Old Graphics Card?

    3 Mins read
    Do you have an old graphics card lying around that needs to be disposed of and you don’t know what to do with it? Here is a couple of solutions.
    How To's

    How to Install ChromeOS Flex?

    5 Mins read
    Want to breathe a new life into your old notebook? The Google ChromeOS Flex is the right solution for you. Here is how to install it.

    Leave a Reply

    Your email address will not be published.