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 breaks Teams App navigation (New Teams v2; Bot and Static Tabs) #1227

Open
milcem opened this issue Apr 9, 2024 · 20 comments
Open
Assignees
Labels
bug Something isn't working needs-attention T2.1 Teams 2.1 related issues

Comments

@milcem
Copy link

milcem commented Apr 9, 2024

Bot with static tabs – button with deeplink from Adaptive Card

image

User clicks on it – Chat tab disappears and clicking on any other tab after will open the store

image

And prompt the app to open rather than open the static tab:

image

This behavior seems to indicate that we go out of the app when we use the deeplink?
Teams V2:
We have a bot with static tabs built as a Teams app, we haven’t had any issues using it so far, but since the new Teams update we started noticing bugs when we try to navigate through the app’s tabs using deeplinks.
In the Chat tab, the bot sends a response with Adaptive Card that has a button containing the Teams deeplink according to the documentation.

Expected behavior (worked on old Teams til update): user clicks on button deeplink which opens the static tab it points to with the subcontext loaded in it, and the user can navigate freely from that tab to the chat tab and the other static tabs in the Teams app.

Current behavior (old Teams): user clicks on button deeplink, opens the static tab with the subcontext, navigation works normally, no bugs
Current behavior (New Teams (v2)): user clicks on button deeplink, opens the static tab with the subcontext, removes Chat tab, and if the user clicks on any other tab it opens the App Store and prompts the user to open the app that we made the deeplink click from.
No code changes that would prompt this behaviour.

Any advice on the matter would be greatly appreciated.

/EDIT to add we have included additionally the navigation code from Teams-JS v2 plus getting the context from the deeplink, but it is working with the same bug. And yes we make sure to match the entity / page ids which are the app id for our bot and Teams app, which contains the static tabs in the manifest as well.

@Vikram-MSFT
Copy link

Hello @milcem
Could you please share your code snippets and a short vedio or repro steps to test it from our end?

@milcem
Copy link
Author

milcem commented Apr 10, 2024

Hello @milcem Could you please share your code snippets and a short vedio or repro steps to test it from our end?

Hi Vikram!

Do you have any specific code snippets you need to see? I will share the main ones - the deeplink generation for the adaptive card for the bot response, the deeplink generation for navigating from one static tab to the others. If you need anything additional let me know.

The code that builds the deeplink

image

The code that builds the adaptive card

image

The adaptive card schema and action item

image

This is the code in one of our static tabs that handles navigation using a deeplink or pages

This is another example of the deeplink navigation breaking but it is not from an Adaptive Card.

image

The manifest part that would be relevant (the bot and static tabs) are also set up as per Microsoft's documentation. Bot uses same app id as static tabs.

Again, this behavior started happening to our app with the New Teams and no code, deployment settings, configuration changes.

With the above code, when we run the app for local debug (or in production) the user can navigate across tabs using the pages.navigate code, and when they click on the button to navigate from the above static tab to another with the Pages navigation, it works fine and the user can move back across tabs and the Chat tab does not disappear.

But if the user uses the deeplink to navigate using the same button, it will take him to the right static tab, but pressing on any other tab after will open the dialog from the store to open the app instead of opening the tab, and the Chat tab disappears.
These are the two instances of the app using a deeplink to navigate to a different static tab within the app that worked fine, and it started this buggy behavior in New Teams.

I will post the video as soon as I can and follow up with it, but if you see the photos I started with, they show sequentially that we ask the bot a query, we receive an adaptive card with deeplink to static tab, static tab opens and loads content but app navigation (clicking on the other tabs doesn't work, instead it opens the dialog to open the app from the store.

@milcem
Copy link
Author

milcem commented Apr 10, 2024

We were also able to reproduce the bug with a simple Teams app with 2 static tabs.

Code Snipet

const appId = config.teamAppId;
const deepLink = https://teams.microsoft.com/l/entity/${appId}/tab2;
const handleClickButton = () => {
app.openLink(deepLink);
};

Screenshot 2024-04-10 at 3 00 16 PM
Screen.Recording.2024-04-10.at.3.01.01.PM.mov

@ChetanSharma-msft
Copy link
Collaborator

Hello @milcem - Thanks for sharing the information.
We will look into it and let you know the updates.

@milcem
Copy link
Author

milcem commented Apr 17, 2024

Hello @milcem - Thanks for sharing the information. We will look into it and let you know the updates.

Hi @ChetanSharma-msft appreciate the note, just wanted to check in if there have been any updates or clarifications on this?

I wanted to note when we found a couple of similar issues online, in the last week Microsoft techs have been answering that the fix is introduced in the latest Teams client version, but even after I updated it, the issue persists.

To that end, if this is a Teams V2 bug, is there any way, any fix, even if ugly, to handle the navigation intermittently so the tabs/app navigation doesn't break? Would appreciate any advice on the matter.

@milcem
Copy link
Author

milcem commented Apr 17, 2024

Similar issues posted on other repos OfficeDev/microsoft-teams-library-js#2269 - similar issue using deeplink on file
OfficeDev/microsoft-teams-library-js#2248 - similar issue, but the navigation still fails as mentioned above and not fixed (tested on latest client version)
OfficeDev/microsoft-teams-library-js#1247 (comment) - same as above, but no resolution reached because the issue staled.

Just wanted to point these out as similar to ours, but the potential resolutions offered, we tried and they didn't work.

@Vikram-MSFT
Copy link

Vikram-MSFT commented Apr 18, 2024

Hello @milcem
Could you Please refer this sample: we have checked this sample in New Teams it is working fine.
https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-app-navigation

@milcem
Copy link
Author

milcem commented Apr 18, 2024

Hello @milcem Could you Please refer this sample: we have checked this sample in New Teams it is working fine. https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/9661628b354d0bfb431bf766759688a2bf609768/samples/tab-app-navigation

Will try the sample today and keep you posted.

Does this mean there is a bug on your side for deeplinks breaking the navigation with the other code? Would appreciate more info/confirmation as we are spending resources on this to figure it out still.

@milcem
Copy link
Author

milcem commented Apr 18, 2024

@Vikram-MSFT before I even run this code, I want to mention the set-up:

The bot (using the messages endpoint on Bot Framework) is part of our code. The other code is the static tabs.
We need to send a deeplink from the bot that will populate the Adaptive Card button that should take you to the static tab. We cannot utilize the pages navigation code there, or am I wrong?

So this code will still fail in this situation?

/edit to save you the response - it does fail in this situation.

If you have any ideas for the Bot+Static Tab tab navigation (when the app is the same, but the code is separate for each) as we can't add the pages.navigation code in the Bot part, please let us know as it would be much appreciated still.

@milcem
Copy link
Author

milcem commented Apr 22, 2024

@Vikram-MSFT @ChetanSharma-msft hi, have you had a chance to look into this by any chance?

Again, would really appreciate any type of indication if the deeplinking is not working on your end and if it is a Teams v2 bug, or is it us, as we are still spending our resources on figuring this out, and nothing in the documentations or sample codes is helping...

@Vikram-MSFT
Copy link

Vikram-MSFT commented Apr 23, 2024

Hello @milcem
Could you please refer this sample meanwhile:
https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/deep-link-teams

@milcem
Copy link
Author

milcem commented Apr 25, 2024

@Vikram-MSFT appreciate the updated documentation, but can't find anything for linking to a static tab through a deeplink now? Using subEntityid (or subpage id whatever it is called in Teams v2) with context? If you could point me to which is the right deeplink to do in this case would appreciate it.

Again, the flow is - bot sends an Adaptive Card with text and deeplink, deeplink contains context from the text to load elements into the static tab. With the current setup, when we click on the deeplink, the navigation for the whole app in Teams fails (and obviously through that, the Chat tab disappears). If we click to refresh the tab or try to navigate to the other tabs of the same app, it will open the prompt from Teams App Store to open the same app.

I don't need to send a link to the chat, I need to send a deeplink that opens a static tab with context from the Chat (bot's message) and doesn't remove the Chat tab and break in-app/in-Teams navigation of the same app.

I would really, really appreciate more details please.

Were you able to reproduce the issue?
Is this a Microsoft bug?
What part of the documentation should I look for as this is anything but clear with our example case (deeplinking to application would be the one we use)?

@ChetanSharma-msft

@milcem
Copy link
Author

milcem commented Apr 29, 2024

@Vikram-MSFT @ChetanSharma-msft any updates? Would really appreciate any indication of what is happening or what we can look into if this is not a Microsoft bug that you can reproduce.

@milcem
Copy link
Author

milcem commented May 1, 2024

@Vikram-MSFT @ChetanSharma-msft checking in again for any updates. Not to be annoying at all, just to buzz the notifications and hopefully get an update soon :) appreciate your work.

@milcem
Copy link
Author

milcem commented May 2, 2024

@Vikram-MSFT @ChetanSharma-msft bump.

@ChetanSharma-msft ChetanSharma-msft added the T2.1 Teams 2.1 related issues label May 3, 2024
@ChetanSharma-msft
Copy link
Collaborator

Hello @milcem - Sorry for delay in response.
We will check and share the updates with you soon.

@Vikram-MSFT
Copy link

Hello @milcem
We are also unable to repro this issue, we will check internally and get back to you.
Update : We raised a bug for this issue, we will keep you posted on the updates. Thank you

@milcem
Copy link
Author

milcem commented May 3, 2024

@Vikram-MSFT @ChetanSharma-msft Appreciate the update! Looking forward to any further advice.

@ChetanSharma-msft ChetanSharma-msft added the bug Something isn't working label May 6, 2024
@milcem
Copy link
Author

milcem commented May 7, 2024

@Vikram-MSFT just to clarify, did you manage to repro the issue internally in the end or you still can't? I am glad to share any more information that might help you if that is the case. And any workarounds for deeplinks in the meantime would be deeply appreciated for the aforementioned scenario if such exist. Thanks! cc @ChetanSharma-msft

@Vikram-MSFT
Copy link

Hello @milcem
We have raised a bug for this issue, we will keep you posted on the updates. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-attention T2.1 Teams 2.1 related issues
Projects
None yet
Development

No branches or pull requests

3 participants