mason.nvim icon indicating copy to clipboard operation
mason.nvim copied to clipboard

Failed to run healthcheck for "mason" plugin

Open eyebrowkang opened this issue 1 year ago • 8 comments

I've searched open issues for similar requests

  • [X] Yes

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

  • [X] Yes

Problem description

I can't run healthcheck for "mason" plugin

Expected behavior

should run checkhealth success

Affected packages

mason.nvim

Mason output

No response

Installation log

[INFO  四  5/25 09:46:13 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=lua-language-server) Package(name=lua-language-server)
[INFO  四  5/25 09:46:13 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=prisma-language-server) Package(name=prisma-language-server)
[INFO  四  5/25 09:46:13 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=pyright) Package(name=pyright)
[INFO  四  5/25 09:46:17 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=lua-language-server)
[INFO  四  5/25 09:46:20 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=pyright)
[INFO  四  5/25 09:46:33 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=prisma-language-server)
[INFO  四  5/25 10:40:46 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=angular-language-server) {}
[INFO  四  5/25 10:40:46 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=cmake-language-server) {}
[INFO  四  5/25 10:40:46 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=css-lsp) {}
[INFO  四  5/25 10:40:46 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=cssmodules-language-server) {}
[INFO  四  5/25 10:40:52 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=dockerfile-language-server) {}
[INFO  四  5/25 10:40:52 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=cssmodules-language-server)
[INFO  四  5/25 10:40:54 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=eslint-lsp) {}
[INFO  四  5/25 10:40:54 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=cmake-language-server)
[INFO  四  5/25 10:40:58 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=gopls) {}
[INFO  四  5/25 10:40:58 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=dockerfile-language-server)
[INFO  四  5/25 10:41:05 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=html-lsp) {}
[INFO  四  5/25 10:41:05 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=css-lsp)
[INFO  四  5/25 10:41:06 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=json-lsp) {}
[INFO  四  5/25 10:41:06 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=eslint-lsp)
[INFO  四  5/25 10:41:10 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=lua-language-server) {}
[INFO  四  5/25 10:41:10 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=angular-language-server)
[INFO  四  5/25 10:41:11 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=prisma-language-server) {}
[INFO  四  5/25 10:41:11 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=html-lsp)
[INFO  四  5/25 10:41:11 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=pyre) {}
[INFO  四  5/25 10:41:11 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=json-lsp)
[INFO  四  5/25 10:41:14 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=pyright) {}
[INFO  四  5/25 10:41:14 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=lua-language-server)
[INFO  四  5/25 10:41:18 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=rust-analyzer) {}
[INFO  四  5/25 10:41:18 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=gopls)
[INFO  四  5/25 10:41:19 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=sqlls) {}
[INFO  四  5/25 10:41:19 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=pyright)
[INFO  四  5/25 10:41:23 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=stylelint-lsp) {}
[INFO  四  5/25 10:41:23 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=rust-analyzer)
[INFO  四  5/25 10:41:27 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=taplo) {}
[INFO  四  5/25 10:41:27 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=pyre)
[INFO  四  5/25 10:41:30 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=typescript-language-server) {}
[INFO  四  5/25 10:41:30 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=taplo)
[INFO  四  5/25 10:41:31 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=vim-language-server) {}
[INFO  四  5/25 10:41:31 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=prisma-language-server)
[INFO  四  5/25 10:41:35 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=vue-language-server) {}
[INFO  四  5/25 10:41:35 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=vim-language-server)
[INFO  四  5/25 10:41:35 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=typescript-language-server)
[INFO  四  5/25 10:41:39 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=stylelint-lsp)
[INFO  四  5/25 10:41:51 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=vue-language-server)
[INFO  四  5/25 10:41:57 2023] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:245: Installation succeeded for Package(name=sqlls)

Neovim version (>= 0.7)

NVIM v0.9.0 Build type: Release LuaJIT 2.1.0-beta3

Operating system/version

Darwin 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 x86_64

Healthcheck

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

- ERROR Failed to run healthcheck for "mason" plugin. Exception:
  function health#check,第 25 行
  Vim(eval):E5108: Error executing lua ...w/.local/share/nvim/lazy/mason.nvim/lua/mason/health.lua:322: function health#check[25]..health#report_error[2]..<SNR>59_format_report_message, line 7: a:1: expected String or List
  stack traceback:
  [C]: in function 'error'
  ...share/nvim/lazy/mason.nvim/lua/mason-core/async/init.lua:131: in function 'run_blocking'
  ...w/.local/share/nvim/lazy/mason.nvim/lua/mason/health.lua:322: in function 'check'
  [string "luaeval()"]:1: in main chunk

Screenshots

No response

eyebrowkang avatar May 25 '23 02:05 eyebrowkang

update: the problem was solved after reinstalling my nvim. I run this command: rm -rf ~/.local/share/nvim ~/.cache/nvim ~/.local/state/nvim and then open nvim waiting all plugins OK, quit and open it again. The :checkhealth mason command run successfully.

eyebrowkang avatar May 26 '23 02:05 eyebrowkang

I've also seen this happen very sporadically but been unable to figure out what the culprit is.

williamboman avatar May 26 '23 08:05 williamboman

This started out being a "Me too" comment, but I eventually solved my particular version of this issue. Here's how:

After updating neovim to version 0.9.1, I ran :checkhealth mason, and it appeared to hang. When I cancel the command with Ctrl+C, I get this output:

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

- ERROR Failed to run healthcheck for "mason" plugin. Exception:
  function health#check, line 25
  Vim(eval):E5108: Error executing lua ...fig/nvim/pack/bundle/opt/mason.nvim/lua/mason/health.lua:322: async function failed to resolve in time.
  stack traceback:
  [C]: in function 'error'
  ...pack/bundle/opt/mason.nvim/lua/mason-core/async/init.lua:136: in function 'run_blocking'
  ...fig/nvim/pack/bundle/opt/mason.nvim/lua/mason/health.lua:322: in function 'check'
  [string "luaeval()"]:1: in main chunk

I'm running tag 1.2.1 of mason.nvim on a MacBook Pro. In the meantime, I have htop running in another terminal window, and when :checkhealth mason starts, a new process starts, taking up 100% of the CPU. It's running the command rustc -vV. When I run rustc -vV in the terminal, I get this output:

rustc(93806,0x104608e00) malloc: *** malloc_zone_unregister() failed for 0x7fff8077c000

It hangs, and I have to Ctrl+C out of it.

So my next plan of attack is upgrade Rust. Following the instructions on https://www.rust-lang.org/tools/install, I first try rustup update, but rustup isn't in my path. Next I try curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh, but it tells me that Rust is already installed, and I need to uninstall it first. I uninstalled Rust with the suggested command, after which the install comand (curl...) works.

And now, in a new shell, everything works; rust -vV gives a proper response:

rustc 1.70.0 (90c541806 2023-05-31)
binary: rustc
commit-hash: 90c541806f23a127002de5b4038be731ba1458ca
commit-date: 2023-05-31
host: x86_64-apple-darwin
release: 1.70.0
LLVM version: 16.0.2

and :checkhealth mason gives a thumbs-up response.

After this confirmation, I uninstalled Rust, and reinstalled it with homebrew. This also worked correctly.

Bottom line is: My Rust installation was either outdated or broken, and fixing that also fixed this issue.

PhilRunninger avatar Jun 17 '23 06:06 PhilRunninger

Just want to add that I see the exact same error message as @eyebrowkang. Let me know if there is anything I should check.

Neovim:

NVIM v0.9.2
Build type: Release
LuaJIT 2.1.1694285958

iceaway avatar Sep 28 '23 04:09 iceaway

I am facing the same issue here!

When I run :checkhealth mason my nvim session (and even the terminal itself) is killed.

After some tries I was able to get the following output:

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

- ERROR Failed to run healthcheck for "mason" plugin. Exception:
  function health#check, line 25
  Vim(eval):E5108: Error executing lua ...local/share/nvim/plugged/mason.nvim/lua/mason/health.lua:332: async function failed to resolve in time.
  stack traceback:
  [C]: in function 'error'
  ...re/nvim/plugged/mason.nvim/lua/mason-core/async/init.lua:136: in function 'run_blocking'
  ...local/share/nvim/plugged/mason.nvim/lua/mason/health.lua:332: in function 'check'
  [string "luaeval()"]:1: in main chunk

This is my neovim installation:

NVIM v0.9.2
Build type: Release
LuaJIT 2.1.1692716794

and here is the rustc -vV output:

rustc 1.72.1 (d5c2e9c34 2023-09-13)
binary: rustc
commit-hash: d5c2e9c342b358556da91d61ed4133f6f50fc0c3
commit-date: 2023-09-13
host: x86_64-unknown-linux-gnu
release: 1.72.1
LLVM version: 16.0.5

chapeupreto avatar Sep 30 '23 00:09 chapeupreto

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

- ERROR Failed to run healthcheck for "mason" plugin. Exception:
  function health#check, line 25
  Vim(eval):E5108: Error executing lua ...r/.local/share/nvim/lazy/mason.nvim/lua/mason/health.lua:315: function health#check[25]..health#report_error[2]..<SNR>66_format_report_message, line 7: a:1: expected String or List
  stack traceback:
  [C]: in function 'error'
  ...share/nvim/lazy/mason.nvim/lua/mason-core/async/init.lua:131: in function 'run_blocking'
  ...r/.local/share/nvim/lazy/mason.nvim/lua/mason/health.lua:315: in function 'check'
  [string "luaeval()"]:1: in main chunk

Anyone solves this problem? I have tried the methods mentioned above but still encounters with it. Really weird 😭

HangX-Ma avatar Feb 08 '24 04:02 HangX-Ma

I am using WSL and was having the same issue. Fixed it by installing Rust locally (for WSL specifically).

Initially I was having the same issue as https://github.com/williamboman/mason.nvim/issues/1549, however installing Rust locally fixed it as well.

Windows 10, WSL 2

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1692716794
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy
rustc 1.76.0 (07dca489a 2024-02-04)
binary: rustc
commit-hash: 07dca489ac2d933c78d3c5158e3f43beefeb02ce
commit-date: 2024-02-04
host: x86_64-unknown-linux-gnu
release: 1.76.0
LLVM version: 17.0.6

MhMadHamster avatar Mar 11 '24 18:03 MhMadHamster

Hi

I am seeing the same issue

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

- ERROR Failed to run healthcheck for "mason" plugin. Exception:
  function health#check, line 25
  Vim(eval):E5108: Error executing lua ...l/.local/share/nvim/lazy/mason.nvim/lua/mason/health.lua:315: function health#check[25]..health#report_error[2]..<SNR>37_format_report_message, line 7: a:1: expected String or List
  stack traceback:
  [C]: in function 'error'
  ...share/nvim/lazy/mason.nvim/lua/mason-core/async/init.lua:131: in function 'run_blocking'
  ...l/.local/share/nvim/lazy/mason.nvim/lua/mason/health.lua:315: in function 'check'
  [string "luaeval()"]:1: in main chunk

I am using

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1692716794

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/__w/neovim/neovim/build/nvim.AppDir/usr/share/nvim"

Run :checkhealth for more info

i have done rm -rf ~/.local/share/nvim ~/.cache/nvim ~/.local/state/nvim/

rustc -vV                                                                                         
rustc 1.72.0 (5680fa18f 2023-08-23)
binary: rustc
commit-hash: 5680fa18feaa87f3ff04063800aec256c3d4b4be
commit-date: 2023-08-23
host: x86_64-unknown-linux-gnu
release: 1.72.0
LLVM version: 16.0.5

OS:

LSB Version:	:core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID:	CentOS
Description:	CentOS Linux release 7.5.1804 (Core) 
Release:	7.5.1804
Codename:	Core

please advise ...

justrajdeep avatar Mar 26 '24 15:03 justrajdeep