Agent not works. the reason seems not Http2

Hello. I can’t use Agent. there always is the error.

This is the output of Window

2024-12-09 17:27:36.009 [error] Protocol error: Error: Protocol error
    at Http2Session.onSessionInternalError (node:internal/http2/core:803:26)
2024-12-09 17:27:36.585 [error] [internal] Protocol error: ConnectError: [internal] Protocol error
    at Object.F [as unary] (vscode-file://vscode-app/c:/Users/xiahan/AppData/Local/Programs/Cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:3856:12076)
    at async Object.cppConfig (vscode-file://vscode-app/c:/Users/xiahan/AppData/Local/Programs/Cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:266:139256)
    at async li.loadCppConfigIncludingHandlingProAccess (vscode-file://vscode-app/c:/Users/xiahan/AppData/Local/Programs/Cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:4225:1122)

I have checked http2 status

xiahan@XiahanSurface8 MINGW64 ~
$ curl -v --http2 https://api4.cursor.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 198.18.0.22:443...
* Connected to api4.cursor.sh (198.18.0.22) port 443 (#0)
* ALPN: offers h2
* ALPN: offers http/1.1
*  CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt

I am sure my proxy is ok.Because when I use curl -v --http2 https://api4.cursor.sh , I can get the http2 header

I can use Chat, Composer’s normal.

So I guess,the real error is not in Http2.
though there are some texts to show the error is in the Http2

how to fix it to use Agent?

1 Like