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

F5 launches desktop client instead of web browser | VS 2022 17.10.4 #12052

Open
garrytrinder opened this issue Jul 23, 2024 · 6 comments
Open
Assignees
Labels
upstream The issue is tracked external dependency

Comments

@garrytrinder
Copy link

Describe the bug
Starting a debug session in Visual Studio opens the v2 desktop client instead of launching a browser window. The app dialog window displays app cannot be found as the desktop client is logged into a different tenant.

To Reproduce
Steps to reproduce the behavior:

  1. Create project using Custom Search Results template
  2. Configure dev tunnel
  3. Run Prepare Teams App Dependencies
  4. Press F5

Expected behavior
Web browser should be launched and app install dialog shown.

Visual Studio Information:

Microsoft Visual Studio Enterprise 2022
Version 17.10.4
VisualStudio.17.Release/17.10.4+35027.167

Additional context

Default launchUrl in Microsoft Teams (browser) profile.

https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&appTenantId=${{TEAMS_APP_TENANT_ID}}&login_hint=${{TEAMSFX_M365_USER_NAME}}

Copy link
Contributor

Thank you for contacting us! Any issue or feedback from you is quite important to us. We will do our best to fully respond to your issue as soon as possible. Sometimes additional investigations may be needed, we will usually get back to you within 2 days by adding comments to this issue. Please stay tuned.

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Jul 23, 2024
@garrytrinder
Copy link
Author

garrytrinder commented Jul 23, 2024

If I open Edge in a profile for my developer tenant, i.e. using the account used in TTK, and use a URL with hardcoded values, the app install dialog is launched in the web client as expected.

https://teams.microsoft.com/l/app/1d96b6f6-23f2-4ac8-bb15-ca7d5fc40c37?installAppPackage=true&webjoin=true&appTenantId=9ae939a9-4eea-435d-8072-813ad2d03408&[email protected]

This URL is not shown in the Teams Toolkit logs, it would be useful if it was.

If I use the same URL in my primary tenant browser profile, the web client is launched but it launches the client in my primary tenant. The login_hint and tenantId parameters seemed to be ignored.

If I remove the webjoin parameter, the desktop client is launched and the app install dialog shows an error as the desktop client uses a different account to my developer tenant.

@blackchoey
Copy link
Contributor

blackchoey commented Jul 24, 2024

@garrytrinder You need to keep the webjoin parameter, which tells Teams to open the web client for you directly.
Teams has a bug that it does not respect login_hint provided by TTK. We're still communicating with related people to get this fixed. Before that, please manually switch to your developer tenant before launching the app.

This URL is not shown in the Teams Toolkit logs, it would be useful if it was.

For above issue you mentioned, you may find the url in your VS project's launch.json file.

@blackchoey blackchoey added upstream The issue is tracked external dependency and removed needs attention This issue needs the attention of a contributor. labels Jul 24, 2024
@garrytrinder
Copy link
Author

Thanks @blackchoey. In my case, the web browser does not launch at all, so I have to open a new browser window with the correct profile, then manually upload the app package.

The URL in the launch.json contains placeholders, so you have to replace the placeholders with values from the env file manually. In VS Code, the full URL without placeholders is shown in the logs, but in VS logs it is not.

@garrytrinder
Copy link
Author

Seems like this is machine specific, on my desktop the windows client is always launched, but on my laptop the web client is launched. Both are Windows 11 machines.

@blackchoey
Copy link
Contributor

@Alive-Fish Can you help with Garry's query below?

  1. On some machines, VS opens Teams desktop client instead of web client.
  2. The actual launch url for web client is not outputted, but VS Code outputs the url. Is this a bug or a feature request to VS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream The issue is tracked external dependency
Projects
None yet
Development

No branches or pull requests

3 participants