Some users are reporting a generic error message – A JavaScript error occurred in the main process, Uncaught Exception that is triggered when they try to launch some apps on Windows 11/10. In this post, we will show you how to resolve this issue. There aren’t many determined causes for this problem, however, the main reason can be that the app, its database or its settings have most likely gone corrupt.
A JavaScript error occurred in the main process
If you receive A JavaScript error occurred in the main process, Uncaught Exception message when you try to open apps like Skype, Discord, etc, in Windows 11/10, then you can carry out the following suggestions:
- Delete the app data folders in %AppData% and %LocalAppData%.
- Re-register the JavaScript dll file.
- Reinstall Skype, Discord, etc, app that is having problems.
Now let’s see how you can apply this solution(s) in practice.
1) Delete the app data folders in %AppData% and %LocalAppData%.
Deleting the %AppData% and %LocalAppData% folders should reset the app settings and possibly resolve the JavaScript error which is preventing you from opening the app.
Here’s how you can delete these folders:
Launch Windows Explorer and click on This PC and then navigate to the following location:
C:\Users\%username%\AppData\<app>
The <app> place-holder should be the name of the app throwing up the JavaScript error.
If you are unable to see the AppData folder, you may need to turn on the option that enables you to view hidden files and folders.
Delete the app folder in the AppData folder.
Next, press the Windows Key + R key combination in order to bring up the Run dialog box. Type in the environment variable below and hit Enter.
%localappdata%
Locate the problematic app folder in the folder which opens, right-click on it, and click Delete.
Make sure that the folders are completely deleted and that there are no more remaining files in it. Check to see if the ‘A JavaScript Error Occurred in the Main Process’ still appears after restarting your computer and you launch the app.
2) Re-register the JavaScript dll file
Registering the JavaScript DLL file using the built-in Regsvr.exe could help. To do this, open a Command Prompt as an administrator, type the following and hit Enter:
regsvr32 jscript.dll
3) Reinstall the app in question
Although from one of our case scenarios presented above, the user stated that reinstalling the app didn’t fix the issue. Nevertheless, we still recommend you try to uninstall then reinstall the app.
I hope this helps you resolve this JavaScript error!