Microsoft Teams can be used via the official desktop app, and it can be used from any modern browser. On the surface, it appears to be a simple app and the UI would have you believe that it doesn’t need much to run. Normally, any system that can run Microsoft 365 apps can run Microsoft Teams without any trouble. That said, Microsoft Teams is notorious for problems when users try to sign in.
Microsoft Teams an error has occurred in the script on this page
Microsoft Teams doesn’t have a lot of dependencies. Most runtimes or libraries that it needs in order to work are already installed on your system. The app doesn’t support macros or add-ins, and you cannot run scripts within the app which is why the ‘an error has occurred in the script on this page’ error that appears when you try to log in is an odd one.
The ‘an error has occurred in the script on this page’ error isn’t generated by Microsoft Teams. It is a problem with your system that happens to trigger each time you try to login to the app. The trick is to be able to dismiss it and proceed with login.
Hide script errors
Windows 10 gives users the option to hide messages for script errors.
- Open File Explorer.
- Paste the following in the location bar, and tap Enter.
Control Panel\Network and Internet
- Click Internet Options.
- Go to the Advanced tab.
- Scroll down to the ‘Browsing’ section.
- Uncheck ‘Display a notification about every script error’.
- Uncheck ‘Disable script debugging (Internet Explorer)’.
- Uncheck ‘Disable script debugging (Other)’.
- Click Apply.
- Sign in to Microsoft Teams.
Note: This will only hide the errors. You should look up other parameters of the error, and resolve it.
Disable startup items and third-party services
It is possible that there are other apps and services running on the system that trigger this error and prevent you from signing into Microsoft Teams. A quick fix is to disable everything. You can later enable them, one-by-one, until you can figure out what’s causing the problem.
To disable services;
- Tap the Win+R keyboard shortcut to open the run box.
- In the run box, enter msconfig, and tap enter.
- Go to the Services tab.
- Click the ‘Hide all Microsoft services’ option at the very bottom.
- Select all remaining services.
- Click ‘Disable all’.
To disable startup items;
- Right-click the taskbar and select Task Manager from the context menu.
- Go to the Startup tab.
- Select each item, and click ‘Disable’.
- Restart the system.
- Open Microsoft Teams and log in.
If you see the ‘an error has occurred in the script on this page’ error message when logging into Microsoft Teams, it is possible that you will also see it when you try to open other Micorosft 365 apps. The solution is the same; either hide the error box or disable services that may be causing it. The alternative is to track down what is causing the error.