a javascript error occurred in the main process, Unity hub
After I installed Unity hub and tried to Launch it in Windows 10 , «a javascript error occurred in the main process» appeared. Anyone encountered the same error? How to fix it?
84.7k 9 9 gold badges 81 81 silver badges 116 116 bronze badges
asked Apr 5, 2021 at 9:30
1,081 4 4 gold badges 21 21 silver badges 38 38 bronze badges
Do you have multiple accounts on your PC? Access is denied sounds like UnityHub is trying to read/write something in the AppData of another user?
Apr 5, 2021 at 13:33
No, there is only one account and I have also tried to run it as administrator.
Apr 5, 2021 at 14:45
1 Answer 1
It happen to me too (still not solved). I have an user and an admin account (the originary one) in Windows 10 (Professional). At first I installed Unity Hub in the user account (as administrator) and this error came out. I tried to remove Unity Hub and to reinstall in the «admin» account. Now I can use Unity Hub in the admin account but it still give the error in the user account.
answered Mar 17, 2022 at 11:42
Sergio Pinarello Sergio Pinarello
Highly active question. Earn 10 reputation (not counting the association bonus) in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity.
- windows
- unity-game-engine
- windows-10
-
Featured on Meta
Related
Hot Network Questions
Subscribe to RSS
Question feed
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.11.21.1314
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.
Решение проблемы JavaScript error occurred in the main process
Ошибка JavaScript error occurred in the main process появляется по причине некорректной работы Discord – программы для голосового общения. Появляется ошибка JavaScript error occurred in the main process на экране пользователя в случае того, если поврежден или отсутствует файл программы Discord.
Причины ошибки JavaScript error occurred in the main process
- Конфликт Discord с другим программным обеспечением на ПК;
- старая версия Discord удалена не полностью;
- устаревшие компоненты Windows;
- наличие вируса.
Способы решения JavaScript error occurred in the main process

Способ №1 Обновление Discord
Одной из причин появления ошибки является отсутствие необходимого обновления в программе Discord. В случае отключенного автоматического обновления, вам необходимо обновить Discord вручную, а для этого нужно сделать следующее:
- откройте Диспетчер задач и отключите все процессы с именем Discord;
- нажмите Windows+R и введите %AppData%;
- откройте папку «AppData», а затем откройте папку «Local»;
- откройте папку с именем Discord;
- запустите файл исполнительный файл Update.exe.
После обновления Discord убедитесь в отсутствии возникновения проблемы.
Способ №2 Полная переустановка Discord
- Откройте Диспетчер задач и отключите все процессы с именем Discord;
- откройте Панель управления, перейдите в раздел Программы и компоненты и удалите ПО Discord;
- откройте папку «AppData», далее откройте папку «Local» и полностью удалите папку «Discord»;
- откройте папку «AppData», далее откройте папку «Roaming» и полностью удалите папку «Discord;
- повторно установите программу Discord.
Полная переустановка Discord устраняет ошибку JavaScript error occurred in the main process.
Способ №3 Проверка антивирусом
Для того чтобы проверить программу Discord на наличие вредоносного ПО, откройте Диспетчер задач, отключите все процессы с именем Discord и запустите Антивирус. Во избежание появления подобной ошибки открывайте программу от имени администратора. Надеемся, что данная статья была вам полезна в устранении ошибки JavaScript error occurred in the main process.
A JavaScript error occurred in the main process message on Windows 11/10
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
- 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:
The 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!
FIX: A Javascript Error Occurred in the Main Process [Discord]
Note that as a last resort, you may reinstall the Discord app
Software Managing Editor
Eager to help those in need, Teodor writes articles daily on subjects regarding Windows, Xbox, and all things tech-related. When not working, you may usually find him either. read more
Updated on October 4, 2023
- We recommend automatically starting the Quality Windows Audio Video Experience service to solve a Javascript error occurred in the main process.
- Running your program without administrative privileges might also help.
- You should delete some Discord folders if a JavaScript error occurred in the main process.

If you’re an avid user of online chatting apps such as Skype or Discord, there’s a chance you may encounter errors. Such an error is A Javascript error that occurred in the main process.
Many people complained about this problem. We understand how annoying it can be, especially if you constantly use Discord to keep in touch with your friends.
That is why we prepared a dedicated guide to teach you how to fix this Javascript error and get back to using the Discord app without any worries.
What causes a JavaScript error occurred in the main process?
Before getting into the main subject of this guide, here are the most common reasons why this JavaScript error can occur in the main Discord process:
- Corrupt program files – If your program or its settings have gone corrupt, this error and others may be triggered.
- Deactivated services – The most common service related to this error is the Quality Windows Audio Video Experience service. If it is not enabled, you may expect this error.
- Access levels – If you run the app without administrator permissions, you may have restrictions that could trigger this error in some cases.
Now that everything is clear let’s see what are the most efficient ways to get rid of this problem.
How do I fix a JavaScript error occurred in the main process on Discord?
In this article
- What causes a JavaScript error occurred in the main process?
- How do I fix a JavaScript error occurred in the main process on Discord?
- 1. Automatically start the Quality Windows Audio Video Experience service
- 2. Run your program without administrative privileges
- 3. Delete your program’s folders from %AppData folder
- 4. Re-install your program
1. Automatically start the Quality Windows Audio Video Experience service
- Use the following keyboard shortcut: Windows + R .
- Type in services.msc, then hit the Enter key.

- Scroll down the list until you see Quality Windows Audio Video Experience.

- Right-click on it and select Properties.

- In the Startup Type drop-down menu, select Automatic.

- Press on OK then quit the window.
Even if this option is extremely efficient, there is a slight chance you may get an error labeled:
How we test, review and rate?
We have worked for the past 6 months on building a new review system on how we produce content. Using it, we have subsequently redone most of our articles to provide actual hands-on expertise on the guides we made.
Windows could not start the service on Local Computer. Error 1079: The account specifies for this service differs from the account specified for other services running in the same process.
If this happens, proceed as follows:
- Press Windows + R , type services.msc, then hit the Enter key.

- Scroll down the list until you see Quality Windows Audio Video Experience, then select Properties.

- Go to the Log On tab.

- Click the Browse button.

- You’ll see an entry box labeled Enter the object name to select, type your Microsoft Windows account’s name in it, then press on Check Names.

- Wait for your name to pop up and press OK.
- Type in your Windows account’s password in the Password box.
2. Run your program without administrative privileges
- Locate your program’s executable, then right-click on it and select Properties.

- Navigate to the Compatibility tab, then uncheck the box next to Run this program as an administrator.

- Press on OK.
3. Delete your program’s folders from %AppData folder
1. Use the following keyboard shortcut: Windows + E .
2. Navigate to This PC .

3. Go to the location below, replacing the word afamo with your username.
C:\Users\afamo\AppData\Roaming\discord
4. Right-click on the Discord folder , then select Delete . If you get an error message stating that the program can’t be deleted because it is in use, enter the Task Manager and end it first.

A quick fix for the a Javascript error in the main process issue is to delete Discord’s folders from the AppData folder on your PC. This can be done manually in a few clicks.
This is similar to the steps above, except you manually delete all of the program’s data from your PC.
Read more about this topic
- How to Fix the Discord Fatal Javascript Error on Windows 11?
- Discord Rules Screening Not Working: 5 Ways to Fix it
- Midjourney Internal Server Error: How to Fix it
4. Re-install your program

- Hit the Windows key, then type Discord.
- Right-click on it, then select Uninstall.
- Once the uninstall process is finished, download the latest Discord version from the official website.
- Click on the downloaded file and follow the installation wizard.
However, a simple uninstall does not always entirely delete all traces of the software’s files, directories, and registry entries, and they remain on your computer.
While this may not seem like a big deal at the moment, it might lead to problems later on.
In this case, we strongly recommend using checking the best uninstaller software for Windows 10 PCs. These options will eliminate all traces and leftovers of Skype or Discord, allowing you to reinstall it safely.
We ensured to deliver only the most efficient solutions. If you followed the steps closely, the Javascript error in the main process should now be solved.
Note that users have experienced a Javascript error that occurred in the main process with Visual Studio code, Teams, Faceit, and Steam, and some of these solutions may be adapted.
If you have any other additional questions regarding the a Javascript error occurred in the main process in Discord issue, do not hesitate to use the comment section below.
- Discord
- Javascript
