Skip to content

Mason intermittently fails to set cached_features on mason-core.platform #1897

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

Open
2 tasks done
brlipi opened this issue Mar 20, 2025 · 5 comments
Open
2 tasks done

Comments

@brlipi
Copy link

brlipi commented Mar 20, 2025

I've searched open issues for similar requests

  • Yes

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

  • Yes

Problem description

  1. Some of the time when opening neovim I get an error message coming from what I believe to be the init.lua from mason.nvim/lua/mason-core/package (installed with Lazy.nvim) saying that it failed to index field 'cached_features' because it is a nil value.
    Note: I'm running Ubuntu 22.04 on WSL, if that's important.

  2. The error message points to a file which is part of mason.nvim.

Expected behavior

Mason should successfully set the cached_features table every single time.

Steps to reproduce

Since it is intermittent:

  1. Open and close neovim until error shows up
  2. If simply opening and closing neovim is not working, try opening files of different types (e.g. .txt, .rs, .yml, .go, etc.).

I'd say that in 20 attempts I would get this error at least 5 times.

Neovim version (>= 0.7)

NVIM v0.10.4
Build type: Release
LuaJIT 2.1.1741730670

Note: Neovim was installed through linuxbrew.

Operating system/version

Linux wslhost 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Healthcheck output

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

mason.nvim ~
- OK mason.nvim version v1.11.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: 2025-03-20-worn-plain` is installed.

mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.`
- OK wget: `GNU Wget 1.21.2 built on linux-gnu.`
- OK curl: `curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.18`
- OK gzip: `gzip 1.10`
- OK tar: `tar (GNU tar) 1.34`
- OK bash: `GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)`
- OK sh: `Ok`

mason.nvim [Languages] ~
- WARNING Go: not available
  - ADVICE:
    - spawn: go failed with exit code - and signal -. go 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 luarocks: not available
  - ADVICE:
    - spawn: luarocks failed with exit code - and signal -. luarocks is not executable
- WARNING Ruby: not available
  - ADVICE:
    - spawn: ruby failed with exit code - and signal -. ruby is not executable
- WARNING javac: not available
  - ADVICE:
    - spawn: javac failed with exit code - and signal -. javac is not executable
- WARNING RubyGem: not available
  - ADVICE:
    - spawn: gem failed with exit code - and signal -. gem is not executable
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- OK cargo: `cargo 1.83.0 (5ffbef321 2024-10-29)`
- OK python: `Python 3.10.12`
- OK node: `v22.5.1`
- OK java: `openjdk version "11.0.26" 2025-01-21`
- OK npm: `10.8.2`
- OK pip: `pip 24.0 from /home/breno/.local/lib/python3.10/site-packages/pip (python 3.10)`
- OK python venv: `Ok`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 0. Remaining: 60. Limit: 60. Reset: Thu Mar 20 08:53:06 2025.
  Install and authenticate via gh-cli to increase rate limit.

Screenshots

Image

@rafaelmdurante
Copy link

I'm having exactly the same issue here.

@hugemobster
Copy link

hugemobster commented Apr 10, 2025

I'm having the same issue as well. It is intermittent, but for me at least, it's more frequent than 5/20. Closer to 5/10. When I run checkhealth I get a similar if not the same output too.

Have any solutions come up?

Image

@carter2099
Copy link

Having this issue as well. In my case, this happens much more often within tmux than without

@hugemobster
Copy link

Having this issue as well. In my case, this happens much more often within tmux than without

@carter2099 now that you point it out, I only started having the issue after I started using tmux. Maybe it's tmux related I'm not sure but thought was worth noting.

@brlipi
Copy link
Author

brlipi commented May 9, 2025

Having this issue as well. In my case, this happens much more often within tmux than without

@carter2099 now that you point it out, I only started having the issue after I started using tmux. Maybe it's tmux related I'm not sure but thought was worth noting.

I'm also using tmux.

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