How to Fix Discord JavaScript Error?
Tags: javascript, discord, gaming
Published: 2021-06-01 15:58:00

One of the most loved and user-friendly applications, Discord, permits you to communicate with your friends or team members during gameplay. Owing to its unique features, it is a ‘must have’ application, for sure. However, several people come across a JavaScript error while they try to install Discord on their computer.

If the JavaScript error is hindering your approach to have Discord, it is not worrisome since it happens with many users. Moreover, these errors are fixable. Therefore, in this article, you will get your hands on fixing Discord JavaScript errors by taking some measures appropriately. So, let’s get started!

##What is JavaScript Discord Error?
Although several users have reported encountering the JavaScript Discord error while trying to install Discord on their computers, we do not have enough information regarding the root cause of the annoying error. Besides, the official Discord’s website does not possess any useful information about the error.

What causes Discord JavaScript Error?
Although we do not know the fundamental cause that why do users face the JavaScript error while installing Discord on their computers, but we have figured out a few possible reasons linked to the functionality of Discord, as under;

* Corrupted Discord.
* Ceased Quality Windows Audio Video Experience service.
* Discord running with administrator permission.

##How to fix Discord JavaScript Error?
Without any further delay, let’s have a look at the quick solutions given below so that you can get rid of the Discord JavaScript error. Please make sure that you follow the fixes and their steps sequentially to get your task done appropriately!

###1. Remove Discord process from Task Manager
The first and foremost step you need to take is to remove the Discord process from Task Manager. It is essential to do; else, when you try to delete the app, a popup window will appear saying you cannot delete the application because it is still in use.

To stop the Discord process follow the below steps

* Right click on the ‘Taskbar’
* Select ‘Task Manager’
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1va4qfrysgltlk0ozwuh.jpg)
* Click on the ‘process’ tab
* Select “Discord” and click on ‘End task’
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ffcgzvezqmbaiqs7j5ee.jpg)

###2. Delete Discord files from %appdata% and %localappdata%
Deleting the Discord files and folders in AppData and LocalAppData is equivalent to resetting the Discord settings. We expect this measure to resolve the JavaScript error so that you can have Discord on your computer easily.

Follow the steps as under to delete Discord folders;

* Begin with opening the Windows Explorer on your computer and click on ‘This PC.’ Now you need to go to this given location (C:\Users\YOURUSERNAME\AppData\Discord).
* You should be able to see the ‘AppData’ folder. If you do not see it, the folder possibly lies in the ‘Hidden’ Folders. Therefore, make sure that you enable the option that allows you to view the hidden folders and files.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/42cwrhbv15pwp09nsjqr.jpg)
* To view the hidden folders, open File Explorer’s menu and click on the ‘View’ tab, then make sure you click on the ‘Hidden items’ in the show/hide bar. Once you make these changes, the file explorer will show you the hidden files and folders until you reset the changes.

There is another way to open discord local folder in your computer

1. Open the Run Dialog box by pressing the “Windows key + R”
2. Type %appdata% and press ‘OK’
3. it will directly open your appdata folder
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qrgjpozt7z0bzgl5o3zt.jpg)

* Next, you need to delete the Discord folder in the AppData folder. As mentioned earlier, to delete the folder, you would need to end the task in Task Manager first. If you have already finished the Discord process in Task Manager, it would be easy for you to delete the app.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w9kvufekz1j8ho3ow3ob.jpg)
* You can click on the search button next to the Start button and type ‘Run’ or press the ‘windows key + R’ that will bring up the Run dialog box where you will have to write %localappdata% and press enter.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dqm6414g1p3jctoc36gj.jpg)
* A folder pops up on the screen in which you will have to navigate to the Discord folder, make a right-click on it and move on deleting the folder.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4q9ee4teiuysmljua225.jpg)
* There should be no files remaining to delete, and make sure that you delete all the folders. Next, restart your computer and see if you still see the Discord JavaScript error.

###3. Change settings in Windows Audio Video Experience service
As mentioned earlier, the Quality Windows Audio Video Experience service is an essential service for Discord. If it contains a problem, it usually results in a Discord JavaScript error. For many users, changing the settings from Manual to Automatic worked well!

Make sure you follow the steps given below in an orderly manner to resolve the issue quickly;

* Use the ‘Windows + R key’ combination to open the run dialog box, here you will have to type in ‘services.msc.’ and press the enter key. You will have the Services toolbox opened up the very next second.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i3ohfio5w8tfcx77v2vd.jpg)
* Please navigate to the ‘Quality Windows Audio Video Experience’ and open it by making a right-click. A menu will appear where you select ‘Properties.’

* You have to stop the Service if it is already running by clicking on the ‘Stop’ button given in the middle of the window. However, you have to click on the Start button to rerun the Service.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5aenwojaf0wsd3u6p8cg.jpg)
* When you open the Service’s properties window, check for the option under the “Startup type” menu and set it to “Automatic” rather than “Manual.” You have to check these settings before proceeding on.
* Clicking on the Start button may result in an error ‘Windows could not start the Service on the local computer. Error 1079: the account specified for this Service differs from the account specified for other services running in the same process.’
* To resolve the above error, make sure you follow the given steps adequately

* In the Service’s properties window, open the ‘Log on’ tab and click on ‘Browse.’
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v8yx8v9t7mds6yqzbxis.jpg)
* A ‘enter the object name to select’ entry box where you have to write your account’s name. Make sure you click on “Check names”. Now, wait for a while until the name is available.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2gj2tg5c235jqhyt3s3m.jpg)
* Select ‘OK’ and do not forget to type in your password in the Password box.

###4. Whitelist Discord installation files
Most people have got antivirus software installed in their computers for safety purposes. However, almost every antivirus software blocks specific files while downloading Discord. One file that unfortunately becomes the target of every antivirus app is the ‘discord voice.’

The interruption in downloading the files may result in a Discord JavaScript error. However, the blockage of these files by an antivirus app is a fixable issue. All you need to do is to whitelist the Discord files from the antivirus app.

Whitelisting is done differently in every antivirus software, and there are several antivirus software available. Therefore, we will brief the process of whitelisting the Discord files from the very popular Avast antivirus for your convenience.

Follow the steps to whitelist the Discord files from the antivirus

* Make a right-click on the Avast icon to open up the Avast. A list will appear where you have to select ‘open Avast user interface.’
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9msee6c1izxhg5ld31wf.jpg)
* Once the user interface has appeared on the screen, you have to click on the ‘Protection’ tab.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h7i47b6ee8k2nup4bw4f.jpg)
* On the right side of the screen, there is a ‘Virus chest.’ * Clicking on this option will show all the blocked and quarantined files by the antivirus.
* Next, you need to find out all the Discord files in the antivirus. When you find these, bring your cursor to the files, you will see “three dots” appearing.
* Click on those three dots and opt for ‘restore and add exception’ on the appearing list.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f5yq4e9hexzc8wjvqvw8.jpg)
* You have to repeat the step mentioned above for each Discord file separately.
* Once you have whitelisted the files, try reinstalling the Discord.

Moreover, suppose you do not want hindrance in downloading the Discord any time in the future. In that case, you will need to place all the Discord folders in exception in Avast, which will make the installation process uninterrupted and quick. Follow the steps as under;

* Firstly, open the Avast as mentioned earlier.
* Open the “menu” icon and navigate to the “settings”
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jxhw67o63kstf75g30w5.jpg)
* On the left side of the screen, there is a “General” section. Open it.
* In the General section, select the “Exceptions” option.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o5pwvqsib6hsp60jkbue.jpg)
* Select the ‘Add exception’ option and browse the Discord installation folder.
* Lastly, select ‘Exception’ and install the Discord.

###5. Run Discord without Administrator Privileges
Many users have reported the satisfactory function of the Discord app while not being run as an administrator. We can assume that running Discord as an administrator is not a preferred option since it may result in a Discord JavaScript error.

Therefore, to run Discord without admin permissions, follow the steps as under;

* Make a right-click on the Discord app and select ‘properties.’

* In the properties window, go to the Shortcut tab and click on ‘Advanced.’
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/luvvk56wc0p5nbkx9b4k.jpg)
* There is a ‘Run as administrator’ option appearing on the screen. Make sure you uncheck it and then click on ‘OK.’
* You have to repeat the step mentioned above in the Compatibility tab as well. Always click on ‘OK’ to save the changes you have made.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jtcq4m9u352byfyeeosv.jpg)

###6. Fix the Discord JavaScript error for Windows 7 users
Here is the solution specifically for Windows 7 users so they can easily install and use the app.

* Begin with opening the ‘Start menu’ in Window 7 and navigate to the ‘Computer.’
* Make a right-click on the ‘Computer’ and select ‘Manage.’
* Move to the server manager and features. Select the ‘Add features’ option.
* Look for the Quality Windows Audio Video Experience service in the ‘Add features’ window. Once you find it, click on Next to proceed.
* To confirm the installation, please ensure to click on the ‘QWAVE’ option.
* Click on the ‘install’ button and let the process complete. When you have installed the app, it is essential to restart your computer to save the changes.

###7. Uninstall and reinstall the Discord
The Discord JavaScript error can also occur while you contain the app on your computer. If this is the case, then uninstalling and reinstalling the app will surely help you.

Follow the steps given below to uninstall and reinstall the Discord;

* Open the windows ‘Start menu’ option and select ‘Search’
Type ‘Control Panel’ and select the very first option that appears.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6aukqvi9u83hyq99y9m8.jpg)
* Click on ‘uninstall the program’ in the control panel.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nrjysc9gdt48m564ae7w.jpg)
* A list of different programs appears, find out the Discord, click on it and select ‘uninstall.’
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ao9ri2k6gv7ls5po5oca.jpg)
* When you successfully uninstalled, make right-click on the Start menu and select ‘run.’
* Next, you have to type in ‘%appdata%’ and click on ‘run.’
* Delete the Discord folder.
* Now type in ‘%localappdata%’ in ‘run’ and delete the Discord folders.
* Now go to Discord’s official website and install the latest version.

##Final overview
Undoubtedly, encountering the Discord JavaScript error while attempting to download the app on your computer is pretty much frustrating because it stops you from getting your hands on the fantastic app. Therefore, in this guide, we have briefly described the possible root causes of the error and the easy doable fixes you can perform to eliminate the Discord JavaScript error.

We hope this article will prove helpful!

**Source**
[https://www.workaroundtc.com/how-to-fix-discord-javascript-error/](https://www.workaroundtc.com/how-to-fix-discord-javascript-error/)

This post was originally published on The [Work Around TC](https://www.workaroundtc.com/)