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

Error executing luv callback: ENOTCONN

Open fragov opened this issue 1 year ago • 10 comments

I've searched open issues for similar requests

Yes

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

  • [X] Yes

Problem description

On start NeoVim I'm getting next error (1 or more times):

Error executing luv callback:                                                                                                             
ENOTCONN                                                                                                                                  
stack traceback:                                                                                                                          
        [C]: in function 'error'                                                                                                          
        ...share/nvim/lazy/mason.nvim/lua/mason-core/async/init.lua:113: in function 'callback'                                           
        ...share/nvim/lazy/mason.nvim/lua/mason-core/async/init.lua:91: in function 'cb'                                                  
        ...share/nvim/lazy/mason.nvim/lua/mason-core/async/init.lua:21: in function 'reject'                                              
        ...share/nvim/lazy/mason.nvim/lua/mason-core/async/init.lua:52: in function <...share/nvim/lazy/mason.nvim/lua/mason-core/async/in
it.lua:50> 

I started getting it last week. May you suggest where I have to search for a problem?

Expected behavior

Should not show any error messages.

Steps to reproduce

  1. Just start NeoVim

Neovim version (>= 0.7)

NVIM v0.9.0-dev-1857+g1df2db0bc-dirty Build type: Release LuaJIT 2.1.0-beta3

Operating system/version

Darwin MBP-2.lan 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:06:26 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T8112 arm64

Healthcheck output

mason.nvim report
- OK neovim version >= 0.7.0
- OK **Go**: go version go1.19.5 darwin/arm64
- WARNING **cargo**: not available
- OK **luarocks**: /opt/homebrew/bin/luarocks 3.9.1
- OK **Ruby**: ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin22]
- OK **RubyGem**: 3.0.3.1
- OK **Composer**: Composer version 2.5.1 2022-12-22 15:33:54
- OK **PHP**: PHP 8.2.1 (cli) (built: Jan 12 2023 03:48:24) (NTS)
- OK **npm**: 6.14.15
- OK **node**: v14.18.0
- OK **python3**: Python 3.10.9
- OK **pip3**: pip 22.3.1 from /opt/homebrew/lib/python3.10/site-packages/pip (python 3.10)
- WARNING **javac**: not available
- WARNING **java**: not available
- WARNING **julia**: not available
- OK **wget**: GNU Wget 1.21.3 built on darwin22.1.0.
- OK **curl**: curl 7.85.0 (x86_64-apple-darwin22.0) libcurl/7.85.0 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.47.0
- OK **gzip**: Apple gzip 400
- OK **tar**: `bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8
- WARNING **pwsh**: not available
- OK **bash**: GNU bash, version 3.2.57(1)-release (arm64-apple-darwin22)
- OK **sh**: Ok
- OK GitHub API rate limit. Used: 6. Remaining: 54. Limit: 60. Reset: Mon Jan 16 12:59:49 2023.

Screenshots

No response

fragov avatar Jan 16 '23 10:01 fragov

Hey! Do I understand you correctly that this error occur immediately when you launch Neovim? Hm, Mason does very little at startup. Do you use any other plugins or do something else that interacts with Mason in your config? Also do you see any error logs in :MasonLog?

williamboman avatar Jan 16 '23 18:01 williamboman

There are no errors in error logs. I think it is a problem with mason-tool-installer, this error with callback comes from it. So, it is probably not a Mason issue.

fragov avatar Jan 17 '23 12:01 fragov

I currently see this issue. Not on startup though, but after manually running :Mason

mason: require("mason.health").check()
========================================================================
## mason.nvim report
  - OK: neovim version >= 0.7.0
  - OK: Go: `go version go1.20.1 darwin/amd64`
  - OK: cargo: `cargo 1.65.0 (4bc8f24d3 2022-10-20)`
  - OK: luarocks: `/usr/local/bin/luarocks 3.9.2`
  - OK: Ruby: `ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin22]`
  - OK: RubyGem: `3.0.3.1`
  - WARNING: Composer: not available
  - WARNING: PHP: not available
  - OK: npm: `9.5.0`
  - OK: node: `v19.7.0`
  - OK: python3: `Python 3.9.6`
  - OK: pip3: `pip 22.3 from /Users/aleksandersumowski/Library/Python/3.9/lib/python/site-packages/pip (python 3.9)`
  - OK: javac: `javac 17.0.6`
  - OK: java: `openjdk version "17.0.6" 2023-01-17`
  - WARNING: julia: not available
  - OK: wget: `GNU Wget 1.21.3 built on darwin21.6.0.`
  - OK: curl: `curl 7.86.0 (x86_64-apple-darwin22.0) libcurl/7.86.0 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.47.      0`
  - OK: gzip: `Apple gzip 400`
  - OK: tar: `bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8 `
  - WARNING: pwsh: not available
  - OK: bash: `GNU bash, version 5.2.15(1)-release (x86_64-apple-darwin21.6.0)`
  - OK: sh: `Ok`
  - OK: GitHub API rate limit. Used: 0. Remaining: 5000. Limit: 5000. Reset: Wed Mar  1 15:24:09 2023.

No suspicious log entries even with debug log level.

[DEBUG Wed Mar  1 14:32:28 2023] ...lazy/mason.nvim/lua/mason-core/package/version-check.lua:72: Version check failed .../lazy/mason.nvim/lua/mason-core/managers/github/init.lua:181: Primary package is not outdated.
[DEBUG Wed Mar  1 14:32:35 2023] ...lazy/mason.nvim/lua/mason-core/package/version-check.lua:72: Version check failed No value present.

seems like regular operation?

aleksandersumowski avatar Mar 01 '23 13:03 aleksandersumowski

the log messages above are printed few times I first open Mason, then Mason starts like normal. If I open Mason for the second time in the session, there are no error messages

aleksandersumowski avatar Mar 01 '23 13:03 aleksandersumowski

Thanks for the details! I was actually able to reproduce this unintentionally the other day, I think we've been able to pinpoint the issue to be with checking new package versions.

williamboman avatar Mar 02 '23 00:03 williamboman

What log level do you have configured for Mason? If it's DEBUG or TRACE, try removing it or setting it to vim.log.levels.INFO (default):

require("mason").setup {
    log_level = vim.log.levels.INFO,
}

Does it still happen then?

williamboman avatar Mar 02 '23 02:03 williamboman

It was happening before I've increased the log level. It doesn't show in :MasonLog but in :messages

But here is a thing: I have two laptops one older, slower, issues by company Intel macbook. One personal, m2 macbook. They have the save neovim config, but the issue occurs only on the slower laptop

aleksandersumowski avatar Mar 03 '23 05:03 aleksandersumowski

Ran into this issue as well when I updated mason. Looking into it.

bootdme avatar Mar 13 '23 07:03 bootdme

Okay in mason-tool-installer, I had auto_update, run_on_start, and start_delay enabled. After commenting them out, the error has gone away (as far as I know).

I guess for the time being just automatically update your mason packages manually.

bootdme avatar Mar 16 '23 19:03 bootdme

For me commenting out auto_update = true helped not to see that error message

bifshteks avatar Apr 22 '23 15:04 bifshteks