Windows - A JavaScript error occurred in the main process

%3CLINGO-SUB%20id%3D%22lingo-sub-1417805%22%20slang%3D%22en-US%22%3EWindows%20-%20A%20JavaScript%20error%20occurred%20in%20the%20main%20process%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1417805%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Everyone%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhile%20installing%20Microsoft%20Teams%2C%20the%20error%20message%20described%20in%20the%20subject%20line%20is%20thrown.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Team%20Window.PNG%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F194414iB059C295C205388F%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Team%20Window.PNG%22%20alt%3D%22Team%20Window.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EAm%20running%20Microsoft%20Windows%20Version%20-%201909%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20couple%20of%20troubleshooting%20tips%20found%20on%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2FMicrosoftTeams%2Ftroubleshoot-installation%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2FMicrosoftTeams%2Ftroubleshoot-installation%3C%2FA%3E%26nbsp%3Bhave%20been%20tried%20but%20the%20error%20still%20shows%20up.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20idea%20on%20how%20to%20resolve%20this%20issue%20will%20be%20greatly%20appreciated.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3EUPDATES%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3EI%20did%20a%20comparison%20of%202%20SquirrelSetup.log%20files.%20(Both%20PC%20runs%20Windows%201909%20and%20the%20same%20build%20number.%3C%2FP%3E%3CP%3EThe%20PC%201(Throwing%20up%20the%20JavaScript%20error%20above)logged%20some%20issues%20not%20found%20in%20the%20PC%202%20as%20shown%20below%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E----start----%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EApplyReleasesImpl%3A%20Couldn't%20run%20Squirrel%20hook%2C%20continuing%3A%20C%3A%5CUsers%5CAdministrator%5CAppData%5CLocal%5CMicrosoft%5CTeams%5Ccurrent%5CTeams.exe%3A%3CBR%20%2F%3ESystem.OperationCanceledException%3A%20The%20operation%20was%20canceled.%3CBR%20%2F%3Eat%20System.Threading.CancellationToken.ThrowOperationCanceledException()%3CBR%20%2F%3Eat%20Squirrel.Utility.%26lt%3B%26gt%3Bc__DisplayClass11_0.%3CINVOKEPROCESSASYNC%3Eb__0()%3CBR%20%2F%3Eat%20System.Threading.Tasks.Task.InnerInvoke()%3CBR%20%2F%3Eat%20System.Threading.Tasks.Task.Execute()%3CBR%20%2F%3E---%20End%20of%20stack%20trace%20from%20previous%20location%20where%20exception%20was%20thrown%20---%3CBR%20%2F%3Eat%20System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task%20task)%3CBR%20%2F%3Eat%3CBR%20%2F%3ESystem.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotificat%20ion(Task%20task)%3CBR%20%2F%3Eat%20Squirrel.Utility.%3CINVOKEPROCESSASYNC%3Ed__11.MoveNext()%3CBR%20%2F%3E---%20End%20of%20stack%20trace%20from%20previous%20location%20where%20exception%20was%20thrown%20---%3CBR%20%2F%3Eat%20System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task%20task)%3CBR%20%2F%3Eat%3CBR%20%2F%3ESystem.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotificat%20ion(Task%20task)%3CBR%20%2F%3Eat%3CBR%20%2F%3ESquirrel.UpdateManager.ApplyReleasesImpl.%26lt%3B%26gt%3Bc__DisplayClass18_1.%26lt%3B%3CINVOKEPOSTINSTA%20ll%3D%22%22%3Eb__2%26gt%3Bd.MoveNext()%3C%2FINVOKEPOSTINSTA%3E%3C%2FINVOKEPROCESSASYNC%3E%3C%2FINVOKEPROCESSASYNC%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E---end----%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3EFURTHER%20UPDATES%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23339966%22%3EMany%20suggestions%20found%20on%20GitHub%2C%20Microsoft%20support%20site%2C%26nbsp%3Bblogs%20and%20other%20websites%20have%20been%20tried.%20So%20after%20spending%20several%20hours%20googling%20and%20searching%20for%20a%20working%20solution%2C%20the%20following%20finally%20worked%20on%20the%20PC%20in%20question.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CUL%3E%3CLI%3E%3CFONT%20color%3D%22%23339966%22%3EA%20standard%20user%20account%20was%20created%20on%20the%20PC.%3C%2FFONT%3E%3C%2FLI%3E%3CLI%3E%3CFONT%20color%3D%22%23339966%22%3EDownloaded%20a%20new%20Microsoft%20teams%20app.%3C%2FFONT%3E%3C%2FLI%3E%3CLI%3E%3CFONT%20color%3D%22%23339966%22%3EIn%20services.msc%2C%20the%20status%20of%20a%20service%20called%20%3CSTRONG%3EQuality%20Windows%20Audio%20Video%20Experience%3C%2FSTRONG%3E%20was%20also%20manually%20started.%3C%2FFONT%3E%3C%2FLI%3E%3CLI%3E%3CFONT%20color%3D%22%23339966%22%3EExecuted%20the%20app%20and%20no%20JavaScript%20error%20was%20thrown.%3C%2FFONT%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23FF0000%22%3EN.B%3A%26nbsp%3B%3C%2FFONT%3E%3C%2FSTRONG%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CFONT%20color%3D%22%23000000%22%3EI%20am%20still%20not%20satisfied%20with%20this%20fix%2C%20cos%20i%20applied%20the%20same%20troubleshooting%20approach%20on%20another%20PC%20throwing%20up%20the%20same%20JavaScript%20error%2C%20and%20the%20fix%20doesn't%20work%20on%20it.%20%3A)%3C%2Fimg%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1417805%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdministrator%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EBest%20Practices%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EHow-to%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETips%20%26amp%3B%20Tricks%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1893655%22%20slang%3D%22en-US%22%3ERe%3A%20Windows%20-%20A%20JavaScript%20error%20occurred%20in%20the%20main%20process%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1893655%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F672945%22%20target%3D%22_blank%22%3E%40Sylvester_hash%3C%2FA%3E%26nbsp%3B%20If%20everything%20has%20been%20tried%20then%20try%20these%20basic%20steps.%3C%2FP%3E%3CP%3E1.%3CSTRONG%3E%20Start%20application%20without%20admin%20rights%3C%2FSTRONG%3E%20-%20Right-click%20on%20the%20app%20and%20choose%20properties%2C%20click%20on%20the%20compatibility%20tab%20and%20%3CSTRONG%3Euncheck%3C%2FSTRONG%3E%20the%20box%20of%20%22%3CSTRONG%3Erun%20as%20administrator%3C%2FSTRONG%3E%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E2.%20%3CSTRONG%3ERestore%20your%20computer%3C%2FSTRONG%3E%20-%20If%20nothing%20works%2C%20restore%20your%20computer%20to%20the%20previous%20date%20when%20it%20was%20working%20fine.%20Open%20RUN%20box%20and%20type%20%3CSTRONG%3Erstrui.exe%3C%2FSTRONG%3E%20and%20click%20ok.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2119430%22%20slang%3D%22en-US%22%3ERe%3A%20Windows%20-%20A%20JavaScript%20error%20occurred%20in%20the%20main%20process%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2119430%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F672945%22%20target%3D%22_blank%22%3E%40Sylvester_hash%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1)%20Open%20Control%20Panel%20%26gt%3B%20Uninstall%20a%20program%3C%2FP%3E%3CP%3E2)%20Locate%20latest%20Microsoft%20Visual%20C%2B%2B%20(64bit)%20and%20click%20on%20Change%20(If%20you're%20using%2064%20bit%20version%20of%20Teams%2C%20maybe%20you%20need%20x86)%3C%2FP%3E%3CP%3E3)%20Click%20on%20Repair%3C%2FP%3E%3CP%3E4)%20Enter%20your%20Admin%20credentials%20to%20perform%20repair%3C%2FP%3E%3CP%3E5)%20Once%20repaired%20Launch%20Teams%20app%20to%20make%20sure%20it%20works%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2192546%22%20slang%3D%22en-US%22%3ERe%3A%20Windows%20-%20A%20JavaScript%20error%20occurred%20in%20the%20main%20process%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2192546%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F961265%22%20target%3D%22_blank%22%3E%40d112296a%3C%2FA%3E%26nbsp%3Bthis%20seems%20to%20have%20fixed%20it%20for%20me%2C%20thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2192666%22%20slang%3D%22en-US%22%3ERe%3A%20Windows%20-%20A%20JavaScript%20error%20occurred%20in%20the%20main%20process%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2192666%22%20slang%3D%22en-US%22%3ETnkhs%2C%20works%20for%20me.%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello Everyone,

 

While installing Microsoft Teams, the error message described in the subject line is thrown.

 

Team Window.PNG

Am running Microsoft Windows Version - 1909

 

A couple of troubleshooting tips found on https://docs.microsoft.com/en-us/MicrosoftTeams/troubleshoot-installation have been tried but the error still shows up.

 

Any idea on how to resolve this issue will be greatly appreciated.

 

UPDATES

I did a comparison of 2 SquirrelSetup.log files. (Both PC runs Windows 1909 and the same build number.

The PC 1(Throwing up the JavaScript error above)logged some issues not found in the PC 2 as shown below:

 

----start----

 

ApplyReleasesImpl: Couldn't run Squirrel hook, continuing: C:\Users\Administrator\AppData\Local\Microsoft\Teams\current\Teams.exe:
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at Squirrel.Utility.<>c__DisplayClass11_0.<InvokeProcessAsync>b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotificat ion(Task task)
at Squirrel.Utility.<InvokeProcessAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotificat ion(Task task)
at
Squirrel.UpdateManager.ApplyReleasesImpl.<>c__DisplayClass18_1.<<invokePostInsta ll>b__2>d.MoveNext()

 

---end----

 

FURTHER UPDATES

Many suggestions found on GitHub, Microsoft support site, blogs and other websites have been tried. So after spending several hours googling and searching for a working solution, the following finally worked on the PC in question.

 

  • A standard user account was created on the PC.
  • Downloaded a new Microsoft teams app.
  • In services.msc, the status of a service called Quality Windows Audio Video Experience was also manually started.
  • Executed the app and no JavaScript error was thrown.

N.B: I am still not satisfied with this fix, cos i applied the same troubleshooting approach on another PC throwing up the same JavaScript error, and the fix doesn't work on it. :)

 

7 Replies

@Sylvester_hash  If everything has been tried then try these basic steps.

1. Start application without admin rights - Right-click on the app and choose properties, click on the compatibility tab and uncheck the box of "run as administrator"

 

2. Restore your computer - If nothing works, restore your computer to the previous date when it was working fine. Open RUN box and type rstrui.exe and click ok.

@Sylvester_hash 

 

1) Open Control Panel > Uninstall a program

2) Locate latest Microsoft Visual C++ (64bit) and click on Change (If you're using 64 bit version of Teams, maybe you need x86)

3) Click on Repair

4) Enter your Admin credentials to perform repair

5) Once repaired Launch Teams app to make sure it works

@d112296a this seems to have fixed it for me, thanks!

Tnkhs, works for me.
This worked for me.

@d112296a This also worked for me thank you

www.000webhost.com