vscode-httpyac icon indicating copy to clipboard operation
vscode-httpyac copied to clipboard

"No connection established. Last error: null" after connection forcefully closed

Open ncsibra opened this issue 8 months ago • 4 comments

Steps to reproduce:

  1. Start a GRPC server locally.
  2. Start a long-running server stream to that server.
  3. Shutdown the server while the connection is still active in VS Code.
  4. Restart server.
  5. Try to call any endpoint from VS Code, either unary or stream endpoint, it will return a "No connection established. Last error: null".

At point 3, VS Code shows a "Call cancelled" message, so looks like the connection was terminated on both sides, but for some reason after the server restart it won't be able to connect back. Sometimes it solves itself after a few tries, sometimes deleting the sessions looks like work, but a lot of times I need to restart VS Code to work again. It does not happen if there is no pending connection to the server, only when a stream is in progress and the server is forcefully stopped, which can happen a lot during development.

The relevant log entry:

Error: Error: 14 UNAVAILABLE: No connection established. Last error: null
	at AU.<anonymous> (/home/ncsibra/.vscode-server/extensions/anweber.vscode-httpyac-6.14.0/dist/extension.js:137:158735)
	at AU.emit (node:events:518:28)
	at Object.onReceiveStatus (/home/ncsibra/.vscode-server/extensions/anweber.vscode-httpyac-6.14.0/dist/extension.js:90:5903)
	at Object.onReceiveStatus (/home/ncsibra/.vscode-server/extensions/anweber.vscode-httpyac-6.14.0/dist/extension.js:88:8193)
	at /home/ncsibra/.vscode-server/extensions/anweber.vscode-httpyac-6.14.0/dist/extension.js:104:30902
	at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

ncsibra avatar Jun 20 '24 10:06 ncsibra