How to fix JavaScript Error in Discord

Are you facing a JavaScript error when starting Discord on your system? This error message contains a large amount of information regarding the error which is difficult for any casual user to interpret.

This error may occur due to Discord and its settings going corrupt, or the Quality Windows Audio and Video Experience Service are not running, or Discord is running with administrator permissions. In this article, you can find a list of methods to resolve the issue that is based on either resetting Discord or its settings.

 

Fix 1 – Delete Discord Folders

Many users have reported that deleting Discord folders in %AppData% and % LocalAppData%  has helped them resolve this JavaScript error that prevents you from opening Discord.

1. At first, close Discord by opening Task Manager (Ctrl + Shift + Esc) and ending all the Discord processes using the End Task button.

 

Task Manager End Discord Process Min

 

2. Open Run using Windows key + R. Type %AppData% and click on OK.

 

Appdata Run Min

 

3. If you are unable to see the AppData folder, click on the View tab in the File Explorer’s menu and check the box next to Hidden items in the Show/Hide section.

 



File Explorer View Check Hidden Items Min

 

4. Navigate to the discord folder in AppData. Select the folder and press Delete.

 

Discord App Data Delete Folder Min

 

5. Again open Run, and type %LOCALAPPDATA%  and click on OK.

 

Win + R Run Box Localappdata Ok

 

6. Look for the discord folder, right-click on it, and select Delete.

 

Discord Local Appdata Delete Folder Min

 

7. Make sure the folders are completely deleted and there are no more files in it.

8. Restart your PC  and relaunch the Discord setup file to check if the error still appears.

 

Fix 2 – Change Startup Type of the Quality Windows Audio and Video Experience Service

 

1. To open Windows Services, type services.msc in the Run (Windows key + R) dialog.

 

Run Services Msc

 

2. Search for Quality Windows Audio Video Experience Service in the list of services.

3. Right-click on it and select Properties from the context menu.

 

Services Properties Windows Audio Video Experience Min

 

4. In the General tab, change the Startup Type to Automatic in the service’s properties window.

5. Click on Apply and then on OK to confirm the change.

 

Service General Startup Type Min

 

You may receive an error message when you click on Start to start the service.

"Windows could not start the service on Local Computer. 
Error 1079: The account specified for this service differs from the account specified for other services running in the same process."

In such a case, fix it as mentioned in the steps below:

1. Open the service’s properties window as in Steps 1-3 above.

2. Go to the Log On tab and click on the Browse… button.

 

Serivces Logon Tab Min

 

3. Type your Account’s name in Enter the object name to select box, click on Check Names and wait for the names to be available.

 

Services Logon Select User Min

 

4. Click on OK once done and enter the password in the Password field when prompted for it.

 

Fix 3 – Run Discord without Administrative Privileges

It has been observed by some users that Discord works without issues whenever they are not logged in as an administrator. So users have reported that it is better to run Discord without administrator permissions which helped resolve the problem for them.

1. Find the Discord executable either on the Desktop, Start menu, or the search results window.

2. Right-click on it and choose Properties.

 

Discord Executable Properties Min

 

3. Go to the Compatibility tab and uncheck the box next to Run this program as an administrator option.

4. Click on Apply to confirm the changes and click on OK.

 

Discord Executable Properties Compatibility Tab Min

 

5. Launch Discord without admin privileges and see if the error still appears.

 

Fix 4 – Whitelist Discord Installation Files

All well-known antivirus software blocks Discord installation files altering access to them. One file that is a target of every antivirus app is the discord voice. To fix this issue you need to whitelist the discord files from the Antivirus that is picking up and quarantining these files. The steps for whitelisting differs from one antivirus software to another.

We have listed the steps of whitelisting using Avast Antivirus.

1. Right-click on Avast icon to open Avast. Select Open Avast user interface from the menu that appears.

 

Avast Open Ui Min

 

2. Click on Protection tab and then select Quarantine. It will show all the blocked and quarantined files.

 

Avast Quarantine Min

 

3. Look for Discord files here. When you find them, get your mouse cursor over the files and you will see three dots at the right end.

4. Click on the three dots and select Restore and add an exception.

 

Avast Quarantine Discord Files Restore And Add Exception Min

 

5. Repeat the above step for each Discord file separately.

6.Once you have completed whitelisting, try reinstalling Discord and check if it works.

 

To make the installation process quick and uninterrupted in the future, you will need to place the Discord folder in exception in Avast.

1. Open Avast as mentioned previously.

2. Click on Menu at the upper right corner.

 

Avast Menu Option Min

 

3. Navigate to Settings in the menu that opens.

 

Avast Menu Settings Min

 

4. Click on the General section and select the Exceptions option in it.

5. Click on Add Exception button.

 

Avast General Add Exceptions Min

 

6. Browse to the Discord installation folder.

7. Select Add Exception.

 



Avast Add Discord Folder Exception Min

 

Once you have added the exception, launch Discord and check whether the issue resolves.

 

Fix 5 – Reinstall Discord

Reinstalling Discord is a generic solution to the problem but it has worked for many users who faced this issue. Before trying this fix make sure you are logged in to your system with an admin account else you can’t delete any programs.



1. Open Run and type control to open the Control Panel.

 

control run command

 

2. In Control Panel, select View by: Category at the top right corner.

3. Click on Uninstall a Program under the Programs sections.

Control Panel Uninstall Program Min

 

4. Locate Discord in the list of installed programs on your system.

5. Right-click on Discord and select Uninstall.

 

Uninstall Discord Min

 

6. Uninstall wizard opens up, prompting you to completely remove Discord on your computer.

7. Once the uninstallation process finishes, reinstall Discord by downloading the latest installer from the website.

8. Follow the instruction on the screen to complete the installation process. Now you must be able to start Discord without a JavaScript error.

 

Thanks for reading.

You must now be able to run Discord without the JavaScript error.