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

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

Open
reganheath opened this issue Nov 22, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@reganheath
Copy link

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

  • erlang_ls version (tag/sha): v0.0.39
  • Editor used: vscode
  • LSP client used: vscode

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 reganheath added the bug Something isn't working label Nov 22, 2022
@reganheath
Copy link
Author

reganheath commented Nov 22, 2022

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
Copy link

having the same issue but i am on OTP 25

@backerman
Copy link

backerman commented Sep 26, 2024

And on OTP 27.1 but running on a Mac (not dev container). But the extension installs 0.43 so I need to check with the current version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants