Forum Discussion
Issue with Red Error Pop-up in Microsoft Teams Tab Application
Nivedipa-MSFT, Sure. I've attached the app package (appPackage.local.zip) below.
Mansi_Barot - We have tested this and able to repro your issue.
We have raised the bug for the same. We will let you know once we get any updates on it.
- Mansi_BarotOct 22, 2024Copper Contributor
Nivedipa-MSFT,
I've been encountering the AppInitTimeout error each time I see this error pop-up. Below are the console logs that may help identify the issue. Despite adding a local page from within the application, I still encounter the AppInitTimeout error.This is a simple tab application created using Visual Studio. I created a Razor page called test:
@page "/test" <h3>Hiiiiiiiiiiiiiiii</h3> @code { }
I then updated the manifest to point both the contentUrl and websiteUrl to the test page as follows:
"staticTabs": [ { "entityId": "index", "name": "Home", "contentUrl": "${{TAB_ENDPOINT}}/test", "websiteUrl": "${{TAB_ENDPOINT}}/test", "scopes": [ "personal", "groupChat", "team" ] } ],
However, I still keep getting the error pop-up.
- Nivedipa-MSFTOct 23, 2024
Microsoft
Engineering team has confirmed that now it is mandatory to initialise SDK for static tabs as well. Within your content page, add a reference to Microsoft Teams JavaScript client library using script tags. After your page loads, make a call to app.initialize(), or else your page isn't displayed. we display a banner instead of hiding the app because we didn't want to prevent customers from using these apps.
But to remove the banner, the developer needs to ensure that the pages they are loading initialize teams-js as documented here:
https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/tab-requirements
Thanks,
Nivedipa
------------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.
- Mansi_BarotOct 24, 2024Copper Contributor
I would like to confirm my understanding: any web page I want to add as a tab in Microsoft Teams must include the Microsoft Teams JavaScript client library. Since my application primarily focuses on dynamic pages, where users provide a URL through a configuration page that I assign to contentURL, I need to ensure that any URL entered by the user must contain the script tag referencing the Teams JavaScript library.
<script src="https://res.cdn.office.net/teams-js/2.28.0/js/MicrosoftTeams.min.js" integrity="sha384-gT2igbByugSUPXBgDA+rtfKk4JMSCfG+3DKSivyLqF2Riv4vTLqaC/tFpySw0eIM" crossorigin="anonymous"></script>
This is essential for proper functionality and to avoid displaying the Teams banner.Thank you!