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

Wrong context passed to team tab when navigating (latest build bug, 24295.607.3241.5057) #2638

Open
nbelyh opened this issue Nov 21, 2024 · 8 comments
Assignees

Comments

@nbelyh
Copy link

nbelyh commented Nov 21, 2024

If you navigate to a tab using a link from one tab, the latest teams client does not give you the new context.
Teams build numbers:
Screenshot 2024-11-21 153415

Meaning, microsoftTeams.getContext() started returning the context from the previous tab/application.

This break deep link navigation completely, as the tab being loaded gets another tab's context.
This is only happening in the very latest build of teams (see the version numbers above).

Example to be clearer:

Personal App calls
executeDeepLink(...here comes the deep link to some team tab....)

Some Teams tab:
getContext(....) ===> returns now the context for the person tab, not this team tab ?????

If you reload the teams tab, the correct (teams tab) context is passed.

@nbelyh nbelyh changed the title context is not changed in the latest build of teams when navigating to a new tab invalid context passed in the latest build when navigating to a new tab Nov 21, 2024
@nbelyh nbelyh changed the title invalid context passed in the latest build when navigating to a new tab Wrong context passed to team tab when navigating (latest build bug, 24295.607.3241.5057) Nov 21, 2024
@Nivedipa-MSFT Nivedipa-MSFT self-assigned this Nov 22, 2024
@Nivedipa-MSFT
Copy link

@nbelyh - Thank you for your inquiry about your Teams app development issue! To assist you better, could you please share the Teams JS library version you are using?
This information will help us better understand the situation and provide a more accurate response.

@haekalarif
Copy link

I had same issue like him,
The problem is context data in channel tab & personal app are different even thought the structure is same, but the value different, there are some data in channel tab not available in personal tab for example groupId, After user click link then navigate to channel tab then the my app try to get context data in channel tab but the context data is still using from personal tab.

Please suggest advise

@nbelyh
Copy link
Author

nbelyh commented Nov 22, 2024

@Nivedipa-MSFT
We are still on the old teamsjs teams-js 1.12.1 (to be compatible with the spfx)
Trying to migrate to the newer version (spfx supports 2.x now), will post an update here if that helps.

But the thing is, for us the problem only happens with the very last teams client.

@sebiJo
Copy link

sebiJo commented Nov 22, 2024

Same here!
We are on @microsoft/[email protected]
Microsoft Teams version 24295.608.3244.8993.
Client version is 50/24110115713.

Reproduce:

  1. Navigate a deep link from a static personal app to a channel tab app
  2. Observe that context.team == undefined and other information from context is also not up-to-date
import * as microsoftTeams from "@microsoft/teams-js";
let context = await microsoftTeams.app.getContext();
//context.team is undefined

@nbelyh
Copy link
Author

nbelyh commented Nov 22, 2024

For me, the context is not undefined; it is defined, but it is a wrong one (and it is wrong one only in the latest build of teams, and only if you navigate to the app using deep link)

@sebiJo
Copy link

sebiJo commented Nov 22, 2024

Yes, context is not

For me, the context is not undefined; it is defined, but it is a wrong one (and it is wrong one only in the latest build of teams, and only if you navigate to the app using deep link)

Yes, same here. Context is not undefined but fields in the context are undefined that should be defined actually. Only occurs after using a deeplink.

@Nivedipa-MSFT
Copy link

@nbelyh - We are experiencing some difficulties in reproducing this scenario. Could you please share your minimal code snippet, app manifest, and a repro video? This will help us replicate the issue on our end and, if necessary, raise a bug accordingly.

@nbelyh
Copy link
Author

nbelyh commented Nov 27, 2024

@Nivedipa-MSFT
I will create a test application and attach here. Will take a bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants