copilot-emacs / copilot.el

An unofficial Copilot plugin for Emacs.
MIT License
1.78k stars 126 forks source link

Got error message "[jsonrpc] Server exited with status 9" with Spacemacs #333

Open fperies opened 1 month ago

fperies commented 1 month ago

Hello,

I'm trying to get this usefull Emacs Copilot plugin working in Spacemacs but with no chance so far.

I've setup the layer github-copilot as required and been able to login with my Copilot account.

But I get the following error: [jsonrpc] Server exited with status 9 (as I've seen in some others issues but with no solution that works for me). These are the logs I get from the *copilot events* buffer:

----------b---y---e---b---y---e----------
[stderr] 
[stderr] 
[stderr] nil
[stderr] nil
[stderr] Process copilot agent stderr<1> finished
[stderr] 
[stderr] 
[stderr] nil
[stderr] nil
[stderr] Process copilot agent stderr finished

I can not see any additional logs (I'm wondering if there is some kind of log level selection actually?)

Also, from a separate shell, when I run the agent with the --stdio option I haven't noticed any particular errors nor messages. I guess the process is just waiting some requests on its standard input.

Let me know if I can provide with any additional debug informations.

Copilot version: 1.27.0 Commit: 3af3a5f Node version: v20.9.0

Thank you for your support !

fperies commented 3 weeks ago

Some additional informations: By setting environment variables NODE_DEBUG and DEBUG, I get the following logs after invocation of command (copilot-diagnose):

[stderr] 2024-08-23T10:07:45.289Z helix-fetch:core established TLS connection: #3 (copilot-telemetry.githubusercontent.com)
[stderr] 2024-08-23T10:07:45.289Z helix-fetch:core copilot-telemetry.githubusercontent.com -> h2
[stderr] 2024-08-23T10:07:45.289Z helix-fetch:h2 reusing socket #3 (copilot-telemetry.githubusercontent.com)
[stderr] 2024-08-23T10:07:45.290Z helix-fetch:h2 POST copilot-telemetry.githubusercontent.com/telemetry
[stderr] 2024-08-23T10:07:45.290Z helix-fetch:h2 session https://copilot-telemetry.githubusercontent.com established
[stderr] 2024-08-23T10:07:45.291Z helix-fetch:h2 caching session https://copilot-telemetry.githubusercontent.com
[stderr] 2024-08-23T10:07:45.487Z helix-fetch:h2 session https://copilot-telemetry.githubusercontent.com remoteSettings: {"headerTableSize":4096,"enablePush":true,"initialWindowSize":67108864,"maxFrameSize":68608,"maxConcurrentStreams":100,"maxHeaderListSize":4294967295,"maxHeaderSize":4294967295,"enableConnectProtocol":true}
[stderr] 2024-08-23T10:07:45.487Z helix-fetch:h2 session https://copilot-telemetry.githubusercontent.com localSettings: {"headerTableSize":4096,"enablePush":true,"initialWindowSize":65535,"maxFrameSize":16384,"maxConcurrentStreams":4294967295,"maxHeaderListSize":4294967295,"maxHeaderSize":4294967295,"enableConnectProtocol":false}
[stderr] 2024-08-23T10:08:00.687Z helix-fetch:h2 session https://api.github.com received GOAWAY frame: errorCode: 0, lastStreamID: 3, opaqueData: undefined
[stderr] NET 4051: _final: not ended, call shutdown()
[stderr] NET 4051: afterShutdown destroyed=false
[stderr] NET 4051: destroy
[stderr] NET 4051: close
[stderr] NET 4051: close handle
[stderr] NET 4051: emit close
[stderr] 2024-08-23T10:08:00.690Z helix-fetch:h2 session https://api.github.com closed
[stderr] 2024-08-23T10:08:00.690Z helix-fetch:h2 discarding cached session https://api.github.com
[stderr] NET 4051: destroy
[stderr] NET 4051: close
[stderr] NET 4051: close handle
[stderr] 2024-08-23T10:09:31.158Z helix-fetch:h2 session https://default.exp-tas.com encountered error: Error: read ECONNRESET
[stderr] 2024-08-23T10:09:31.158Z helix-fetch:h2 discarding cached session https://default.exp-tas.com
[stderr] 2024-08-23T10:09:31.158Z helix-fetch:h2 session https://default.exp-tas.com closed
[stderr] NET 4051: emit close
[stderr] 2024-08-23T10:09:45.814Z helix-fetch:h2 session https://copilot-telemetry.githubusercontent.com received GOAWAY frame: errorCode: 0, lastStreamID: 1, opaqueData: undefined
[stderr] NET 4051: _final: not ended, call shutdown()
[stderr] NET 4051: afterShutdown destroyed=false
[stderr] NET 4051: destroy
[stderr] NET 4051: close
[stderr] NET 4051: close handle
[stderr] 2024-08-23T10:09:45.815Z helix-fetch:h2 session https://copilot-telemetry.githubusercontent.com closed
[stderr] 2024-08-23T10:09:45.816Z helix-fetch:h2 discarding cached session https://copilot-telemetry.githubusercontent.com
[stderr] NET 4051: emit close

The errors I notice are:

helix-fetch:h2 session https://api.github.com received GOAWAY frame: errorCode: 0, lastStreamID: 3, opaqueData: undefined ... helix-fetch:h2 session https://default.exp-tas.com encountered error: Error: read ECONNRESET

I really don't know what it corresponds to, any help would be appreciated...

Thanks!