Skip to content
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

Deeplink with pages.navigateToApp() not working in Office and Outlook (v2 SDK) #1247

Closed
TDE-Communardo opened this issue Jul 14, 2022 · 22 comments

Comments

@TDE-Communardo
Copy link

Hi team,

we recently updated our Teams solution to use the new v2 SDK. While testing the new feature to use the app also in Office and Outlook we have noticed that the new pages.navigateToApp(...) functionality isn't working in the new environments. The same code works fine when the app is used in Teams.

Error Message

Office: Error in processing request : pages.navigateToApp with error Unhandled message
Outlook: No error / warning visible

Code-sample

Code used to navigate to a personal tab with the entityId "dashboard" from another personal tab inside the same app:

import { pages } from "@microsoft/teams-js";

...

if (pages.isSupported()) {
      pages.navigateToApp({appId: appId, pageId: "dashboard"});
}

Version

"@microsoft/teams-js": "^2.0.0"

@ghost
Copy link

ghost commented Jul 14, 2022

Hi TDE-Communardo! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.

Best regards, Teams Platform

@ghost ghost added the needs triage 🔍 label Jul 14, 2022
@ghost ghost added this to Needs triage in Issue Triage Jul 14, 2022
@nwojod-MSFT nwojod-MSFT added the v2 label Jul 14, 2022
@sbtron
Copy link

sbtron commented Jul 14, 2022

Hey @TDE-Communardo you are probably hitting an issue around the AppID changing when a previous version of your app is already installed and you are sideloading a new version that is under development.
To figure out if the appid is different you can compare the one you are passing in to what shows up in the browser url when you load the sideloaded app
e.g. https://outlook.office.com/host// or https://www.office.com/m365apps//

Teams has a special logic that can map and override this new sideloaded so the navigateToApp still works, unfortunately that logic is not available in Outlook and Office so navigation will fail. We are working on introducing a new API similar to navigateToApp which no longer requires you to pass in an AppID which can avoid this problem altogether.

For now, you will have to work around this by passing in the new sideloaded to the navigateToApp call. Note you only need to do this for the sideloaded app if a previous version of the app already exists on the store or tenant. Once you are ready to publish the app you can go back to the original as it will continue to work once the updated app is pushed to the store/tenant catalog. You should think of this as a temporary AppID used for development only and should not be using it outside of sideloading/development scenarios.

Hope this helps, please let us know if you have any questions.
Thanks

@Nivedipa-MSFT
Copy link

@TDE-Communardo - Please let us know if you have any other query or shall we close this issue?

@ghost ghost moved this from Needs triage to Waiting For User Response in Issue Triage Jul 15, 2022
@TDE-Communardo
Copy link
Author

Hi @sbtron thanks for your response!
I verified the appids in all environments and it's the same on every host (the ones displayed in the urls you mentioned are the same as on the Teams app).
The current app is also not published at the moment so existing versions should not interfere.
We are also using the latest version of Teams Toolkit which creates different AppIds for every environment. I was able to reproduce this issue with a locally hosted app (debug in Office / Outlook is available there) and also with an Azure-hosted dev environment (both have different AppIds). I also tried a clean install by removing the dev environment app entirely from the tenant and made a fresh install with the generated Teams app package.
We are also able to reproduce this issue on our centrally deployed test environment (separate Tenant, Azure-hosting and AppId).

Thanks in advance!

@ghost ghost moved this from Waiting For User Response to Active in Issue Triage Jul 15, 2022
@TDE-Communardo
Copy link
Author

One additional remark:

I've checked the AppId used in our code again and it was the external AppId that's also written down in the app manifest. However that's not the ID displayed in the urls mentioned above.

It seems that it doesn't matter whether you are using the external appId or the real appId in the pages.navigateToApp(...) function.
In Teams both AppIds make the navigation work properly. In Office and Outlook it's still the same result for both IDs: navigation is not working.

@ghost ghost assigned Wajeed-msft Jul 19, 2022
@Nivedipa-MSFT
Copy link

@TDE-Communardo - We will try to repro it and let you you know the updates.

@Nivedipa-MSFT
Copy link

@TDE-Communardo - We are able to repro this issue and we have raised a bug for it.

We will let you know once we get updates on it.

@nwojod-MSFT
Copy link
Contributor

@TDE-Communardo the team is working on a fix. No ETA yet. Will update this thread once there is a fixed ETA.

@nwojod-MSFT
Copy link
Contributor

@TDE-Communardo the ETA for a fix is end of August. Once the fix is rolled out, we will update this post.

@rolandbodenstaff
Copy link

@nwojod-MSFT any update on this?

@nwojod-MSFT
Copy link
Contributor

@rolandbodenstaff, ETA got delayed a bit to accommodate few other changes. I will update this thread as soon as the changes are in effect. Thanks.

@rolandbodenstaff
Copy link

It's a month later is the update ready?

@nwojod-MSFT
Copy link
Contributor

@rolandbodenstaff apologies for the delay. The fix has been implemented, however, the team is running final tests. The team will roll out the fix in the coming days.

@Nivedipa-MSFT
Copy link

@TDE-Communardo - We are checking the status of fix release with the engineering team. We will let you know once we have any update.

@Nivedipa-MSFT
Copy link

@TDE-Communardo - The bug has fixed now. Could you please test this and confirm?

@sohamzycus
Copy link

sohamzycus commented Jan 5, 2023

MicrosoftTeams-image

Can you please let me know in which version the bug has been fixed ? We're facing similar issue.

Our use case -

  1. Redirecting to Chat context from Tab with the click of a button.
  2. Tab contains button called 'See actions' - on clicking it, user should be redirected to Chat window.
  3. We're using @microsoft/teams-js package with a call to pages.navigateToApp() functions - refer attached screenshot
  4. It doesn't throw any error, just comes out of the function.

Teams-js version -
$ grep -i teams-js package.json
"@microsoft/teams-js": "^2.2.0",

Can you @Nivedipa-MSFT please check and point us to the solution ? Thank you.

@Nivedipa-MSFT
Copy link

Nivedipa-MSFT commented Jan 5, 2023

@sohamzycus - We have tested this on Office version : 18.2210.1203.0
Could you please share what error you are getting in console?
On which host (Teams, Outlook, Office) are you facing this issue?
Are you using app ID which is retrieved from Teams Admin Center for deeplink?
Could you please share the screen recording of your issue to understand the scenario?

@sohamzycus
Copy link

sohamzycus commented Jan 5, 2023

@Nivedipa-MSFT - Please find answers below -
Could you please share what error you are getting in console?

No error. It just comes out of the ' if-else' block completely. Doesn't breaks inside if-else

On which host (Teams, Outlook, Office) are you facing this issue?

Teams

Are you using app ID which is retrieved from Teams Admin Center for deeplink?

Yes

Could you please share the screen recording of your issue to understand the scenario?

Attached video

NavigationError.mp4

.

@ChetanSharma-msft
Copy link

Hello @sohamzycus - Thanks for sharing the information.
We will further investigate your issue and let you know the updates.

@AE-MS
Copy link
Contributor

AE-MS commented Jan 17, 2023

@sohamzycus thanks for providing those extra details. To ensure that I can reproduce and investigate your specific use case, can you provide some more information about how you're looking to use a link to chat? You mention that you are looking to redirect to chat context from a tab -- are you looking to create a new chat with some set of users? Or navigate to a specific channel conversation?

From the video you provided (thank you for recording it!) -- it looks like you are using the pages.navigateToApp method to try and open the chat. What parameters/data are you providing it? I can see you're providing an app id, but I can't quite tell what comes after that. Can you provide a sample example here of the parameters/data you are passing? You don't have to provide the exact data, in case it's confidential, just something representative of what you're passing.

Thank you!

@ghost ghost moved this from Active to Waiting For User Response in Issue Triage Feb 10, 2023
@Nivedipa-MSFT
Copy link

@sohamzycus - Could you please share below details:

  1. Are you looking to create a new chat with some set of users? Or navigate to a specific channel conversation?
  2. What parameters/data are you providing to pages.navigateToApp?
  3. Can you provide a sample example here of the parameters/data you are passing?

@ghost
Copy link

ghost commented Feb 13, 2023

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 3 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost ghost closed this as completed Feb 16, 2023
Issue Triage automation moved this from Waiting For User Response to Closed Feb 16, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Mar 24, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Issue Triage
  
Closed
Development

No branches or pull requests

9 participants