Enter your email address below and subscribe to our newsletter

How to Fix “A Javascript Error Occurred in the Main Process” in Windows 10

Share your love

Each new Windows 10 update brings new issues with it. From the blue screen of death to DNS issues, we have faced so many errors. Many Windows 10 users have recently reported another uncaught exception javascript error while working with apps like Discord and Skype. You will see an error message saying a javascript error occurred in the main processes when you open these apps. It is the most frustrating issue among all other javascript errors.

Reasons for JavaScript Error

The exact cause is still a topic of research, but wrong app settings or damaged app files could be the reason. Some users have reported that they fixed the issue just by reinstalling the Discord app. So the issue could be with the wrong app installation also.

If your Windows audio-video experience service is disabled, then you can see this javascript error message, because this service is connected to that app’s core functionality of video and audio.

How to Fix A Javascript Error Occurred in the Main Process

Whatever the reason is, this article will help you to fix this javascript error message on Windows 10.

Solution 1: End All App Processes

Try killing all app services using the task manager. When you open any app, it will start many background services related to that app. Due to these background services, you can face issues like this. So you have to identify the service which is causing the issue and kill it. In windows 10, you can force stop any app or service using the task manager utility.

Step 1: Open Run command box with Win + R and then type “taskmgr” command > press enter. This command will open the task manager.

Step 2: Find all services related to Discord and click on End Process.

Step 3: Now restart your Windows and then restart your Discord app again. This will restart all the Discord services and most probably fix the issue.

Solution 2: Delete Discord App Data

If the issue is related to the App data or damaged files, then deleting app data can fix this JavaScript issue. When you delete these files, it will reset all App settings. Many Discord users have reported that deleting the APPDATA and localappdata folder helped them to resolve the issue.

Here are the steps to delete the APPDATA folder.

Step 1: Open file explorer with Win + E key on your keyboard and then go to your OS installation drive. In my case, it is a C drive.

Step 2: Then go to Users and then open your user folder (your computer name). In my case, it is “Rahul.”

Step 3: Now, open the AppData folder. If you can’t see it, then you have to enable the “hidden items” option in the folder settings.

To enable it, click on the View tab in file explorer > enable checkbox “hidden items“. Now you can see all hidden files and folders.

Step 4: Open the AppData folder and then open the Roaming folder. Here you can see the discord folder.

You can directly go to the Roaming folder directory with this path.


Step 5: Right-click on the discord folder and delete it.

If it says “some files couldn’t have been deleted,” then it is because your app is running in the background. You have to force close it using the task manager. Open task manager from taskbar > find discord app > Right-click on it and choose End task.

Now delete the discord folder.

Now let’s delete the localappdata folder.

Step 1: Open the Run command box with Win + R key.

Step 2: Type “%localappdata%” > press enter.

Step 3: Find the discord folder here and delete it.

Now open the Discord app again and see if it is working fine or not. If you are still facing the same javascript error, then try other solutions.

Solution 3: Change the Startup Type of Windows Audio Video Experience Service

As we mentioned above, the Windows Audio Video Experience service is directly connected with the core functions of any app like Discord, Spotify, and Skype. If this service is disabled or set to manual mode, you can face issues like this. Changing the startup type from manual to automatic can resolve the error. So let’s get started.

Step 1: Open Run with the Win +R key on the keyboard.

Step 2: Type the “services.msc” command and then press enter. This command will open the services window.

Step 3: Here, find the “Quality Windows Audio Video Experience” service.

Step 4: Then right-click on it and select Properties from the list of options.

Step 5: If the service is already running, then stop it with the Stop button.

Step 6: Wait for some time and then click on the Start button again to start the service.

Step 7: Find the Startup type option and select “Automatic” from the list. Then click on Apply and OK to save the changes. 

Many users have commented that they received the following error message after changing the startup type to automatic:

“Windows could not start the service on Local Computer. Error 1079…”

To fix the issue, follow these steps:

Follow the same steps as mentioned above to open Windows services.

Then click on Log On tab > click on Browse.

Enter your computer name in the “Enter the object name to select” box > click on Check Names and wait for some time. It will find and list your name here.

Click OK, and you are good to go.

Now try to open your app again. It should start without any problem.

Solution 4: Run App without Admin Permission

This kind of Javascript error is very common when you tried to run the application with administrator permission. Most of the time, JavaScript applications are opened using the Java applet file with admin privileges. To fix this kind of error, you should first close all the Javascript applications that were open with administrator privileges and then restart your computer to allow Javascript to start normally again. If you are using the Discord app with Administrator access, then you can face this issue. Many Spotify and Discord users have noticed that it works completely fine whenever they open an app without administrator rights.

Also, it is not a good practice to run any app with administrator rights. Follow these steps to remove admin rights.

Step 1: Right-click on the Discord app on your Desktop and choose properties.

Step 2: Now click on the Compatibility tab > uncheck the “Run this program as an administrator” box and click on Apply.

Step 3: Now, open the Discord app.

Solution 5: Reinstall Discord

Reinstalling the app can fix all major issues related to the app. If you face this issue with your Discord app or any other app, try to reinstall it. The majority of people have fixed the issue just by reinstalling the app. So you can try it too. Note that it will remove all app data and reset all app settings. Follow these steps to reinstall the Discord app.

Step 1: Open the start menu with the Windows button on your keyboard and then search for the control panel.

Step 2: Click on uninstall a program.

Step 3: Now, find the Discord app and right-click on it > choose Uninstall.

Uninstall a program using Windows Settings

If you are using the Windows setting app then here are the steps:

Step 1: Open Windows settings with Win + I key.

Step 2: Now click on Apps.

Step 3: Find the Discord app from the list of installed softwares and click on it.

Step 4: Click on Uninstall.

Once Discord is removed from your system, restart your PC or laptop.

Then download the latest version of the Discord app and install it.

Login to your account and check if the issue is resolved or not. The Javascript error should be fixed now.

Related Posts:


We hope that A JavaScript error that occurred in the main process error is fixed now on your Windows 10 computer. We have shared all working solutions, which are working fine and safe.

Share your views in the command box, and feel free to ask any questions related to this topic.

Share your love
Rahul Patel
Rahul Patel

Rahul is a blogger and a tech geek. By reviewing the latest technology and finding the solution of pesky errors, he feels immense pleasure. Driven by his innate interest in blogging, he adapted blogging as a full-time profession 4 years ago.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!