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

Error: Unable to execute dev tunnel operation 'create' #10862

Open
J-Roberts1 opened this issue Feb 9, 2024 · 4 comments
Open

Error: Unable to execute dev tunnel operation 'create' #10862

J-Roberts1 opened this issue Feb 9, 2024 · 4 comments
Assignees
Labels

Comments

@J-Roberts1
Copy link

Describe the bug
I am replicating the "Teams AI Library Quick Start Guide'. I am able to successfully follow all the steps up until step 17. Upon debugging I get the following error: "The preLaunch Task 'Start Teams Locally' terminated with exit code 1.". In terminal the error reads
"Executing task: Start local tunnel
Starting local tunnel service
Dev tunnel tag: TeamsToolkitCreatedTag.
Failed to start local tunnel service.
Unable to execute dev tunnel operation 'create'. Hostname/IP does not match certificate's altnames: Host: global.rel.tunnels.api.visualstudio.com. is not in the cert's altnames:
"

To Reproduce
Steps to reproduce the behavior:

  1. Follow steps 1-17 of the Teams AI Library Quick Start Guide

Expected behavior
A browser tab should open a Teams web client requesting to add the bot to my tenant.

Screenshots

ss1 1
ss2

VS Code Extension Information (please complete the following information):

  • OS: Windows 10 22H2
  • Version 1.86.1
@SLdragon
Copy link
Contributor

Hi, @J-Roberts1, thanks for your feedback, from the error message, seems this error is related to the local dev tunnel. Please check your network, and disable proxy and try again. If it doesn't work, you can follow below steps to setup local dev tunnel manually:

  • Install dev tunnel cli.
  • Login with your M365 Account using the command devtunnel user login.
  • Start your local tunnel service by running the command devtunnel host -p 3978 --protocol http --allow-anonymous.
  • In the env/.env.local file, fill in the values for BOT_DOMAIN and BOT_ENDPOINT with your dev tunnel URL.
    BOT_DOMAIN=sample-id-3978.devtunnels.ms
    BOT_ENDPOINT=https://sample-id-3978.devtunnels.ms/
    
  • Remove "Start local tunnel" task in tasks.json
  • Press F5 to start again

@J-Roberts1
Copy link
Author

@SLdragon Thanks for your reply. I tried disabling t proxy and that didn't resolve the issue. I moved on to the steps you outlined but I encountered a new error in the CLI.

PS C:\Users\myuser> .\devtunnel host -p 3978 --protocol http --allow-anonymous
The SSL connection could not be established, see inner exception.

I think this error message indicates that there is an underlying issue with one of the SSL certificates. Does that seem like an accurate assumption to you?

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Feb 12, 2024
@J-Roberts1 J-Roberts1 reopened this Feb 12, 2024
@njaci1
Copy link

njaci1 commented Feb 14, 2024

I got a similar issue while working with Teams Toolkit. I figured that it could be because I was on different internet connection that the one I was connecting on before. Upon resuming to my usual internet connection the issue resolved. @J-Roberts1 could you try a different internet connection and see?

Here is the error I was getting:
[2024-02-14T13:19:09.982Z] [Error] - code:Ext.DevTunnelOperationError, message: Unable to execute dev tunnel operation 'create'. self signed certificate in certificate chain
Help link: https://aka.ms/teamsfx-local-tunnel-task

@XiaofuHuang
Copy link
Contributor

XiaofuHuang commented Feb 20, 2024

@J-Roberts1
I suspect that the user might have a configured proxy server, and the SSL certificate errors are likely being triggered by the proxy server’s SSL certificate. It's possible that the proxy server is injecting its own HTTPS certificate. Normally, in such a scenario, the proxy server's certificate would be added to the Windows certificate store as a trusted root certificate.

Unfortunately, the support for proxy in VS Code extension is still not fully developed. This is being monitored under issue microsoft/vscode#12588, although there haven't been significant updates for some time.

There are a couple of potential workarounds to enable VS Code extensions to connect through a proxy that replaces HTTPS certificates:

  • Set the environment variable NODE_EXTRA_CA_CERTS=<your-proxy-root-ca.crt>
  • Launch VS Code with the code --ignore-certificate-errors command.

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

6 participants