Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erlang LS server crashed #142

Open
rlipscombe opened this issue Jan 10, 2023 · 5 comments
Open

Erlang LS server crashed #142

rlipscombe opened this issue Jan 10, 2023 · 5 comments

Comments

@rlipscombe
Copy link

(not a duplicate of #71; that was resolved by an upgrade)

ErlangLS in VS Code is unable to talk to the server:

[Info  - 1:50:16 PM] Connection to server got closed. Server will restart.
[Error - 1:50:16 PM] Request textDocument/codeAction failed.
Error: Connection got disposed.
	at Object.dispose (/Users/rogerlipscombe/.vscode/extensions/erlang-ls.erlang-ls-0.0.39/client/node_modules/vscode-jsonrpc/lib/common/connection.js:1044:27)
	at Object.dispose (/Users/rogerlipscombe/.vscode/extensions/erlang-ls.erlang-ls-0.0.39/client/node_modules/vscode-languageclient/lib/common/client.js:73:35)
	at LanguageClient.handleConnectionClosed (/Users/rogerlipscombe/.vscode/extensions/erlang-ls.erlang-ls-0.0.39/client/node_modules/vscode-languageclient/lib/common/client.js:2424:42)
	at LanguageClient.handleConnectionClosed (/Users/rogerlipscombe/.vscode/extensions/erlang-ls.erlang-ls-0.0.39/client/node_modules/vscode-languageclient/lib/node/main.js:155:15)
	at closeHandler (/Users/rogerlipscombe/.vscode/extensions/erlang-ls.erlang-ls-0.0.39/client/node_modules/vscode-languageclient/lib/common/client.js:2411:18)
	at CallbackList.invoke (/Users/rogerlipscombe/.vscode/extensions/erlang-ls.erlang-ls-0.0.39/client/node_modules/vscode-jsonrpc/lib/common/events.js:55:39)
	at Emitter.fire (/Users/rogerlipscombe/.vscode/extensions/erlang-ls.erlang-ls-0.0.39/client/node_modules/vscode-jsonrpc/lib/common/events.js:117:36)
	at closeHandler (/Users/rogerlipscombe/.vscode/extensions/erlang-ls.erlang-ls-0.0.39/client/node_modules/vscode-jsonrpc/lib/common/connection.js:256:26)
	at CallbackList.invoke (/Users/rogerlipscombe/.vscode/extensions/erlang-ls.erlang-ls-0.0.39/client/node_modules/vscode-jsonrpc/lib/common/events.js:55:39)
	at Emitter.fire (/Users/rogerlipscombe/.vscode/extensions/erlang-ls.erlang-ls-0.0.39/client/node_modules/vscode-jsonrpc/lib/common/events.js:117:36)
	at StreamMessageWriter.fireClose (/Users/rogerlipscombe/.vscode/extensions/erlang-ls.erlang-ls-0.0.39/client/node_modules/vscode-jsonrpc/lib/common/messageWriter.js:42:27)
	at Socket.<anonymous> (/Users/rogerlipscombe/.vscode/extensions/erlang-ls.erlang-ls-0.0.39/client/node_modules/vscode-jsonrpc/lib/common/messageWriter.js:75:42)
	at Socket.emit (node:events:526:28)
	at Socket.emit (node:domain:475:12)
	at Pipe.<anonymous> (node:net:687:12)

This is not necessarily a surprise to me, because I'm using a development build of Erlang/OTP:

Erlang/OTP 26 [DEVELOPMENT] [erts-13.1.3] [source-a696bdf8de] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]

...which I've awkwardly wedged into my direnv/kerl setup.

My question is this: how can I investigate this?

erlang_ls works fine with the version of Erlang as-built:

% which erl
/Users/rogerlipscombe/.kerl/erlangs/source/bin/erl
% .vscode/extensions/erlang-ls.erlang-ls-0.0.39/erlang_ls/_build/default/bin/erlang_ls --version
Version: 0.44.1

...so why isn't it working correctly when used from VS Code? What logs can I look in?

@robertoaloi
Copy link
Member

Hi @rlipscombe , did you already try to look at the logs or to attach to a running instance as described here?

1 similar comment
@robertoaloi
Copy link
Member

Hi @rlipscombe , did you already try to look at the logs or to attach to a running instance as described here?

@rlipscombe
Copy link
Author

Thanks. Not yet, no. I'll dig more into it tomorrow, once I'm back on the work laptop where this is happening.

@joaohf
Copy link

joaohf commented Mar 27, 2023

Hello,

I'm having almost the same issue. Any hint about how to better debug it ?

Here are the vscode output and erlang_ls log. I'm using the same versions as @rlipscombe.

vscode_output.txt
server.log

image

Thanks

@sefarious
Copy link

Hello,

I'm having almost the same issue. Any hint about how to better debug it ?

Here are the vscode output and erlang_ls log. I'm using the same versions as @rlipscombe.

vscode_output.txt server.log

image

Thanks

Have you checked rebar3 path in the settings? It seems to me that's what causes that server start failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants