If you have been using Discord, you must have come across an error titled “A JavaScript error occurred in the main process.” If you do not know what to do, are stuck with this error, and cannot open your Discord, you have come to the right place. This post will guide you on what to do to get Discord running your system once again.

Many other users have also been facing issues while running different programs such as Discord and Skype; when they try to run these programs, a prompt titled “A JavaScript error occurred in the main process” occurs on the screen.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-409.png" data-lazy- height="370" src="data:image/svg xml,” width=”562″>

The error window contains information about the error that a casual user cannot interpret.

This error could be because of several different reasons. The cause of this error can be traced back to one of the following reasons:

  • Corrupt program or settings
  • The Quality Windows Audio Video Experience service is turned off
  • Administrative permissions are enabled on the app

To solve this problem, you can try one of the following methods:

Reinstall your program

If you get this error message, you can try to reinstall the program completely, which is Discord in our case. To reinstall any program on Windows 10, search for the control panel from the search bar located at the right side of your taskbar:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-410.png" data-lazy- height="744" src="data:image/svg xml,” width=”430″>

Now open the control panel and click on Uninstall a program:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-411.png" data-lazy- height="743" src="data:image/svg xml,” width=”1410″>

Then search for Discord and uninstall it by right-clicking on it and then selecting the uninstall option:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-412.png" data-lazy- height="156" src="data:image/svg xml,” width=”953″>

Now reboot your system and download Discord’s latest version from their website, and install it again after it has been completely removed from your system. The error message should not appear anymore.

Remove all the app data from “%AppData%” and “%LocalAppData%” directories

You can also remove all the data related to Discord manually by going to the AppData and LocalAppData folders and removing all the folders related to Discord. To do that, open the Run app from the Start menu or by pressing Win R and search for %AppData%:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-413.png" data-lazy- height="271" src="data:image/svg xml,” width=”452″>

You can also use File Explorer to navigate to the App Data folder using the following path:

C:UsersUSERNAMEAppData

Now locate the Discord folder and delete all of its contents. The AppData folder is hidden; To make it visible, check the Hidden items option from the View menu on File Explorer.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-414.png" data-lazy- height="259" src="data:image/svg xml,” width=”853″>

Now again, use the Run app to go to the Local App Data folder and delete all the files related to Discord:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-415.png" data-lazy- height="274" src="data:image/svg xml,” width=”454″>

You can also go to the following address using File Explorer and do the same thing, i.e., delete all the files related to Discord.

C:UsersabdulAppDataLocal

The operating system might give an error that the program is still running and cannot be deleted. Open the task manager and end all the tasks associated with Discord and try deleting the files again.

Once all the content is deleted, restart your system and install Discord again.

Quality Windows Audio Video Experience service

Press Windows R, type services.msc, and click on the OK button:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-416.png" data-lazy- height="272" src="data:image/svg xml,” width=”454″>

Now look for the Quality Windows Audio Video Experience service from the menu. Once it has been found, right-click on it, then click on the properties option in the menu.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-417.png" data-lazy- height="274" src="data:image/svg xml,” width=”507″>

Now change the Startup type from Manual to Automatic:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-418.png" data-lazy- height="578" src="data:image/svg xml,” width=”504″>

Now select the Apply and then OK button.

Running the app without Administrative privileges

Many users have pointed out that Discord runs properly if they are running it using a normal account instead of an administrative one. So we can try to run Discord without the administrative privileges to eliminate the JavaScript error.

To run Discord without administrative privileges, locate its executable file. You can locate it by searching for Discord in the search bar located on the taskbar of your system and then right-clicking on it to open the file location.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-419.png" data-lazy- height="786" src="data:image/svg xml,” width=”533″>

Now right click on the executable to open the Properties menu:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-420.png" data-lazy- height="673" src="data:image/svg xml,” width=”635″>

Now go to the Compatibility section of the Properties and uncheck the Run this program as an administrator box:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/word-image-421.png" data-lazy- height="663" src="data:image/svg xml,” width=”477″>

Apply the changes and exit the properties menu. Discord will run without administrative privileges from now on, and the error message will stop appearing.

Conclusion

In this write-up, we have discussed four different methods which can be used to fix the: “a JavaScript error occurred in the main process” error on windows. If you receive this error on mac, follow the same procedure: uninstall the app, remove all its data and then reinstall it, and the error should go away.

About the author

<img alt="" data-del="avatar" data-lazy-src="https://kirelos.com/wp-content/uploads/2021/08/echo/7011409B3A384F43A8417D1DAC68D179-150×150.jpg611810cc44ef7.jpg" height="112" src="data:image/svg xml,” width=”112″>

Shehroz Azam

A Javascript Developer & Linux enthusiast with 4 years of industrial experience and proven know-how to combine creative and usability viewpoints resulting in world-class web applications. I have experience working with Vue, React & Node.js & currently working on article writing and video creation.