vscode-copilot-release icon indicating copy to clipboard operation
vscode-copilot-release copied to clipboard

ERR_HTTP2_STREAM_CANCEL

Open ashilent opened this issue 1 year ago • 34 comments

  • VS Code Version: 1.85.1
  • OS Version: Windows_NT x64 10.0.19045
  • Logs: Please check your firewall rules and networking connection then try again. Error Code: ERR_HTTP2_STREAM_CANCEL

Steps to Reproduce:

  1. Type into copilot chat in VS code. Every now and then this error comes up. Sometimes it works completely fine.

ashilent avatar Jan 12 '24 00:01 ashilent

I am getting the same issue (inconsistent) but with MAC and VS code

dpgithub87 avatar Jan 24 '24 15:01 dpgithub87

me too

haddad-yacine avatar Feb 01 '24 20:02 haddad-yacine

Same error here

luismmp avatar Feb 07 '24 12:02 luismmp

me too. using prerelease CoPilot chat (0.13.xxx) on win with vscode, it actually locks up Copilot Chat (stop sign just sits there), and requires a restart of vscode. Rolling back to the CoPilot chat release version (0.12) gives me intermittent ERR_HTTP2_STREAM_CANCEL.. but it eventually resolves.

skavan avatar Feb 07 '24 22:02 skavan

Could you try adding:

"github.copilot.advanced": {
  "debug.useNodeFetcher": true
}

or:

"github.copilot.advanced": {
  "debug.useElectronFetcher": true
}

to your user settings. (F1 > Preferences: Open User Settings (JSON))

Both are experimental replacements for the current HTTP2 implementation Copilot Chat is using. The first might currently be more stable, the second is expected to stabilize a bit more and then become the default.

chrmarti avatar Feb 08 '24 10:02 chrmarti

I am finding that this is tied to the length of time between queries in CoPilot chat in vscode, but also whether or not I am performing SSL inspection on the traffic.

When the traffic is subject to SSL inspection, the inital conversation works fine but subsequent calls time out with the error referenced by @skavan

With traffic NOT subject to SSL inspection, the initial and subsequent conversations seem to work fine.

surprisequiona avatar Feb 20 '24 15:02 surprisequiona

Could you try adding:

"github.copilot.advanced": {
  "debug.useNodeFetcher": true
}

or:

"github.copilot.advanced": {
  "debug.useElectronFetcher": true
}

to your user settings. (F1 > Preferences: Open User Settings (JSON))

Both are experimental replacements for the current HTTP2 implementation Copilot Chat is using. The first might currently be more stable, the second is expected to stabilize a bit more and then become the default.

Even adding this on Preferences, does not work for me.

goliveic avatar Mar 06 '24 17:03 goliveic

same here

agombert avatar Mar 12 '24 15:03 agombert

same here, with mac and vscode

swiching to pre-release solve it...

ptogladif avatar Mar 12 '24 15:03 ptogladif

I am finding that this is tied to the length of time between queries in CoPilot chat in vscode, but also whether or not I am performing SSL inspection on the traffic.

I also seem to be getting this after a long delay between queries (eg. 12 hours)

JustinTBrown avatar Mar 20 '24 06:03 JustinTBrown

Has anyone found the cause of this issue? When our proxy is enabled we see this issue, disabling the proxy we dont see the issue.

Msekkdk avatar Apr 19 '24 08:04 Msekkdk

also seem to be having the same issue. I have a VPN set up working on vscode with windows

adriannavw avatar Apr 30 '24 00:04 adriannavw

I am also getting this after a short while. Restarting VS Code fixes it for some time. I am on Windows.

JustACasual avatar May 02 '24 10:05 JustACasual

This is happening for me as well. It seems to timeout after 10 minutes and I have to restart VS Code.

chelseaharalson avatar May 07 '24 21:05 chelseaharalson

Update: For me it turned out to be a certificate issue in my corporate network environment. VS Code is not trusting self signed root CAs. I solved it by activating extension "win-ca" and changing setting "Win-ca: Inject" to "Append".

The cert issue was visible in the copilot chat log, which can be accessed from the small copilot icon in the lower right corner in VS Code.

I found this workaround somewhere, didn't figure it out myself, but can't remember where...

JustACasual avatar May 08 '24 11:05 JustACasual

This is happeing again sicking tired

fisforfaheem avatar Jun 28 '24 17:06 fisforfaheem

Could you install the latest VS Code Insiders (https://code.visualstudio.com/insiders/) and the latest GitHub Copilot Chat pre-release (currently v0.17.2024062801), run F1 > Developer: GitHub Copilot Chat Diagnostics and share the output here?

chrmarti avatar Jul 01 '24 10:07 chrmarti

Could you try adding:

"github.copilot.advanced": {
  "debug.useNodeFetcher": true
}

or:

"github.copilot.advanced": {
  "debug.useElectronFetcher": true
}

to your user settings. (F1 > Preferences: Open User Settings (JSON))

Both are experimental replacements for the current HTTP2 implementation Copilot Chat is using. The first might currently be more stable, the second is expected to stabilize a bit more and then become the default.

any technical benfits?

fisforfaheem avatar Jul 01 '24 17:07 fisforfaheem

Could you install the latest VS Code Insiders (https://code.visualstudio.com/insiders/) and the latest GitHub Copilot Chat pre-release (currently v0.17.2024062801), run F1 > Developer: GitHub Copilot Chat Diagnostics and share the output here?

Copilot

  • Version: 1.208.962
  • Build: nightly
  • Editor: vscode/1.90.2

Environment

  • http_proxy: n/a
  • https_proxy: n/a
  • no_proxy: n/a
  • SSL_CERT_FILE: n/a
  • SSL_CERT_DIR: n/a
  • OPENSSL_CONF: n/a

Feature Flags

  • Send Restricted Telemetry: enabled
  • Chat: enabled

Node setup

  • Number of root certificates: 141
  • Operating system: Darwin
  • Operating system version: 20.6.0
  • Operating system architecture: x64
  • NODE_OPTIONS: n/a
  • NODE_EXTRA_CA_CERTS: n/a
  • NODE_TLS_REJECT_UNAUTHORIZED: n/a
  • tls default min version: TLSv1.2
  • tls default max version: TLSv1.3

Network Configuration

  • Proxy host: n/a
  • Proxy port: n/a
  • Kerberos SPN: n/a
  • Reject unauthorized: disabled
  • Fetcher: HelixFetcher

Reachability

  • github.com: HTTP 200
  • api.github.com: HTTP 200
  • copilot-proxy.githubusercontent.com: HTTP 200
  • api.githubcopilot.com: HTTP 200
  • default.exp-tas.com: HTTP 200

VS Code Configuration

  • HTTP proxy:
  • HTTP proxy authentication: n/a
  • Proxy Strict SSL: true
  • Extension HTTP proxy support: override

Extensions

  • Is win-ca installed?: false
  • Is mac-ca installed?: false

Authentication

  • GitHub username: fisforfaheem

fisforfaheem avatar Jul 01 '24 17:07 fisforfaheem

That looks good. Maybe try adding the following to the user settings JSON, it uses a different HTTP2 implementation (from Chromium) which might make a difference if the problem is indeed client-side:

"github.copilot.advanced": {
  "debug.useElectronFetcher": true
}

chrmarti avatar Jul 02 '24 07:07 chrmarti

I had the same issue on macos after my company started using Global Protect, a vpn application. Solved it using this extension: https://marketplace.visualstudio.com/items?itemName=linhmtran168.mac-ca-vscode

Julioevm avatar Jul 05 '24 11:07 Julioevm

There is a potential fix for this in the latest GitHub Copilot Chat pre-release (v0.18.2024071201). Please give that a try and let us know if this error still occurs. The pre-release version requires the latest VS Code Insiders (https://code.visualstudio.com/insiders/).

chrmarti avatar Jul 12 '24 06:07 chrmarti

The reference from StackOverflow below worked for me:

https://stackoverflow.com/questions/71367058/self-signed-certificate-in-certificate-chain-on-github-copilot

"""1 - Install win-ca 2 - In the win-ca settings, switch Inject to append mode (it's not the default). 3 - Restart VsCode"""

BrunoAPazetti avatar Jul 14 '24 10:07 BrunoAPazetti

It would be great to hear from someone who sees the ERR_HTTP2_STREAM_CANCEL if the fix in the latest GitHub Copilot Chat pre-release improves things. The pre-release version requires the latest VS Code Insiders (https://code.visualstudio.com/insiders/). Thanks.

chrmarti avatar Jul 15 '24 06:07 chrmarti

Thanks @chrmarti, when is it expected to be released as a stable version?

sag1v avatar Jul 18 '24 10:07 sag1v

@sag1v In about 2 weeks alongside the next VS Code stable release (which doesn't have a fixed date).

chrmarti avatar Jul 18 '24 13:07 chrmarti

I also had the ERR_HTTP2_STREAM_CANCEL error. Using the Insiders version of VS-Code with the the latest prerelease verison of GitHub CoPilot did NOT work. I could fix it by setting BOTH values to true: "github.copilot.advanced": { "debug.useNodeFetcher": true, "debug.useElectronFetcher": true }

Now it does also work with the stable version of the GitHub CoPilot Chat

sries-bhs avatar Jul 23 '24 11:07 sries-bhs

I don't believe I've ever encountered this issue myself in the first place, but I'm considering this issue verification-found due to @sries-bhs's comment.

rzhao271 avatar Jul 25 '24 21:07 rzhao271

Actually, @sag1v could you also try verifying this issue on the latest VS Code Insiders along with the latest GitHub Copilot Chat pre-release extension?

rzhao271 avatar Jul 25 '24 21:07 rzhao271

I don't have verification steps.

chrmarti avatar Jul 26 '24 12:07 chrmarti