Discord is a free audio, video, and text chat service used by tens of millions of people of all age groups to communicate and socialise with their friends and communities.
It’s home to communities of various sizes and stature, but it is most popular amongst small, active groups of people who interact on a daily basis namely, gaming groups, fandoms, etc.
It can get very annoying when you are cut off from your online friends because of pesty errors that block you from connecting to your Discord servers.
Well, Fret not! For this thoroughly curated guide will walk you through how to troubleshoot Discord Javascript Error using the latest and easiest ways.
Along with how to fix javascript errors on Discord, we have also provided potential reasons why it happens so, you won’t be startled if this error pops up in the future.
How to Fix Discord Javascript Error
The below-listed solutions are arranged from effective and quickest to comparatively more time-consuming ones. Follow along to troubleshoot your Discord app.
1. Uninstall and Reinstall Discord
This is the easiest and quickest shot you have at fixing all Discord errors. Since Discord data is hosted online, you won’t be losing any data when you delete and reinstall Discord. So, we suggest, you reinstall discord and see if that fixes the error.
Start by restarting your PC and running Discord on bootup. If the error persists, reinstall the Discord app and restart your PC once again.
This time, Discord should boot without any errors. If it doesn’t, read further and try the next solutions.
2. Delete “Discord” folders in %AppData% and %LocalAppData%
Deleting the “Discord” folders %AppData% and %LocalData% folders can help fix the Discord javascript error which is stopping you from booting up the application.
The following steps are suggested on the official Discord support forums. Although it’s listed for a different issue, users seem to have a decent success rate with troubleshooting Discord javascript errors with this methodology.
Either open File Explorer and Go to this location: C:\Users\UserName\AppData\Discord
You may need to enable the “Hidden Items” option under Show/hide from the View Tab in order to be able to see AppData and LocalData.
-OR-
- Tap on the Win key + R to fire up the Run application.
- In the input field type in %AppData% and hit Enter. It will open up the %AppData% location on File Explorer.
- Inside Appdata folder, look for any folders named “Discord”, select them and delete them.
- Do the same with LocalData, input %LocalAppData% in the Run dialogue box, hit enter, browse through select and delete all Discord folders.
If you couldn’t delete them due to “Some files couldn’t be deleted because they are in use”, check all the app instances that are running(Spotify, Chrome, etc) and stop them through the task manager. Try again and it should work.
3. Kill all Discord Processes
Discord will refuse to install sometimes and glitch because of parallel processes that are running. Attempting to install Discord after stopping all the pre-running processes can resolve the situation.
Here’s how to stop all Discord processes:
First, stop Discord from the system tray. You can do it from the little ” ^” shaped button on the Taskbar. Having done that follow along:
- Open Windows Task Manager. Either use the Search function to search for it or use the Ctrl + Alt + T keyboard shortcut.
- Once Task Manager is open, search for all “Discord” Processes >> Select Them >> Click on End Task.
If you are unable to locate all of the processes here’s a quicker and cooler way to do it:
Using the Search function on Windows, search for and fire up Command Prompt with administrator privileges(Right-click and select Run as Administrator).
Then type in this command:
taskkill /f /im discord.exe
After you run this command, all the Discord processes will be ended. Now you can carry on with your Discord installation which we can safely assume, will come through successfully.
4. Run Discord as Administrator
This is the simplest solution we can provide in order to fix Discord errors. However, be aware that this solution is not so effective compared to the rest of the listed ones. It’s still worth a shot so why not.
- Right-Click on the Discord Application shortcut.
- Select Run as Administrator.
You will get a UAC prompt (User Account Control) confirming whether you want to run this program as an admin. Select the Yes option.
If your Discord boots up successfully, here’s what you can do to save yourself time when opening it next time:
- Right-Click the Discord executable.
- Go to Properties
- Under the Compatibility Tab, there will be a check box “Run this program as an administrator”. Select it and click on Okay to accept changes.
The next time onwards you won’t have to manually run Discord as admin.
5. Set Startup Type of Quality Windows Audio Video Experience Service to Automatic
Many users were able to remedy the Discord Javascript error by switching the Quality Windows Audio Video Experience service’s startup type from Manual to Automatic. They also reported that this strategy worked for apps other than Discord in resolving the JavaScript problem! To fix the issue, simply follow the steps below:
- Fire up the Run Application(Win + R). In the input field type in services.msc to start the Windows service manager application.
- Surf through and locate Quality Windows Audio Video Experience Service.
- Right-Click and Select properties from the drop-down menu.
- Under the Properties Tab, set the startup type ot Automatic, Click on Apply and Restart the service.
6. Install Discord Test Builds
If the Discord app doesn’t start at all after your relentless efforts, you can try switching to the PTB(Public Test Build) Discord version. It’s Discord but an experimental build of it. It stores and uses data separately thus, parallelly running PTB Discord alongside regular Discord won’t be an issue.
You can download it from here: PTB Discord.
7. Use Discord Browser Version
Although it does not fix the issue at hand, it still, connects you with your online friends and servers with almost all of the functionalities of the Discord desktop application. You can video call, chat and stream screen, just like you would from the Application.
Note that your streaming experience may be laggy if your system isn’t packed with enough RAM Capacity.
You can access the Discord browser from the official link here: Discord Online.
So, Why does Discord Javascript Error actually happen?
The Javascript error most commonly occurs in two scenarios: when starting Discord after your PC boots up Or when Discord auto-installs an update. It shows you a dialogue box titled Discord “A Javascript error occurred in the main process”, “Uncaught Exception: Object Has been Destroyed” or “A fatal Javascript error occurred”.
The dialogue box further contains details about the error which may seem greek to the average joe. It is debugging information that is meant to be analysed by experts only.
In layman’s, the debug info is potentially pointing towards:
- Discord internal settings may have become corrupt — The Discord installation is to blame in this scenario, so either reset its settings or reinstall the software.
- The service Quality Windows Audio Video Experience is not active — It is closely linked and critical to Discord and many other programs’ fundamental functioning. Make sure it auto-starts on boot up.
- Running Discord with administrator permissions is known to cause glitches. On the contrary, running Discord as admin can also fix it. So, make sure you play around with disabling / enabling this option.
That’s all for this guide. Discord rarely goes corrupt but when it does it can cause you a bad headache.
We hope that the above listed 7 Solutions were useful to resolving your situation. Have any queries? Comment down below or Leave a thanks if it helped!