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

Failed to update registries: GitHubRegistrySource(repo=mason-org/mason-registry) failed to install: Failed to download registry archive

Open thecode-master-sy opened this issue 1 year ago • 10 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

mason.nvim is failing to install registries, even when i run :MasonUpdate or C as the prompt say i still get the above error.

see what shows when i run :CheckHealth mason

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

mason.nvim ~

  • OK mason.nvim version v1.9.0
  • OK PATH: prepend
  • OK Providers: mason.providers.registry-api mason.providers.client
  • OK neovim version >= 0.7.0

mason.nvim [Registries] ~

  • ERROR Registry github.com/mason-org/mason-registry [uninstalled] is not installed.
    • ADVICE:
      • Run :MasonUpdate to install.

mason.nvim [Core utils] ~

  • WARNING unzip: not available
    • ADVICE:
      • spawn: unzip failed with exit code - and signal -. unzip is not executable
  • OK wget: GNU Wget 1.21.4 built on mingw32.
  • OK curl: curl 8.4.0 (Windows) libcurl/8.4.0 Schannel WinIDN
  • WARNING gzip: not available
    • ADVICE:
      • spawn: gzip failed with exit code - and signal -. gzip is not executable
  • OK tar: bsdtar 3.5.2 - libarchive 3.5.2 zlib/1.2.5.f-ipp
  • OK pwsh: 7.4.1 Microsoft Windows 10.0.19045 Win32NT
  • WARNING 7z: not available
    • ADVICE:
      • spawn: 7z failed with exit code - and signal -. 7z is not executable

mason.nvim [Languages] ~

  • WARNING Go: not available
    • ADVICE:
      • spawn: go failed with exit code - and signal -. go is not executable
  • WARNING cargo: not available
    • ADVICE:
      • spawn: cargo failed with exit code - and signal -. cargo 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 RubyGem: not available
    • ADVICE:
      • spawn: gem.cmd failed with exit code - and signal -. gem.cmd is not executable
  • WARNING Composer: not available
    • ADVICE:
      • spawn: composer.bat failed with exit code - and signal -. composer.bat is not executable
  • WARNING PHP: not available
    • ADVICE:
      • spawn: php failed with exit code - and signal -. php is not executable
  • WARNING javac: not available
    • ADVICE:
      • spawn: javac failed with exit code - and signal -. javac is not executable
  • WARNING java: not available
    • ADVICE:
      • spawn: java failed with exit code - and signal -. java is not executable
  • WARNING julia: not available
    • ADVICE:
      • spawn: julia failed with exit code - and signal -. julia is not executable
  • WARNING python: not available
    • ADVICE:
      • spawn: python failed with exit code - and signal -. python is not executable
  • WARNING pip: not available
    • ADVICE:
      • spawn: python failed with exit code - and signal -. python is not executable
  • WARNING python venv: not available
    • ADVICE:
      • On Debian/Ubuntu systems, you need to install the python3-venv package using the following command:

        apt-get install python3-venv

  • OK node: v20.11.0
  • OK npm: 10.2.4

mason.nvim [GitHub] ~

  • OK GitHub API rate limit. Used: 0. Remaining: 60. Limit: 60. Reset: 1/19/2024 2:35:08 PM. Install and authenticate via gh-cli to increase rate limit. ` i am unable to tell what actually is the cause of this issue, i have curl and wget installed.

Expected behavior

mason.nvim to successfully install registries without any errors

Affected packages

all

Mason output

Registry installation failed with the following error:
    GitHubRegistrySource(repo=mason-org/mason-registry) failed to install: Failed to download registry archive.

Installation log

[ERROR 1/17/2024 12:04:12 PM] ...ta/lazy/mason.nvim/lua/mason-registry/sources/github.lua:146: Failed to install registry GitHubRegistrySource(repo=mason-org/mason-registry). "Failed to download registry archive."

Neovim version (>= 0.7)

NVIM v0.9.5 Build type: RelWithDebInfo LuaJIT 2.1.1703942320

Operating system/version

Windows 10 pro/10.0.19045 build 19045

Healthcheck

mason.nvim ~
- OK mason.nvim version v1.9.0
- OK PATH: prepend
- OK Providers: 
  mason.providers.registry-api
  mason.providers.client
- OK neovim version >= 0.7.0

mason.nvim [Registries] ~
- ERROR Registry `github.com/mason-org/mason-registry [uninstalled]` is not installed.
  - ADVICE:
    - Run :MasonUpdate to install.

mason.nvim [Core utils] ~
- WARNING unzip: not available
  - ADVICE:
    - spawn: unzip failed with exit code - and signal -. unzip is not executable
- OK wget: `GNU Wget 1.21.4 built on mingw32.
`
- OK curl: `curl 8.4.0 (Windows) libcurl/8.4.0 Schannel WinIDN
`
- WARNING gzip: not available
  - ADVICE:
    - spawn: gzip failed with exit code - and signal -. gzip is not executable
- OK tar: `bsdtar 3.5.2 - libarchive 3.5.2 zlib/1.2.5.f-ipp 
`
- OK pwsh: `7.4.1 Microsoft Windows 10.0.19045 Win32NT
`
- WARNING 7z: not available
  - ADVICE:
    - spawn: 7z failed with exit code - and signal -. 7z is not executable

mason.nvim [Languages] ~
- WARNING Go: not available
  - ADVICE:
    - spawn: go failed with exit code - and signal -. go is not executable
- WARNING cargo: not available
  - ADVICE:
    - spawn: cargo failed with exit code - and signal -. cargo 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 RubyGem: not available
  - ADVICE:
    - spawn: gem.cmd failed with exit code - and signal -. gem.cmd is not executable
- WARNING Composer: not available
  - ADVICE:
    - spawn: composer.bat failed with exit code - and signal -. composer.bat is not executable
- WARNING PHP: not available
  - ADVICE:
    - spawn: php failed with exit code - and signal -. php is not executable
- WARNING javac: not available
  - ADVICE:
    - spawn: javac failed with exit code - and signal -. javac is not executable
- WARNING java: not available
  - ADVICE:
    - spawn: java failed with exit code - and signal -. java is not executable
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- WARNING python: not available
  - ADVICE:
    - spawn: python failed with exit code - and signal -. python is not executable
- WARNING pip: not available
  - ADVICE:
    - spawn: python failed with exit code - and signal -. python is not executable
- WARNING python venv: not available
  - ADVICE:
    - On Debian/Ubuntu systems, you need to install the python3-venv package using the following command:
      
      apt-get install python3-venv
- OK node: `v20.11.0
`
- OK npm: `10.2.4`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 0. Remaining: 60. Limit: 60. Reset: 1/19/2024 2:35:08 PM.
  Install and authenticate via gh-cli to increase rate limit.

Screenshots

No response

thecode-master-sy avatar Jan 19 '24 12:01 thecode-master-sy

@thecode-master-sy,

The provided stack-trace clearly describes the issue.

  • WARNING unzip: not available
  • WARNING 7z: not available
  • WARNING gzip: not available

See requirements in README.md

vladdoster avatar Feb 19 '24 02:02 vladdoster

Got a same error but :checkhealth mason shows Core Utils OK.


==============================================================================
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-01-25-strong-salad` 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.24.5 built on darwin23.2.0.`
- OK curl: `curl 8.4.0 (x86_64-apple-darwin23.0) libcurl/8.4.0 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.58.0`
- OK gzip: `Apple gzip 428`
- OK gtar: `tar (GNU tar) 1.35`
- OK bash: `GNU bash, version 3.2.57(1)-release (arm64-apple-darwin23)`
- OK sh: `Ok`

mason.nvim [Languages] ~
- OK Ruby: `ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin23]`
- 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
- OK Go: `go version go1.22.0 darwin/arm64`
- OK cargo: `cargo 1.74.0`
- OK node: `v21.7.1`
- OK luarocks: `/opt/homebrew/bin/luarocks 3.9.2`
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- OK RubyGem: `3.0.3.1`
- OK python: `Python 3.9.6`
- OK java: `openjdk version "21.0.2" 2024-01-16`
- OK javac: `javac 21.0.2`
- OK npm: `10.5.0`
- OK pip: `pip 21.2.4 from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages/pip (python 3.9)`
- OK python venv: `Ok`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 0. Remaining: 60. Limit: 60. Reset: Mon Mar 25 18:47:19 2024.
  Install and authenticate via gh-cli to increase rate limit.


tydra-wang avatar Mar 25 '24 09:03 tydra-wang

Facing the same issue.

Samy-33 avatar Mar 28 '24 08:03 Samy-33

I found out my issue was due to a permission problem. The existing file ~/.local/share/nvim/mason/registries/github/mason-org/mason-registry/registry.json.zip is owned by root, for reasons unknown. Deleting registry.json.zip fixed it.

tydra-wang avatar Apr 01 '24 03:04 tydra-wang

I confirm that ~/.local/share/nvim/mason/registries/github/mason-org/mason-registry/registry.json.zip is owned by root and updating the owner to the current user fixed the issue as well.

Thanks @tydra-wang

Samy-33 avatar Apr 01 '24 11:04 Samy-33

Same error here, but the core apps are OK and the said zip file is not root's. I suspect the issue happens because I am behind a corporate network. I can access GitHub but cannot download from many other addresses. I suspect perhaps the installer tries to access an URL not allowed for me. Any tips? Thanks

nfgferreira avatar Apr 14 '24 16:04 nfgferreira

Ditto for me. Core apps ok, zip file permissions ok, also behind a corporate network.

notno avatar Apr 23 '24 21:04 notno

I'm using the NVIM nightly build and after updating this morning the error occurred. checkhealth shows that the core utilities are not available. I was able to track the error to the nvim commit c5af5c0b which has something to do with faster vim.deprecate(). Maybe this helps.

jrschenk avatar Apr 24 '24 06:04 jrschenk

@jrschenk i was experiencing this problem and your solution solved my issue. I had to switch nvim commit to git checkout a4fc3bb0e and then rebuild it

Tainted-Fool avatar Apr 25 '24 01:04 Tainted-Fool

Tested and confirmed nightly build has been fixed thanks to commit 1294е22.

cleong14 avatar Apr 26 '24 04:04 cleong14

seems like this issue has been resolved

thecode-master-sy avatar May 03 '24 10:05 thecode-master-sy

@thecode-master-sy,

The provided stack-trace clearly describes the issue.

  • WARNING unzip: not available
  • WARNING 7z: not available
  • WARNING gzip: not available

See requirements in README.md

This solution worked for me. I installed the required dependencies and viola.

krishgoblin avatar Aug 11 '24 13:08 krishgoblin