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

Error [ERR_STREAM_WRITE_AFTER_END] occurs after client.stop()

Open jonaskrask opened this issue 3 years ago • 0 comments

After the update to the vscode client v7.0.0 and change to the ownership of the socket, the following error occurs after a client.stop() call:

rejected promise not handled within 1 second: Error [ERR_STREAM_WRITE_AFTER_END]: write after end stack trace: Error [ERR_STREAM_WRITE_AFTER_END]: write after end at Socket.write (internal/streams/writable.js:292:11) at c:\Users\au543131\Documents\Github\vdm-vscode\dist\extension.js:25155:29 at new Promise () at WritableStreamWrapper.write (c:\Users\au543131\Documents\Github\vdm-vscode\dist\extension.js:25145:16) at StreamMessageWriter.doWrite (c:\Users\au543131\Documents\Github\vdm-vscode\dist\extension.js:24410:33) at c:\Users\au543131\Documents\Github\vdm-vscode\dist\extension.js:24401:29

I have not been able to identify if the error is caused by us or it is a bug in vscode, but it might be related to this issue: https://github.com/microsoft/vscode-languageserver-node/issues/755. If so the error will probably disappear when we update to the next client version.

The easiest way to reproduce without changing the project is to open a multi-root workspace, activate the extension by opening a vdm file, then remove the folder containing that file from the workspace.

jonaskrask avatar Feb 07 '22 10:02 jonaskrask