This JavaScript error is more popular in the Discord app, but can as well show up in other messenger apps like Skype. The error shows up when you tried to launch the app or when in use, a window will show up with the title error “a JavaScript error occurred in the main process“. More details of the error will be displayed showing areas and path affected or that caused the problem.
Causes Of “a JavaScript error Occurred In The Main Process”:
- Changing Discord configurations incorrectly. If that’s the case, resetting default settings will help you fix the problem quickly. In some cases you have to reinstall the app.
- Windows Audio Video Experience service isn’t running. This is another major cause of this JavaScript error in Discord. This windows service is needed by Discord and has to be set to run Automatically.
- Discord is set to run with Administrator permissions. When the setting is configured to run discord on administrator permissions, the ‘JavaScript error occurred in the main process’ often shows up. You need to remove Administrator privileges if you want to fix the problem.
How To Fix “a JavaScript Error Occurred In The Main Process” In Discord
1. Delete Discord Temporary Files
Discord continuously store temporary files that can interfere with the app’s operation, deleting them can solve the problem. Here is how to delete discord temporary files;
- Open windows explorer and paste this path in windows explorer address bar: ‘C:\Users\YOURUSERNAME\AppData\Discord’. Don’t forget to replace ‘YOURUSERNAME’ in the path with your PC name.
- There should be ‘appdata’ folder and if not available you need show hidden files, and you can do so by clicking on ‘view’ tab from file explorer menu, you then click on ‘Hidden items’ to check the box. All hidden files will be displayed and you’ll be able to view ‘AppData’.
- Discord folder will be listed in the ‘AppData’ folder, you need to delete this folder, you might receive a message that some files can’t be deleted because they’re in use, in this case you have to ensure Discord app is closed and restart your PC before you complete this step, also close Spotify app if it’s running.
- Another effective way to remove app data is by opening Run dialogue and typing ‘% localappdata%’, click OK.
- Discord will be listed inside the folder that will open, delete this folder by right clicking on it.
- Restart your PC now, to see if the problem is solved.
2. Whitelist discord in your antivirus software
Some antivirus software or even windows firewall can block some Discord files which cause the problem in the functioning of the app. Whichever antivirus software you’re you need to check your setting give permissions for Discord.
3. Change windows Audio Video Experience services settings
This service if not running, Discord can’t work properly. So you need to check the startup type for ‘windows audio video experience services’ settings to see if the problem is solved. The configuration on startup should be changed from Manual to Automatic, and here are the steps to change that;
- Press windows + R to open run Dialogue.
- Type ‘msc’ in the dialogue box.
- There would be a list of windows services, you need to find ‘Quality Windows Audio Video Experience Service’ , right-click on it and select properties.
- You’ll be able to see whether it’s running or not, if it’s running you should click ‘Stop’ and click ‘Start’ to run it again.
- Check whether the startup type is set as Automatic, if not you need to change it to automatic. Click ok for any dialogue box that will appear.
In some cases, you might receive error message that reads:
‘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.’
You need to follow these steps in order to bypass this error;
- Open run as usual by typing Windows + R keys.
- Type or paste ‘msc’ and click OK.
- Locate ‘Quality Windows Audio Video Experience’, right-click on it and select properties.
- Click the ‘Log On’ tab.
- Click on ‘Browse’ button.
- In the entry box enter your Windows account name.
- Click check names.
- Your computer name will show up; you should click OK.
- You then type your windows password in the box provided.
4. Set discord to run without administrator privileges
As we’ve mentioned earlier, setting administrator privileges can cause the error ‘JavaScript error Occurred In The Main Process’, you need to change your app settings for things to work smoothly.
Here is how to fix this problem;
- Locate Discord executable, either from the start menu or by typing its name in Windows search.
- Right click on discord executable and select properties.
- On the properties window, there is Compatibility tab, you need to uncheck the box which display ‘Run this program as administrator’.
- Click apply changes.
- Confirm any dialogue box that shows up.
- Restart your pc now and launch discord to see if the problem is solved.
5. Reinstall Discord
By now if the error isn’t gone, you need to reinstall the app again, and before the new Discord installation, you need remove the app from your PC, remove all files associated with discord. The best way to uninstall is through Control Panel, select ‘programs and features’, locate discord and uninstall.
After that, you now download new setup files from discord website since it’s free. Trace your Discord setup and start the installation, once finished, you’ve now completely install new Discord app on your Pc and it shouldn’t have any problem. If there is still error problem, then the error definitely has to do with your system settings. And we’ve already outlined all the possible solutions to that.
These are so far the solutions for getting rid of “a JavaScript error Occurred In The Main Process” in Discord, and we hope they’re helpful to you in getting rid of this error. Don’t forget to share your thoughts in the comment box below.