williamboman / mason.nvim

Portable package manager for Neovim that runs everywhere Neovim runs. Easily install and manage LSP servers, DAP servers, linters, and formatters.
Apache License 2.0
7.22k stars 258 forks source link

Mason command is not working #1716

Closed ramojus closed 2 weeks ago

ramojus commented 1 month ago

I've searched open issues for similar requests

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

Problem description

Executing :Mason returns an error:

Error executing vim.schedule lua callback: ...share/nvim/lazy/mason.nvim/lua/mason-core/ui/display.lua:111: attempt to concatenate local 'content' (a nil value)                                                                               
stack traceback:                                                                                                                                                                                                                                
        ...share/nvim/lazy/mason.nvim/lua/mason-core/ui/display.lua:111: in function 'render_node'                                                                                                                                              
        ...share/nvim/lazy/mason.nvim/lua/mason-core/ui/display.lua:141: in function 'render_node'                                                                                                                                              
        ...share/nvim/lazy/mason.nvim/lua/mason-core/ui/display.lua:141: in function 'render_node'                                                                                                                                              
        ...share/nvim/lazy/mason.nvim/lua/mason-core/ui/display.lua:141: in function 'render_node'                                                                                                                                              
        ...share/nvim/lazy/mason.nvim/lua/mason-core/ui/display.lua:292: in function 'draw'                                                                                                                                                     
        ...share/nvim/lazy/mason.nvim/lua/mason-core/ui/display.lua:521: in function ''                                                                                                                                                         
        vim/_editor.lua: in function <vim/_editor.lua:0>

Expected behavior

Executing :Mason opens Mason UI window

Steps to reproduce

  1. Install mason and add this line to neovim config
    require 'mason'.setup()
  2. Reload Neovim and run :Mason

Neovim version (>= 0.7)

NVIM v0.10.0 Build type: Release LuaJIT 2.1.1693350652

Operating system/version

Linux tux 6.1.91 #1-NixOS SMP PREEMPT_DYNAMIC Fri May 17 09:56:25 UTC 2024 x86_64 GNU/Linux

Healthcheck output

==============================================================================
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-05-24-wild-trust` 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.21.4 built on linux-gnu.`
- OK curl: `curl 8.4.0 (x86_64-pc-linux-gnu) libcurl/8.4.0 OpenSSL/3.0.13 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.4 libssh2/1.11.0 nghttp2/1.57.0`
- OK gzip: `gzip 1.13`
- OK tar: `tar (GNU tar) 1.35`
- OK bash: `GNU bash, version 5.2.15(1)-release (x86_64-pc-linux-gnu)`
- OK sh: `Ok`

mason.nvim [Languages] ~
- WARNING luarocks: not available
  - ADVICE:
    - spawn: luarocks failed with exit code - and signal -. luarocks is not executable
- OK Go: `go version go1.22.2 linux/amd64`
- OK Ruby: `ruby 3.1.5p252 (2024-04-23 revision 1945f8dc0e) [x86_64-linux]`
- OK PHP: `PHP 8.2.19 (cli) (built: May  7 2024 14:19:14) (NTS)`
- OK node: `v20.12.2`
- WARNING javac: not available
  - ADVICE:
    - spawn: javac failed with exit code - and signal -. javac is not executable
- OK cargo: `cargo 1.77.1 (e52e36006 2024-03-26)`
- OK julia: `julia version 1.10.3`
- OK Composer: `Composer version 2.7.6 2024-05-04 23:03:15`
- OK python: `Python 3.11.9`
- OK RubyGem: `3.5.9`
- OK java: `openjdk version "21" 2023-09-19`
- WARNING pip: not available
  - ADVICE:
    - spawn: python3 failed with exit code 1 and signal 0. /home/ramojus/.nix-profile/bin/python3: No module named pip

- OK npm: `10.5.0`
- OK python venv: `Ok`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 0. Remaining: 5000. Limit: 5000. Reset: 2024 m. gegužės 24 d. 19:50:54.

Screenshots

No response

ramojus commented 1 month ago

I'm really confused as to why I seem to be the only one getting this error. I've tried reinstalling mason, and not setting up any servers, but I still get this error. And it's been like this for a couple of months now

JordanJonThomas commented 1 month ago

Same issue here.

ramojus commented 2 weeks ago

I'm not exactly sure why, but removing one of these folders helped me:

~/.local/share/nvim
~/.local/state/nvim
~/.cache/nvim

I was trying different neovim configs and removed all of them. When I came back to my original config that had this issue, the issue was gone. Try this at your own risk, some neovim history (e.g. previously executed commands) might be lost.