cristianoag / microsoft-teams-apps-company-communicator

Company Communicator app template
MIT License
16 stars 38 forks source link

Timeout when calling microsoftTeams.authentication.notifySuccess(); in company communicator. #60

Closed chenguyuan closed 10 months ago

chenguyuan commented 1 year ago

Issue

=========

[Extensibility] Timeout when calling microsoftTeams.authentication.notifySuccess(); in company communicator.

Background

=========

Customer used Microsoft app templates "Company communicator" and deployed an customized app, no code change.

https://learn.microsoft.com/en-us/microsoftteams/platform/samples/app-templates

The customized app was working when between June-July, but the "draft message" function is not working since middle of Augest.

the expected behavior is a popup tab with editing message window.

image

**Troubleshooting

============**

logs shared with microsoft onedrive: https://microsoftapc-my.sharepoint.com/:f:/g/personal/guc_microsoft_com/EuR-LLMGJ2ZBg2wNfzpHXysBxdbmWyTGYquYaG2sKzOlzA?e=SF4p4m

collect fiddler and client log, all fiddler trace showing 20X no error located. Client log indicates the popup tab is timed out for notifySuccess() when doing some authentication task in the popup tab

2023-08-25T03:19:19.475Z Inf ExtensionTabBase: Tab timedout waiting for notifySuccess(): App id = 6ba272cb-595f-4515-bdee-e324b8d7df85, AppSessionId = 177d031b-0ae9-42a6-b59e-a362daa6f143, AppLaunchId = 7d7705c0-d163-4304-89e8-f2e1792b88e7

I checked the company communicator github, it called microsoftTeams.authentication.notifySuccess(); …..

const hashParams: any = getHashParameters();

if (hashParams["error"]) {

// Authentication/authorization failed

microsoftTeams.authentication.notifyFailure(hashParams["error"]);

} else if (hashParams["id_token"]) {

// Success

microsoftTeams.authentication.notifySuccess();

} else {

// Unexpected condition: hash does not contain error or access_token parameter

microsoftTeams.authentication.notifyFailure("UnexpectedFailure");

} The challenge is how to troubleshooting further on this timeout. thanks.

chenguyuan commented 1 year ago

Branch information:

image
luishdemetrio commented 10 months ago

This issue has been open for a long time and most likely resolved by now, so I'm going to close it.