HomeWindowsA JavaScript Error Occurred in the Main Process Error Fix

A JavaScript Error Occurred in the Main Process Error Fix

Author

Updated On

Reading Time

Windows users are getting an Uncaught Exception error message – A JavaScript error occurred in the main process. It is triggered when they try to launch some apps on Windows 10 including messaging apps Discord and Skype.

The main cause of this error is not really clear, however, the main reason could be that the app, its database or its settings are corrupted.

Here Are Some Possible Causes for this JavaScript Error?

  • App settings or the app itself is corrupted
  • The Quality Windows Audio Video Experience service is not active
  • The app runs with administrator priviledges

How to Fix A JavaScript error occurred in the main process Error?

Method 1 – Run the App without Administrator Privileges

run-windows-app-without-administrator-privileges

For some weird reason, the app actually works when a user is not logged in using an administrator account. It gives away that the cause of this error might be the administrator permissions.

Running Discord for instance, without admin permissions resolved the problem for some users. So, here are some to steps to do it:

  1. Find the Discord executable file and change its properties by right-clicking on it and selecting Properties. Click the Compatibility tab in the Properties window and clear the Run this program as administrator checkbox before applying the changes.
  2. Make sure that you confirm all dialog boxes that appear to confirm your changes, and Discord should now run without administrator permission. Open it by double-clicking on the icon and try to check if the error persists.

Method 2 – Delete the app data folders in %AppData% and %LocalAppData%.

You can try to reset the app settings by deleting the %AppData% and %LocalAppData% folders. By doind this, it is possible to resolve the JavaScript error which is giving you an error when launching the app.

How to delete these two folders? Here’s how to do it:

Run-AppData
  • Launch Windows Explorer and click on This PC and then navigate to the following location:
    • C:\Users\%username%\AppData\
  • Replace the placeholder with the name of the app giving the JavaScript error.
  • Sometimes, you may need to enable the option that allows you to view hidden files and folders in order to see the AppData folder.
  • Delete the app folder in the AppData folder.
  • Next, press the Windows Key + R key combination to launch the Run dialog box. Enter the variable below.
    • %localappdata%
  • Locate the erring app folder in the folder that opens, click Delete.
Run-LocalAppData

Verify if the ‘A JavaScript Error Occurred in the Main Process’ is still there after restarting your computer. One thing to note, it is important to be thorough in this process by making sure that the every file, subfolders in the app folders are totally deleted. There should be no files that should remain in it.

Method 3 – Enable Quality Windows Audio Video Experience Service Automatically

Start-Quality-Windows-Audio-Video-Experience-service-automatically
  1. Press Windows + R
  2. Type in services.msc
  3. Right-click on the Quality Windows Audio Video Experience and select Properties
  4. In the Startup Type drop-down menu, select Automatic

If ever you get an error like this one:

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.

Then you can follow these steps:

  1. Press Windows + R
  2. Type in services.msc
  3. Right-click on the Quality Windows Audio Video Experience and select Properties
  4. Hit the Log On tab
  5. Click the Browse button
  6. In an entry box labeled Enter the object name to select
  7. Type your Microsoft Windows account’s name in it
  8. Press Check Names
  9. Wait for your name to pop up and press Ok
  10. Type in your Windows account’s password in the Password box

Method 4 – Reinstall the App

uninstall-discord-app-windows-10

If a JavaScript error is still persistent and nothing works from the methods above, the last recourse is to try to uninstall the app (Discord or Skype).

Here’s how to do it:

  1. Log in to your PC as an administrator
  2. Open Control Panel
  3. Set the View by to Category and then click Uninstall a program.
  4. Find Discord or Skype and then right-click it to choose Uninstall.

After uninstalling the app successfully, visit the Discord or Skype website or go to the Microsoft Store on Windows 10 to download and reinstall the latest version.

Conclusion

By following these methods we have listed above, we hope that the “A JavaScript error occurred in the main process” problem will be completely gone and fixed.

READ MORE ON:

Windows Dispatch is a website supported by its readers & community. Some pages may contain affiliate links which may allow us to earn a little money when you buy through them.

Eddie Mendoza Jr
Eddie Mendoza Jr
Eddie has a degree in Information Technology with a natural inclination towards troubleshooting devices. With more than 10 years of blogging experience in different niches, he has found it most satisfying when writing easy-to-follow guides and simplified articles related to computers, smart TVs, mobile devices and Internet-based services.

Further Readings

1 COMMENT

  1. If the steps above did NOT work for you, open “Add or Remove Programs” and check for “Microsoft Visual C++ 2015 Redistributable” (x86/x64). You will get a similar error if that’s missing, but either the Messenger installer doesn’t properly check for it or that part of the install can fail silently.

    If you’re missing the 2015 redistributable, you can get it from Microsoft here: https://www.microsoft.com/en-ca/download/details.aspx?id=48145 Should fix the problem.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Recent Articles

Trending