bad argument #1 to 'status'
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
Just before the whole LazyVim / mason v2 issues, I started getting the following error when Mason attempted to check for new package updates. It gets "stuck" at 17% and then errors out with this:
Error executing vim.schedule lua callback: ...share/nvim/lazy/mason.nvim/lua/mason-core/async/init.lua:79: bad argument #1 to 'status' (coroutine expected)
stack traceback:
[C]: in function 'status'
...share/nvim/lazy/mason.nvim/lua/mason-core/async/init.lua:79: in function 'cb'
...share/nvim/lazy/mason.nvim/lua/mason-core/async/init.lua:21: in function 'reject'
...cal/share/nvim/lazy/mason.nvim/lua/mason/ui/instance.lua:465: in function 'fn'
...cal/share/nvim/lazy/mason.nvim/lua/mason-core/result.lua:128: in function 'on_failure'
...are/nvim/lazy/mason.nvim/lua/mason-core/package/init.lua:296: in function 'fn'
.../nvim/lazy/mason.nvim/lua/mason-core/functional/init.lua:174: in function <.../nvim/lazy/mason
I downgraded back to v1 but I'm still getting the issue.
I don't believe I've done anything weird that would cause this issue but if someone has any ideas on what might be going wrong here, I'm all ears!
Expected behavior
Mason successfully checking for new package updates
Steps to reproduce
- Open
:Mason
Neovim version (>= 0.10.0)
NVIM v0.11.1 Build type: Release LuaJIT 2.1.1744318430
Operating system/version
Darwin my-machine.local 24.4.0 Darwin Kernel Version 24.4.0: Fri Apr 11 18:32:43 PDT 2025; root:xnu-11417.101.15~117/RELEASE_ARM64_T8103 arm64
Healthcheck output
==============================================================================
mason: require("mason.health").check()
mason.nvim ~
- ⚠️ WARNING mason.nvim version v1.11.0
- ADVICE:
- The latest version of mason.nvim is: v2.0.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-05-08-sugary-bangle` is installed.
mason.nvim [Core utils] ~
- ✅ OK unzip: `UnZip 6.00 of 20 April 2009, by Info-ZIP, with modifications by Apple Inc.`
- ✅ OK wget: `GNU Wget 1.25.0 built on darwin24.1.0.`
- ✅ OK curl: `curl 8.7.1 (x86_64-apple-darwin24.0) libcurl/8.7.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.64.0`
- ✅ OK gzip: `Apple gzip 457.100.3`
- ✅ OK tar: `bsdtar 3.5.3 - libarchive 3.7.4 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8 `
- ✅ OK bash: `GNU bash, version 3.2.57(1)-release (arm64-apple-darwin24)`
- ✅ OK sh: `Ok`
mason.nvim [Languages] ~
- ✅ OK Ruby: `ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin24]`
- ✅ OK cargo: `cargo 1.86.0`
- ✅ OK Go: `go version go1.24.3 darwin/arm64`
- ✅ OK luarocks: `/opt/homebrew/bin/luarocks 3.11.1`
- ✅ OK RubyGem: `3.0.3.1`
- ✅ OK PHP: `PHP 8.4.6 (cli) (built: Apr 11 2025 00:19:17) (NTS)`
- ⚠️ WARNING java: not available
- ADVICE:
- spawn: java failed with exit code 1 and signal 0. The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.
- ⚠️ WARNING julia: not available
- ADVICE:
- spawn: julia failed with exit code - and signal -. julia is not executable
- ⚠️ WARNING javac: not available
- ADVICE:
- spawn: javac failed with exit code 1 and signal 0. The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.
- ✅ OK node: `v21.7.3`
- ✅ OK Composer: `Composer version 2.8.8 2025-04-04 16:56:46`
- ✅ OK python: `Python 3.13.3`
- ✅ OK npm: `10.5.0`
- ✅ OK pip: `pip 25.0.1 from /opt/homebrew/lib/python3.13/site-packages/pip (python 3.13)`
- ✅ OK python venv: `Ok`
mason.nvim [GitHub] ~
- ✅ OK GitHub API rate limit. Used: 10. Remaining: 4990. Limit: 5000. Reset: Thu 8 May 18:53:37 2025.
Screenshots
Same here, when trying to use "U" to update mason, and it wil stuck at 33% in checking progress.
Error executing vim.schedule lua callback: ...e/oatvim08/lazy/mason.nvim/lua/mason-core/async/init.lua:79: bad argument #1 to 'status' (coroutine expected)
stack traceback:
[C]: in function 'status'
...e/oatvim08/lazy/mason.nvim/lua/mason-core/async/init.lua:79: in function 'cb'
...e/oatvim08/lazy/mason.nvim/lua/mason-core/async/init.lua:21: in function 'reject'
...share/oatvim08/lazy/mason.nvim/lua/mason/ui/instance.lua:465: in function 'fn'
...share/oatvim08/lazy/mason.nvim/lua/mason-core/result.lua:128: in function 'on_failure'
...oatvim08/lazy/mason.nvim/lua/mason-core/package/init.lua:296: in function 'fn'
...vim08/lazy/mason.nvim/lua/mason-core/functional/init.lua:174: in function <...vim08/lazy/mason.nvim/lua/mason-core/functional/init.lua:173>
Screen image:
Try
rm -rf ~/.local/share/nvim
rm -rf ~/.local/state/nvim
rm -rf ~/.cache/nvim
and then let Neovim install everything again. See if that solves the issue.
Try
rm -rf ~/.local/share/nvim rm -rf ~/.local/state/nvim rm -rf ~/.cache/nvim
and then let Neovim install everything again. See if that solves the issue.
This worked for me !
Try
rm -rf ~/.local/share/nvim rm -rf ~/.local/state/nvim rm -rf ~/.cache/nvim and then let Neovim install everything again. See if that solves the issue.
This worked for me too~ Thank you
Try
rm -rf ~/.local/share/nvim rm -rf ~/.local/state/nvim rm -rf ~/.cache/nvim
and then let Neovim install everything again. See if that solves the issue.
This is a working solution, but just keep in mind that it will also wipe all you undo-history, sessions, info from scratch-buffers and some other useful things. So maybe it's better to check these directories for mason related files and directories and rename them. For me renaming these:
~/.local/share/nvim/mason
~/.local/state/nvim/mason-registry-update
fixed the problem - now mason is successfully updating.
Try
rm -rf ~/.local/share/nvim rm -rf ~/.local/state/nvim rm -rf ~/.cache/nvim and then let Neovim install everything again. See if that solves the issue.
Thanks, this worked for me.