erlang-ls / erlang_ls

The Erlang Language Server
https://erlang-ls.github.io/
Apache License 2.0
626 stars 136 forks source link

escript: exception error: undefined function erlang_ls:main/1 in function escript:run/2.. #1412

Open reganheath opened 1 year ago

reganheath commented 1 year ago

Describe the bug The language server will not start when using vscode "remote - ssh" plugin.

To Reproduce VSCode installed on windows and ubuntu. Erlang-ls extension installed on ubuntu (remote). Connect from windows vscode using "Remote - SSH" plugin (https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh).

Expected behavior I expected the language server to start without error.

Actual behavior The language server fails to start repeatedly (5 times) and vscode gives up.

Context

Errors shown (lower right) image

Attempt to run erlang_ls directly:

~/.vscode-server/extensions/erlang-ls.erlang-ls-0.0.39/erlang_ls/_build/default/bin/erlang_ls         [master]
escript: exception error: undefined function erlang_ls:main/1
  in function  escript:run/2 (escript.erl, line 758)
  in call from escript:start/1 (escript.erl, line 277)
  in call from init:start_em/1
  in call from init:do_boot/3
reganheath commented 1 year ago

Ah.. I may need a newer version of OTP? image

I have OTP 21.. Erlang/OTP 21 [erts-10.2.1] [source] [64-bit] [smp:6:6] [ds:6:6:10] [async-threads:1] [hipe]

Tho.. this page mentions OTP 21+ https://erlang-ls.github.io/getting-started/vscode/

mbardet82 commented 1 year ago

having the same issue but i am on OTP 25