0

Process: Our product has multiple clients. Each client has different URL for the application in the same domain. (ex. abc.getnspace.com, def.getnspace.com etc). To accommodate all clients, we have given our default URL as the initial URL of the personal app. We compute the actual URL that the logged in person has to be redirected to, based on user's tenant id.

Issue: We have given *.getnspace.com in the valid domains. All the URLs in this pattern after getting redirected are being initialised just fine except a few. For those few redirected URL's, the SDK initialisation is getting timed out (no pattern found for which URLs the SDK initialising gets timed out).

But the SDK initialisation is working fine, if we include that URL separately in the valid domains list along with the wildcard URL. We couldn't add all our clients as there is a restriction for only 16 valid domains, and it wouldn't be a good option as well because we need to submit a new version of our app every time we need to add or remove a client.

Note:This is not happening with all the clients. Some URLs are getting loaded even if they are not explicitly mentioned in the valid domains list.

Package and version used: teams-js@2.4.2 Image of the error logged

  • We are not able to repro the issue, as you mention above this is happening only some client. Could you please share error log and code snippets so that we can try it from our end? – Sayali-MSFT Jul 05 '23 at 11:40
  • There is no error log as such. To be more precise, we have only one code base. When the default URL is loaded, we initialise the sdk using app.initialise() And now from default url, we identify the url to be redirected which is in same domain. and we redirect to that url (which is not exlicitly mentioned in valid domains) , and the same code base is again loaded which has app.initalise again, and at this point of time, the initialise() api fails and the error logged is 'SDK initialisation timed out' – Sanjana Gudla Jul 05 '23 at 12:37
  • Attached the error logged in the description. – Sanjana Gudla Jul 05 '23 at 12:40
  • @Sayali-MSFT Could you please let us know, if there is any update? – Sanjana Gudla Jul 10 '23 at 08:35
  • @Sanjana-Thanks for sharing the information, we will check it and let you know the updates. – Sayali-MSFT Jul 11 '23 at 09:05
  • Could you please share the list of your valid domains and manifest file? Also please review this document to ensure you are defining your valid domains correctly - https://learn.microsoft.com/en-us/microsoftteams/platform/resources/schema/manifest-schema#validdomains. – Sayali-MSFT Jul 14 '23 at 05:50
  • @Sayali-MSFT could you share your email id, so that we can send our manifest there. – Sanjana Gudla Jul 17 '23 at 11:53
  • Please send the manifest on below mail ID-microsoftteamsdev@microsoft.com – Sayali-MSFT Jul 17 '23 at 12:00
  • 1
    @Sayali-MSFT We have sent an email attaching the manifest. Please find. – Sanjana Gudla Jul 17 '23 at 12:27
  • Thanks for sharing the manifest, we will share with the engineering team and let you know once we get any update. – Sayali-MSFT Jul 18 '23 at 12:56
  • @Sayali-MSFT Can we know if there is any update. – Sanjana Gudla Jul 24 '23 at 12:33
  • We will provide the details to engineering team, we will let you know once we get any update. – Sayali-MSFT Jul 25 '23 at 08:30
  • Could you please share the below information that would help us determine the exact issue. Thanks 1.What is the specific example of a client URL you are trying to redirect to that is failling? 2.Can we see the function call/calls you are using to redirect from default.nspace.com to their client URLs. 3.you have "showLoadingIndicator":True set in your manifest. Is their main application and all the client they are trying to redirect calling either app.notifyAppLoaded() or app.notifySuccess()? – Sayali-MSFT Jul 26 '23 at 04:24
  • @Sayali-MSFT Can we send this information over the email you have provided earlier? – Sanjana Gudla Jul 26 '23 at 08:46
  • yes.you can send the information through mail.mail ID-microsoftteamsdev@microsoft.com – Sayali-MSFT Jul 27 '23 at 08:32
  • @Sayali-MSFT We have sent the information in the e mail. – Sanjana Gudla Jul 27 '23 at 12:58
  • Thanks for providing the information. We will provide the engineering team ad let you know once we get any update.. – Sayali-MSFT Jul 27 '23 at 13:18
  • @Sayali-MSFT Can we know if there is any update. – Sanjana Gudla Aug 09 '23 at 12:32
  • Engineering team looking into this, we will let you know once we get any update. – Sayali-MSFT Aug 10 '23 at 14:22
  • I have added team in email thread ,the team requires a few more details. Could you please assist them in gathering the additional information? – Sayali-MSFT Aug 11 '23 at 14:40
  • @Sayali-MSFT Sure, please let us know how can we assist them. I have replied in the email thread. – Sanjana Gudla Aug 16 '23 at 11:50
  • We have raised bug for the same. We will inform you once we get any update. – Sayali-MSFT Aug 30 '23 at 15:32

1 Answers1

0

I have also encountered this issue before, and using the team's SDK2. X version will have this issue. Then, I replaced the SDK package with "@ Microsoft/teams js": "1.10.0" version to solve this problem. You can try it out, but I am also looking forward to using the 2. X version to have an effective solution

  • Thank you for the suggestion. Yeah, lets see what the support teams comes up with. – Sanjana Gudla Jul 06 '23 at 06:29
  • @SanjanaGudla: Check if there are multiple references to import teams SDK in the particular page. It can lead to initialization timeout issue. – Subba Reddi Tummuru Jul 07 '23 at 22:10
  • @SubbaReddiTummuru Thank you for the reply. We have only initialised the sdk once in the application. I think, as we are redirecting to a different url which has same code, the initialisation error occurs.. but redirecting is as good as refreshing and the initialisation should be taken care.. Also, this happens only when I don't explicitly include the redirected url in the valid domains list. (p.s I have included wildcard url in the valid domains list like *.abc.com) – Sanjana Gudla Jul 10 '23 at 04:48