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

Declarative Copilot fails on devtunnel API call: The request was canceled due to the configured HttpClient.Timeout of 20 seconds elapsing #12691

Open
andreyselitsky opened this issue Nov 8, 2024 · 3 comments
Assignees
Labels

Comments

@andreyselitsky
Copy link

Describe the bug
Intermittent DevTunnel Timeout When Debugging Declarative Plugin with API Locally

When starting a debugging session (F5) for the Declarative Copilot with API plugin, initial requests often experience a timeout error:

"The request was canceled due to the configured HttpClient.Timeout of 20 seconds elapsing."

This timeout error generally occurs during the first few attempts, then gradually resolves as the DevTunnel stabilizes. Directly accessing the API via localhost (proxied through DevTunnel) works smoothly, so it seems the issue is specific to DevTunnel initialization delays. This behavior slows down the debugging process, impacting the development experience.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Declarative Copilot with API sample (e.g., func repairs).
  2. Hit F5 to start Debugging in Chrome.
  3. Open your Copilot and request repairs.
  4. See error (enable Dev info in chat): "The request was canceled due to the configured HttpClient.Timeout of 20 seconds elapsing."
  5. The issue generally resolves after a few retries as DevTunnel performance improves.

Expected behavior
Ideally, DevTunnel should respond promptly from the start, without delays or timeouts.

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

  • OS: macOS Sonoma
  • Version: 14.5 (23F79)

CLI Information (please complete the following information):

  • TTK v5.10.0

Additional context
There also appears to be occasional caching of the previous DevTunnel URL between reruns, leading to API call failures with a 404 error.

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 Nov 8, 2024
@adashen adashen added investigating TA:E2E Team Area: E2E labels Nov 11, 2024
@lijie-lee
Copy link
Contributor

Hi @andreyselitsky, thanks for your reaching out. I'll try to repoduce this issue and get back.

@adashen adashen removed the needs attention This issue needs the attention of a contributor. label Nov 14, 2024
@lijie-lee
Copy link
Contributor

Hi @andreyselitsky, I've tried to reproduce this issue by the steps you provided. It works well by my side.

Actually, we're upgrading the devtunnel used by TTK. You could have a try when the new release version is available.

Anyway, for now, there are two solutions may help you to walkaround:

  1. Use other tunnel alternatives choose your own tunnel solution
  2. Setup devtunnel by devtunnel cli by yourself and set the devtunnel session url to "OPENAPI_SERVER_URL" in the env file. (refer to Persistent Dev-Tunnel URLs Configuration for detail)

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

3 participants