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

Do not launch browser with the default profile, instead show the URL so I can select my profile. #13247

Open
ridomin opened this issue Feb 20, 2025 · 3 comments
Labels
needs attention This issue needs the attention of a contributor.

Comments

@ridomin
Copy link

ridomin commented Feb 20, 2025

I have multiple tenants, and one browser profile for each.

When I hit F5, TTK always start a browser with the default profile, and I could not find the URL I need to paste in the browser I want to use.

Can you use the current active browser? or at least show the URL so I can select the profile I need?

Copy link

👋 Hi @ridomin,

Thank you for reporting this issue! We want to let you know that:

⏱️ Our team will personally review your issue
🎯 You can expect a response within 2 business days

✨ This is an AI-generated initial response
🤖 AI-Generated Preliminary Analysis:

Based on your issue of the Teams Toolkit (TTK) launching the browser with the default profile and not showing the URL, there are a couple of steps you can take to manage your multiple browser profiles more effectively:

Proposed Solutions:

  1. Manual URL Launch:

    • Manually copy and paste the URL to the desired browser profile. This method involves capturing the URL from the console or logs and using it directly. However, this can be cumbersome and may not always display in the logs.
  2. Modify the Launch Settings:

    • You can customize the launch.json file in your project to include the URL needed for Teams. Modify it to show the Teams web app URL directly:
    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "Launch Remote (Edge)",
                "type": "pwa-msedge",
                "request": "launch",
                "url": "https://teams.microsoft.com/l/app/${teamsAppId}?installAppPackage=true&webjoin=true&${account-hint}",
                "presentation": {
                    "group": "remote",
                    "order": 1
                }
            },
            {
                "name": "Launch Remote (Chrome)",
                "type": "pwa-chrome",
                "request": "launch",
                "url": "https://teams.microsoft.com/l/app/${teamsAppId}?installAppPackage=true&webjoin=true&${account-hint}",
                "presentation": {
                    "group": "remote",
                    "order": 2
                }
            }
        ]
    }
  3. Feature Request:

    • The issue you are experiencing has been noted by other developers. There is an existing feature request on GitHub to allow specifying the browser and profile for the local preview. You can track this issue and add your comments for visibility: GitHub Issue #1772.

Actionable Steps:

  1. Monitor the GitHub Issue for Updates:

    • Keep an eye on the GitHub issue #1772 for any updates on adding a feature to specify the browser and profile directly.
  2. Alternative Workflows:

    • Until the feature is implemented, you can try opening the required URL in an InPrivate or non-profile window to avoid conflicts with default profiles.
  3. Check for Logs:

    • Look into the logs or console output during the debug session to capture the URL if it is displayed.

By following these steps, you can better manage which browser profile is used while debugging your Teams app.


Note: This is an automated first response generated by AI. A human team member will review your issue and provide a more detailed response soon. We appreciate your patience!

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Feb 20, 2025
@Nivedipa-MSFT
Copy link

@ridomin - Thank you for bringing this issue to our attention. We will look into it and get back to you shortly.
This is a common issue when working with multiple tenants and browser profiles while developing with the Teams Toolkit (TTK). As of now, TTK does not provide a built-in feature to select the browser profile or display the URL directly. However, there are a few potential workarounds and steps you can take to manage this situation more effectively.

Workarounds:

Manual URL Retrieval:
After starting the debug session with F5, manually retrieve the URL from the browser that TTK opens and paste it into the desired browser profile.
One way to find the URL is to open the browser's developer tools (usually F12 or right-click and select "Inspect"), go to the Network tab, and find the first request URL after the page loads.

Use a Custom Debug Task:
Create a custom task in launch.json to launch the browser with the desired profile.
Modify the launch.json file to specify the browser and profile.

Please let us know if you have any further query here.

@ridomin
Copy link
Author

ridomin commented Feb 20, 2025

Can you just print the URL to be launched in the ttk logs?

not sure how you open links, but using the active browser works in many other scenarios (eg, when using az login)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs attention This issue needs the attention of a contributor.
Projects
None yet
Development

No branches or pull requests

2 participants