TerminalFi / LSP-copilot

GitHub Copilot support for Sublime Text LSP plugin provided through Copilot.vim.
625 stars 25 forks source link

Payload cancelled by server? #43

Open jfcherng opened 1 year ago

jfcherng commented 1 year ago
:: <-  LSP-copilot statusNotification: {'message': '', 'status': 'Normal'}
:: <<< LSP-copilot 12: {'completions': []}
:: <-  LSP-copilot LogMessage: {'level': 1, 'message': '[INFO] [default] [2022-08-01T07:59:31.840Z] request.response: [https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex/completions] took 283 ms', 'metadataStr': '[INFO] [default] [2022-08-01T07:59:31.840Z]', 'extra': ['request.response: [https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex/completions] took 283 ms']}
:: <-  LSP-copilot statusNotification: {'message': '', 'status': 'Warning'}
↑ Warning
:: <-  LSP-copilot LogMessage: {'level': 1, 'message': '[INFO] [fetch] [2022-08-01T07:59:31.840Z] Cancelled by server', 'metadataStr': '[INFO] [fetch] [2022-08-01T07:59:31.840Z]', 'extra': ['Cancelled by server']}
↑ Cancelled by server
:: <<< LSP-copilot 13: {'completions': []}
↑ Always empty

There seems to be some rate/burst limit things? I encounter Cancelled by server quite frequently and always get empty completions when this happens.

TerminalFi commented 1 year ago

Yeah, interesting. I wonder if we need to monitor for certain messages in the LogMessage response

TerminalFi commented 1 year ago

@jfcherng are you still seeing this ? I've not received it in awhile. And I also don't believe this is an issue with the plug-in.

The only thing I can think of I potentially monitoring for this issue, then refrigerant the request again. But I don't believe it is needed.

Thoughts ?

rchl commented 1 year ago

In the initial log it looks like there were two completion requests made without waiting for the response. I suppose server only expects one at a time. In that sense it looks like a client issue. It shouldn't happen with LSP but I guess it might if you have some custom logic that requests those.

TerminalFi commented 1 year ago

In the initial log it looks like there were two completion requests made without waiting for the response. I suppose server only expects one at a time. In that sense it looks like a client issue. It shouldn't happen with LSP but I guess it might if you have some custom logic that requests those.

That makes the most sense.

rchl commented 1 year ago

Actually I've just noticed that it can happen with plain LSP too so it's probably something that we should fix.

TerminalFi commented 2 days ago

Actually I've just noticed that it can happen with plain LSP too so it's probably something that we should fix.

Did you ever get a chance to look into this ?