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 installation failed (error=spawn: bash) #1835

Open
2 tasks done
ignamartinoli opened this issue Nov 24, 2024 · 3 comments
Open
2 tasks done

erlang-ls installation failed (error=spawn: bash) #1835

ignamartinoli opened this issue Nov 24, 2024 · 3 comments

Comments

@ignamartinoli
Copy link

I've searched open issues for similar requests

  • Yes

I've recently downloaded the latest plugin version of mason.nvim

  • Yes

Problem description

During the Erlang LS installation via Mason, at step 825 I receive the following error:

[INFO  Sun 24 Nov 2024 05:38:39 PM -03] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=erlang-ls) {}
[ERROR Sun 24 Nov 2024 05:39:07 PM -03] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=erlang-ls) error=spawn: bash failed with exit code 1 and signal 0. 

No other LS presents this issue

Expected behavior

erlang-ls installation successfully completed

Affected packages

erlang-ls

Mason output

◍ erlang-ls
      ▶ # [825/825] spawn: bash failed with exit code 1 and signal 0.

Installation log

[INFO  Sun 24 Nov 2024 05:47:20 PM -03] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=erlang-ls) {}
[DEBUG Sun 24 Nov 2024 05:47:21 PM -03] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:58: Attempting to lock package Package(name=erlang-ls)
[DEBUG Sun 24 Nov 2024 05:47:21 PM -03] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:70: Wrote lockfile Package(name=erlang-ls)
[DEBUG Sun 24 Nov 2024 05:47:21 PM -03] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:71: fs: mkdirp /home/sicro/.local/share/nvim/mason/staging/erlang-ls
[DEBUG Sun 24 Nov 2024 05:47:21 PM -03] ...zy/mason.nvim/lua/mason-core/installer/registry/init.lua:149: Compiling installer. erlang-ls {}
[DEBUG Sun 24 Nov 2024 05:47:21 PM -03] ...azy/mason.nvim/lua/mason-core/installer/managers/std.lua:247: std: clone "https://github.com/erlang-ls/erlang_ls.git" {
  rev = "0.52.0"
}
[DEBUG Sun 24 Nov 2024 05:47:21 PM -03] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="git", spawn_opts={
  args = { "clone", "--depth", "1", "https://github.com/erlang-ls/erlang_ls.git", "." },
  cwd = "/home/sicro/.local/share/nvim/mason/staging/erlang-ls"
}
[DEBUG Sun 24 Nov 2024 05:47:21 PM -03] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 929
[DEBUG Sun 24 Nov 2024 05:47:22 PM -03] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=929 exited with exit_code=0, signal=0
[DEBUG Sun 24 Nov 2024 05:47:22 PM -03] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="git", spawn_opts={
  args = { "fetch", "--depth", "1", "origin", "0.52.0" },
  cwd = "/home/sicro/.local/share/nvim/mason/staging/erlang-ls"
}
[DEBUG Sun 24 Nov 2024 05:47:22 PM -03] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 1007
[DEBUG Sun 24 Nov 2024 05:47:23 PM -03] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=1007 exited with exit_code=0, signal=0
[DEBUG Sun 24 Nov 2024 05:47:23 PM -03] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="git", spawn_opts={
  args = { "checkout", "--quiet", "FETCH_HEAD" },
  cwd = "/home/sicro/.local/share/nvim/mason/staging/erlang-ls"
}
[DEBUG Sun 24 Nov 2024 05:47:23 PM -03] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 1019
[DEBUG Sun 24 Nov 2024 05:47:23 PM -03] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=1019 exited with exit_code=0, signal=0
[DEBUG Sun 24 Nov 2024 05:47:23 PM -03] .../mason.nvim/lua/mason-core/installer/managers/common.lua:100: build: run {
  env = {
    MASON_VERSION = "0.52.0"
  },
  erlang_ls = "_build/default/bin/erlang_ls",
  run = "</dev/null rebar3 escriptize\n",
  target = "unix"
}
[DEBUG Sun 24 Nov 2024 05:47:23 PM -03] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="bash", spawn_opts={
  args = {},
  cwd = "/home/sicro/.local/share/nvim/mason/staging/erlang-ls",
  env = { "HL_INITIAL_WORKSPACE_TOKEN=<redacted>", "OLLAMA_MODELS=<redacted>", "LOGNAME=<redacted>", "PATH=/home/sicro/.local/share/nvim/mason/bin:/home/sicro/.local/bin:/home/sicro/.local/share/cargo/bin:/home/sicro/.local/share/pack/bin:/home/sicro/.local/share/coursier/bin:/home/sicro/.local/share/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin:/usr/lib/llvm/19/bin:/usr/lib/llvm/18/bin", "GFORTHHIST=<redacted>", "JDK_HOME=<redacted>", "MASON=<redacted>", "GHCUP_USE_XDG_DIRS=<redacted>", "MOTD_SHOWN=<redacted>", "USER=<redacted>", "AWS_SHARED_CREDENTIALS_FILE=<redacted>", "G8_HOME=<redacted>", "P9K_TTY=<redacted>", "VBOX_INSTALL_PATH=<redacted>", "NPM_CONFIG_GLOBALCONFIG=<redacted>", "GSETTINGS_BACKEND=<redacted>", "SHELL=<redacted>", "KUBECONFIG=<redacted>", "_Z_DATA=<redacted>", "_=<redacted>", "WGETRC=<redacted>", "VBOX_SDK_PATH=<redacted>", "JULIAUP_DEPOT_PATH=<redacted>", "VIMRUNTIME=<redacted>", "CONFIG_PROTECT=<redacted>", "DBUS_SESSION_BUS_ADDRESS=<redacted>", "_P9K_TTY=<redacted>", "XDG_RUNTIME_DIR=<redacted>", "OLDPWD=<redacted>", "EDITOR=<redacted>", "TERMINFO=<redacted>", "KITTY_PID=<redacted>", "XDG_SESSION_ID=<redacted>", "JAVA_HOME=<redacted>", "KDEHOME=<redacted>", "AWS_CONFIG_FILE=<redacted>", "XDG_VTNR=<redacted>", "TEXMFHOME=<redacted>", "XDG_SESSION_TYPE=<redacted>", "LESS=<redacted>", "HYPRLAND_CMD=<redacted>", "XDG_CACHE_HOME=<redacted>", "HEX_HOME=<redacted>", "MINIKUBE_HOME=<redacted>", "MOZ_ENABLE_WAYLAND=<redacted>", "KITTY_ENABLE_WAYLAND=<redacted>", "VBOX_APP_HOME=<redacted>", "DOCKER_CONFIG=<redacted>", "PAGER=<redacted>", "CONFIG_PROTECT_MASK=<redacted>", "_JAVA_AWT_WM_NONREPARENTING=<redacted>", "M2_HOME=<redacted>", "DIRHISTORY_SIZE=<redacted>", "NPM_CONFIG_USERCONFIG=<redacted>", "MYPY_CACHE_DIR=<redacted>", "LESSOPEN=<redacted>", "LANG=<redacted>", "GNUPGHOME=<redacted>", "_P9K_SSH_TTY=<redacted>", "CARGO_HOME=<redacted>", "XDG_BACKEND=<redacted>", "_JAVA_OPTIONS=<redacted>", "ZDOTDIR=<redacted>", "STUDIO_JDK=<redacted>", "RUSTUP_HOME=<redacted>", "MANPATH=<redacted>", "NVIM_LOG_FILE=<redacted>", "XDG_SESSION_DESKTOP=<redacted>", "KITTY_INSTALLATION_DIR=<redacted>", "JULIA_DEPOT_PATH=<redacted>", "XDG_CURRENT_DESKTOP=<redacted>", "XDG_DATA_HOME=<redacted>", "XDG_CONFIG_HOME=<redacted>", "JAVAC=<redacted>", "HYPRLAND_INSTANCE_SIGNATURE=<redacted>", "RAKUDO_HOME=<redacted>", "NODE_REPL_HISTORY=<redacted>", "XCURSOR_THEME=<redacted>", "MIX_REBAR3=<redacted>", "XDG_SEAT=<redacted>", "GOPATH=/home/sicro/.local/share/go", "PYTHONSTARTUP=<redacted>", "HOME=<redacted>", "P9K_SSH=<redacted>", "ANT_HOME=<redacted>", "KITTY_SHELL_INTEGRATION=<redacted>", "INFOPATH=<redacted>", "PACK_DIR=<redacted>", "GCC_SPECS=<redacted>", "PWD=<redacted>", "MAIL=<redacted>", "KITTY_PUBLIC_KEY=<redacted>", "HISTFILE=<redacted>", "MYVIMRC=<redacted>", "AMMONITE_HOME=<redacted>", "GRADLE_USER_HOME=<redacted>", "WAYLAND_DISPLAY=<redacted>", "VISUAL=<redacted>", "TEXMFVAR=<redacted>", "CABAL_DIR=<redacted>", "ELM_HOME=<redacted>", "MIX_HOME=<redacted>", "KITTY_WINDOW_ID=<redacted>", "LEIN_HOME=<redacted>", "COLORTERM=<redacted>", "ANDROID_USER_HOME=<redacted>", "CHKTEXRC=<redacted>", "MANPAGER=<redacted>", "SHLVL=<redacted>", "XDG_STATE_HOME=<redacted>", "TERM=<redacted>", "NUGET_PACKAGES=<redacted>", "DOTNET_ROOT=<redacted>", "HYPRCURSOR_THEME=<redacted>", "LEX=<redacted>", "KUBECACHEDIR=<redacted>", "DISPLAY=<redacted>", "MASON_VERSION=<redacted>" }
}
[DEBUG Sun 24 Nov 2024 05:47:23 PM -03] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 1020
[DEBUG Sun 24 Nov 2024 05:47:40 PM -03] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=1020 exited with exit_code=1, signal=0
[DEBUG Sun 24 Nov 2024 05:47:40 PM -03] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:59: fs: unlink /home/sicro/.local/share/nvim/mason/staging/erlang-ls.lock
[DEBUG Sun 24 Nov 2024 05:47:40 PM -03] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:47: fs: rmrf /home/sicro/.local/share/nvim/mason/staging/erlang-ls
[DEBUG Sun 24 Nov 2024 05:47:40 PM -03] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:39: Building receipt for Package(name=erlang-ls)
[ERROR Sun 24 Nov 2024 05:47:40 PM -03] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=erlang-ls) error=spawn: bash failed with exit code 1 and signal 0.

Neovim version (>= 0.7)

NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1731601260

Operating system/version

Linux sicro 6.12.0-gentoo #1 SMP Mon Nov 18 15:40:57 -03 2024 x86_64 AMD Ryzen 7 PRO 4750U with Radeon Graphics AuthenticAMD GNU/Linux

Healthcheck

==============================================================================
mason: require("mason.health").check()

mason.nvim ~
- OK mason.nvim version v1.10.0
- OK PATH: prepend
- OK Providers: 
    mason.providers.registry-api
    mason.providers.client
- OK neovim version >= 0.7.0

mason.nvim [Registries] ~
- OK Registry `github.com/mason-org/mason-registry version: 2024-11-24-untidy-budget` is installed.

mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send`
- OK wget: `GNU Wget 1.25.0 built on linux-gnu.`
- OK curl: `curl 8.11.0 (x86_64-pc-linux-gnu) libcurl/8.11.0 OpenSSL/3.3.2 zlib/1.3.1 libpsl/0.21.5 libssh2/1.11.1 nghttp2/1.64.0 nghttp3/1.6.0`
- OK gzip: `gzip 1.13`
- OK gtar: `tar (GNU tar) 1.35`
- OK bash: `GNU bash, version 5.2.37(1)-release (x86_64-pc-linux-gnu)`
- OK sh: `Ok`

mason.nvim [Languages] ~
- WARNING Ruby: not available
  - ADVICE:
    - spawn: ruby failed with exit code - and signal -. ruby is not executable
- WARNING Composer: not available
  - ADVICE:
    - spawn: composer failed with exit code - and signal -. composer is not executable
- WARNING PHP: not available
  - ADVICE:
    - spawn: php failed with exit code - and signal -. php is not executable
- WARNING RubyGem: not available
  - ADVICE:
    - spawn: gem failed with exit code - and signal -. gem is not executable
- OK node: `v22.10.0`
- OK Go: `go version go1.23.3 linux/amd64`
- OK luarocks: `/usr/bin/luarocks 3.11.1`
- OK cargo: `cargo 1.85.0-nightly (66221abde 2024-11-19)`
- OK python: `Python 3.12.7`
- OK java: `Picked up _JAVA_OPTIONS: -Djava.util.prefs.userRoot=/home/sicro/.config/java`
- OK JAVA_HOME: `Picked up _JAVA_OPTIONS: -Djava.util.prefs.userRoot=/home/sicro/.config/java`
- OK npm: `10.9.0`
- OK julia: `julia version 1.11.1`
- OK javac: `javac 21.0.5`
- OK pip: `pip 24.3.1 from /usr/lib/python3.12/site-packages/pip (python 3.12)`
- OK python venv: `Ok`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 0. Remaining: 60. Limit: 60. Reset: Sun 24 Nov 2024 07:09:46 PM -03.
  Install and authenticate via gh-cli to increase rate limit.

Screenshots

No response

@aemaeth-me
Copy link

aemaeth-me commented Dec 2, 2024

Let me explain this awkward situation:

The version of erlang-ls in the Mason Registry is 0.52.0, as you can verify from its package.yaml.

The issue you mentioned regarding installation failure is a known issue with version 0.52.0, and it was resolved in later versions quite some time ago.

What’s the latest version of erlang-ls now? It’s 1.1.0. Yes, it sounds crazy, but that’s the current state of things.

I suspect the root cause lies in erlang-ls aggressively bumping its version while the Mason Registry’s use of the renovate bot for automated scanning and merging may have mismatched configurations.

I’m not very familiar with renovate bot, but after a quick look at its configuration, it seems that the merge strategy for erlang-ls might be strictly tied to semantic versioning. This could result in major version changes being classified as non-auto-mergeable.

In practice, manually bumping the version to 1.1.0 solves everything. I’ve tested it on macOS with ARM chips and on standard Linux environments without encountering any issues.

For now, the best approach for you personally is to manually run:

:MasonInstall [email protected]

to upgrade your local version.

As for the Mason project maintainers @williamboman, they might either need to revise the renovate bot configuration (which looks quite tricky) or manually update the version in the registry. The PR is already there.

@p-kraszewski
Copy link

p-kraszewski commented Dec 2, 2024

If renovate bot is afraid of beyond-1.0.0 jumps, let it at least bump to 0.54.0, as this is enough to fix the issue.

Q: @aemaeth-me Is your workaround permanent, or Mason will attempt a downgrade later?


Answering myself...

erlang-ls     ■ new version available: 1.1.0 -> 0.52.0

Sigh...

@ignamartinoli
Copy link
Author

@aemaeth-me you were right, that command fixed it for me, but then I have the downgrade problem.
Thanks for the clear answer, how this gets fixed

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

No branches or pull requests

3 participants