-
Notifications
You must be signed in to change notification settings - Fork 809
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
Many of the samples do not properly wait for the initialize() function in teams-js to complete #988
Labels
Comments
Thank you for reporting this, we will share this with sample team and get these updated. |
#1008 has been raised for this issue. PR is merged now, so we are closing this issue. |
Tell us about your experience!Hi @AE-MS! This issue is closed in our system. We would like your feedback on your experience with our support team and Platform. Best regards, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you look through these search results:
https://github.com/search?q=repo%3AOfficeDev%2FMicrosoft-Teams-Samples+microsoftTeams.app.initialize%28%29%3B&type=code
You will see many places where
microsoftTeams.app.initialize()
is called but either notawait
ed or followed by.then()
Per the documentation for app.initialize(), the call must complete before any other teams-js calls are made to avoid race conditions.
It's hard to know by just looking at the search results how many of them are bugs (theoretically calling
app.initialize()
without waiting for it to finish is only a bug if you aren't calling any other teams-js functions after), but it would appear that many of them are (e.g., app-in-meeting.jsx calls initialize and then immediately callsgetContext
, and searchSettings.html callsinitialize
and doesn't verify it's complete before potentially callingauthentication.notifySuccess
)The text was updated successfully, but these errors were encountered: