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

DevTunnel not getting picked up. DevTunnelNotPublicError even after creating a new tunnel #11136

Open
praskutti opened this issue Mar 20, 2024 · 10 comments
Assignees
Labels

Comments

@praskutti
Copy link

praskutti commented Mar 20, 2024

I downloaded and installed Teams Toolkit for Visual Studio 2022 (Professional and Community) 17.9.4. When I created a new project (Echo Bot template), I followed the instructions as per GetStarted.md file.

I created a Dev Tunnel as suggested in step 1. But when I clicked on "Prepare App for Dependencies", the get hit with "The DevTunnel '' is not set to public". But I can confirm and assure that the default DevTunnel is in fact public. Is there any documentation on how to resolve this? Why is the DevTunnel not printed in the error message?

I am using VS2022 behind a corporate VPN.

When I choose "none" as the DevTunnel, I then get a "Cannot send API call to dev.teams.microsoft.com" error. I am not able to proceed any further.

Can someone please help?

Visual Studio 2022 (Professional and Community) 17.9.4
Windows 11
NodeJS 18.7.1

Edit 1: This is the exact error I am getting : Visual Studio - Teams Project Issue
Copying the error message, so it is searchable in here:
"The dev tunnel with the name '' is not set to public access. Please use a public dev tunnel in the debug dropdown menu (Dev Tunnels) to prepare Teams app."

Edit 2 : If I use "none" as the DevTunnel, I get this error : Prepare Teams App Dependencies fails behind proxy
Copying the error message, so it is searchable in here:
I create a new Teams application in Visual Studio 2022 (17.4.4). When I try the "Prepare Teams App Dependencies", I get a failure from AppStudioPlugin with the message "API call to Developer Portal failed: Error, connect EACCES 52.113.194.132:443, API name: create-app, ..." I am behind a proxy, and I see a drop in the firewall logs to 52.113.194.132:443, so it's not going to the proxy.

I tried using "Private", "Organization" and "Public" as access level, used GitHub Enterprise account as well as corporate M365 account, but same errors

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Mar 20, 2024
@adashen adashen added investigating TA:Infra Team Area: Infra labels Mar 20, 2024
@xiaolang124
Copy link
Contributor

When using a dev tunnel in Visual Studio, could you please check the access type of the development tunnel in the Visual Studio development tunnels window? Verify if it's set as a public development tunnel.

image
image

@xiaolang124 xiaolang124 removed the needs attention This issue needs the attention of a contributor. label Mar 20, 2024
@praskutti
Copy link
Author

praskutti commented Mar 20, 2024 via email

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Mar 20, 2024
@xiaolang124 xiaolang124 removed the needs attention This issue needs the attention of a contributor. label Mar 20, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Mar 20, 2024
@xiaolang124
Copy link
Contributor

Sorry for your inconvenience. We will continue to investigate the root cause. Since the Teams toolkit will attempt to check the type of tunnels, could you please check if any requests are not being handled successfully?

Another thing can you try to install ngrok and run the command (ngrok http 5130) to initiate tunneling. Afterward, prepare the Teams app and debug.

@aurnor
Copy link

aurnor commented Mar 20, 2024

Exact same issue here. The Dev Tunnel is set as public and I also get the DevTunnelNotPublicError.

@praskutti
Copy link
Author

praskutti commented Mar 20, 2024

Since the Teams toolkit will attempt to check the type of tunnels, could you please check if any requests are not being handled successfully?

@xiaolang124 , do you mean the calls going out of Visual Studio or after the teams app is running after hitting the F5 button?

Another thing can you try to install ngrok and run the command (ngrok http 5130) to initiate tunneling. Afterward, prepare the Teams app and debug.

Our policy doesnt allow us to install ngrok, but i will try to get an exception and try your suggestion.

Also, the name of the devtunnel is not printed in the error message. It is printed as " ". Does it mean the Echo Bot template is not utilising the tunnels at all?

@praskutti
Copy link
Author

To add, I am able to run / debug an app using the default templates from Visual Studio Code. Only Visual Studio 2022 is where I am unable to run or prepare app.

@xiaolang124 xiaolang124 removed the needs attention This issue needs the attention of a contributor. label Mar 21, 2024
@xiaolang124
Copy link
Contributor

xiaolang124 commented Mar 21, 2024

e. Since the Teams toolkit will attempt to check the type of tunnels, could you please check if any requests are not being handled successfully?

Yes, we will utilize the dev tunnel SDK to make an HTTP call to verify the type of the dev tunnel. If this call fails, the toolkit won't be able to retrieve any tunnel information and will return an empty string. Consequently, the bot template won't be able to utilize this tunnel at all.
We may skip this check when encountering network error in a later version.

@xiaolang124
Copy link
Contributor

Thank you for reporting the bug. We have identified the root cause and will address it in the 17.10 Preview 3 release. Apologies for any inconvenience caused by the delay.

@praskutti
Copy link
Author

@xiaolang124 , can you please let us know what the bug was?

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Mar 25, 2024
@xiaolang124 xiaolang124 removed the needs attention This issue needs the attention of a contributor. label Mar 26, 2024
@xiaolang124
Copy link
Contributor

Recently, the VS Dev Tunnel has updated its ID generation logic. The TeamsFX Toolkit now needs to support two ID patterns. If you've previously created a dev tunnel, you can use that tunnel for debugging. Alternatively, you can wait for the release of either 17.10 Preview 3 or 17.10 stable.

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

No branches or pull requests

4 participants