-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: SDK initialization timed out #2342
Comments
@cpoucb - Thanks for reporting your issue. We are checking this internally, we will update you soon. |
Hi @cpoucb! These types of issues can be tricky to troubleshoot. Can you enable client logging (instructions here) and send the logs to us to aid us in debugging the problem? Thanks! |
Hi @AE-MS, I must be doing something wrong because it looks like the logging is still not enabled even after following the instructions of the article to the letter. When debugging the code, it seems it's skipping the "logger" lines of code. I just see this in the console window:
Can that help? Thanks in advance! |
Hello @cpoucb, It looks like you have followed steps 1 to 4 in the instruction document @AE-MS provided. However, could you please check whether SDK initialization timeout issue is very complicated and thus we would like to have more logs to investigate it. Thank you. |
Hello @KangxuanYe, My bad. It looks like I made a typo when setting the localStorage.debug value. Here are the logs of teamsJs:
Thank you! |
Hello @cpoucb, thank you so much for helping us collect logs for debugging and investigating the issue. Could you please elaborate more for us on this log to understand the situation you are facing? For example,
Thanks again on helping us to investigate this issue. |
Hello @KangxuanYe , This is the log that was captured when refreshing the app on teams.microsoft.com as mentioned in the documentation provided by @AE-MS. This is all the log I have including the one I shared in an earlier post:
I'm still able to systematically reproduce the issue. If that can help, in my first post, I detailed all the steps to reproduce the issue along with the code causing the issue. Thank you for your help! |
Hello @cpoucb, we really appreciate your time on this issue. Here is our update for your issue. We are going to investigate this issue and we will reach you again if we cannot reproduce the issue by our test app in our environment. We will share more detail and instruction for you by that time. Thanks again for helping us on investigating this. |
We started seeing this same error appear on mobile msTeams for both android and iOS since the last msteams update on May 20th. Unlike the above we don't see this on the web/desktop versions of the app. We are currently on package version 2.21.0 of teamsjs so I'm unsure if it's related to the latest version. |
Hi @cpoucb, thanks for your waiting. We would like to update our effort for investigating this issue with you and share our next steps to dig in and try to resolve issue for you. We used Teams Tool Kit to generate a very basic static-tab demo app with your simplified code, which you said that your (team) could use for reproducing init timeout issue. We set the Teams-Js library specifically to V2.23.0 and then ran the code on Teams app. The demo app ran successfully in local and init timeout issue didn't show up after multiple attempts/reloads. However, we do know one way that apps could fail on init timeout issue, which is that app is not hosted in host. For example, if you are on Teams in edge and your app is loaded, and then you click those three dots on top right of your app and then select Thus, could you please share your app, or simplified code, in a zip file with us (please make sure it doesn't contain any sensitive information that you don't want to spread it out) so that we could take a deep look for testing and see if we can reproduce the issue within your app as you did? We will side load it to our Teams app and repeat the process as we did for initial investigation. Hopefully we could have more findings with your help. We really appreciate your time and effort with us on this issue. Thank you. |
Hello @RichieMcCaff, thanks for reporting that issue for us and we acknowledge that this is an issue we are investigating. This is an issue we had very recently and it might not be the same as this one. It might be easier for you to track our update/investigation for issues similar to yours through issue 2347. Please let me know if it looks good to you and feel free to post questions there as well. Thanks again. |
I'm seeing this as well, but only in a specific situation. I have an app in the store, it's working fine in:
But it's failing on teams.microsoft.com, with this same error ("SDK initialization timed out"). In my case, I'm using an |
Hello @HiltonGiesenow, thank you for reporting and diving deep into this issue. To better investigate this issue, could you please say more about
I think you should use |
Hi @zaosoula , could you please say more about your timeout error? i.e.
We will also be appreciated if you can provide your deployed app for us to be side load so that we can do more investigation. Thank you. |
@KangxuanYe you can check out the "Quicklinks Shared Links" app. Apologies for the mixup in web addresses in my first post - I meant it's failing on teams.cloud.microsoft - the new site - and ONLY failing there - everywhere else is fine. It happens all the time, on first load (or basically whenever I call |
Hi @KangxuanYe, We didn't use Teams Tool Kit to generate any app. What we did is as follows:
Thank you for your help! |
Thanks for calling out that extra detail of the new site. What version of the teamsjs library are you using? Versions prior to 2.19.0 did not support the new *.cloud.microsoft domains so that would be one thing worth checking. |
I'm on teamsjs 2.23.0 with manifestVersion 1.17 in the app package |
@HiltonGiesenow, we really appreciate your clarification and this is super helpful for us to debug with a real app. We could confirm and reproduce this initialization timeout issue now and as you said, it only happens on Teams web R0 and we start investigate it now. |
glad I could help, please keep me posted. |
Hello @HiltonGiesenow, here are things we have done in sequence and we do find something. Please take a look. Step 1. We click three dots ("View more app") in Teams sidebar, then "get more apps" button and search your App ("Quicklinks Shared Links"). Your app appears in our search results Step 2. Once this app is added and displayed in app list, we click the icon and then open it. Step 3. In this step, as you said, in Teams Web R0 (cloud.microsoft domain specifically), the app gets initialization timeout issue. Our investigation starts from here. Step 4. We first enables client logging to get more logs and would like to know what can we have. (If you don't know how to enable client logging, please check instructions here). Also, screenshot in step3 has logs after we enable client logging. Step 5. We took a look on logs sent from TeamsJs and clicked into log with initialize. The first argument, We repeat this process in different rings and platforms. All of results show that the app we loaded is using TJS V2.5.0. Could you please let us know if there is anything wrong we did, i.e. using another url, so that we could land on the app using TJS 2.23.0? (BTW, if you see TypeScript files (or let's say Teams-JS library package written in TypeScript) instead of JavaScript, you can click three dots here and then "settings" to disable Thank you so much again for helping us. And we highly suggest you to raise another new issue specifically for your case, which might be easier for you to track and for us to help with since this thread mixes different types of issues. |
Hi @cpoucb, thank you so much for posting your steps here. It gives us more information so that we have better understanding on your progress now. You mentioned in step 4 to step 6 that, the url of app is fetched from Azure App Service and then the Url is added into a "website" tab in channel. From my best knowledge on Teams, ("website") tab in channel is equivalent to a page in browser, thus what "website" tab does is to take a url and load a page. There is no communication between Teams-JS library and host SDKs (if you put your app's url there), thus, SDK request (message) for initialization sent from Teams-JS library will go nowhere and no one responses it. Host SDKs are designed and supposed to be used for(with) apps hosted in host. Webpage is not the target to be served by host SDKs. That's the reason why your app initialization times out. Please let us know your thoughts and feel free to talk more about what you want to do, i.e. testing app in Teams, publish app or something else, so that we could better help and give more guidance. Thanks again for your patience! |
oh, that was totally the problem - thank you! This was an CI/CD issue our side because only the package had changed, no -actual- code had changed for this release. Resolved (you should see it working fine now your side) |
I reported the same error here and a Microsoft colleague told me to mention it here as well. The SDK initializes fine in almost all scenarios. It only times out when I run Teams in a browser and our add-in opens a popup window for authentication purposes. In the popup window, we try to initialize the SDK and it always timesout. The same scenario works in the Teams app and it also works fine in our dev environment. Even when we run our dev environment add-in in Teams in a browser it works. It only fails in a browser with our production environment Teams add-in. We run version 2.21.0. Attached you will find the logs that I collected. Most interesting line from that log: |
Any updates on this? This is affecting us badly. Our clients are not able to proceed with authentication when using Teams in browser. |
Hi @aniketrai , can you clarify the details of your issue? There are unfortunately multiple different issues being reported in this thread so it's difficult to help you specifically since your experience might be due to any number of different scenarios. Can you please let us know what scenario it is that's failing for you, and collect logs, please instructions here. Thanks! |
Hi @FedWiebe, I am looking into this further for you. Something that could be useful for me is to see how
|
@jadahiya-MSFT thanks for your support 👍 This is it. We use the same code to initialize it when our app is embedded and in the fat client of Teams and in those cases it works.
|
Thanks for sharing the snippet. If you were to do the following, do you still run into the same issue?
|
@jadahiya-MSFT thanks for the tip. I haven't included the URL yet in the 'initialize', but maybe we already found a solution. |
Hi Team,
We're encountering an issue on Teams and Teams for Web where we get the following error message:
We simplified our code to get the minimum to reproduce the issue. We're able to reproduce it on different environments (including a sandbox). Here is our code:
We uploaded that file in an Azure App Service and created a Website tab in Teams pointing to it. When opening the tab, we get the error message after about 5 seconds.
Any idea what we're doing wrong?
Thanks in advance for your help!
The text was updated successfully, but these errors were encountered: