OfficeDev / microsoft-teams-library-js

JavaScript library for use by Microsoft Teams apps
https://docs.microsoft.com/microsoftteams/platform/
Other
417 stars 187 forks source link

SDK initialization timed out #2314

Closed jailene5 closed 1 week ago

jailene5 commented 3 weeks ago

Our app has been running for over a year now and we had never experienced this issue. For the past week, we have been seeing the error "SDK initialization timed out" on the desktop web browser of Teams.:

XPLOR 961 error

We are using the version 2.19.0 of the teams-js library but even after upgrading to the latest version of 2.22.0, we still see this error. Here is our code:

import {app} from '@microsoft/teams-js';

    init = () => {
        if (!app.isInitialized()) {
            return app
                .initialize()
                .then(() => {
                    return {isTeamsEnvironment: true};
                })
                .catch(error => {
                    if (IS_DEV) {
                        console.error('[ERROR: MsTeams]', error);
                    }
                });
        }
    };

Let me know if more information is required, thank you!

jekloudaMSFT commented 3 weeks ago

Hi @jailene5, I'm sorry you've run into this. Could you please follow the instructions here to enable client side logging and then reply to this with the client logs you see during a failed app initialization? Are you seeing this error persistently or does initialization sometimes succeed?

jailene5 commented 2 weeks ago

Thankfully we are only seeing this issue on a bot for our app that is for a lower testing environment, we don't see the issue in our production app. Also, only some people are seeing the issue but others aren't. We enabled the client side logging but it's not printing anything out for those who see the issue...what would that mean?

AE-MS commented 1 week ago

Hi @jailene5! Just so we can understand the problem better, can you elaborate on how you're using the teams-js library and calling initialize() in this scenario? You mention that you're seeing the issue on a bot for your app. Bots usually run on a service where teams-js functionality isn't available (the library depends on being hosted client side in Teams, Outlook, or Microsoft365.com).

Can you say more about how the bot is being used here? Is it launching a dialog only the client that then uses teams-js?

Thanks!

jailene5 commented 1 week ago

It seems like this isn't an issue anymore!

microsoft-github-policy-service[bot] commented 1 week ago

Tell us about your experience!

Hi jailene5! We have closed this issue in our system, but we would love to hear your feedback. To let us know how we did, simply use one of the following emoji icons: :thumbsup: for resolved, :thumbsdown: for unresolved, or :heart: for a great experience on this message. Please use the link for more detailed feedback.

Best regards, Teams Platform