Skip to content

Error after recently updates (macos, nvim, packages, etc) #558

@asfaltboy

Description

@asfaltboy

Prerequisites

  • I am using the latest stable release of Neovim
  • I am using the latest version of the plugin
  • I can reproduce the bug with minimal config below

Neovim Version

NVIM v0.11.4 Build type: Release LuaJIT 2.1.1753364724

Operating system/version

macOS Sonoma 14.8

Actual behavior

I can't use rest-nvim after upgrading to neovim 0.11, and possible other dependency 'packages'. It used to work just fine last week for example.

Now I am seeing an error like this: utils.lua:105: attempt to perform arithmetic on a nil value

Full stack traceback

Error executing vim.schedule lua callback: ...chenko/.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:100: Async task failed without callback: The coroutine failed with this message: 
....local/share/nvim/lazy/rest.nvim/lua/rest-nvim/utils.lua:105: attempt to perform arithmetic on a nil value
stack traceback:
	....local/share/nvim/lazy/rest.nvim/lua/rest-nvim/utils.lua: in function 'parse_http_time'
	...l/share/nvim/lazy/rest.nvim/lua/rest-nvim/cookie_jar.lua:81: in function 'f'
	...Cellar/neovim/0.11.4/share/nvim/runtime/lua/vim/iter.lua:335: in function 'map'
	...l/share/nvim/lazy/rest.nvim/lua/rest-nvim/cookie_jar.lua:134: in function 'update_jar'
	...ocal/share/nvim/lazy/rest.nvim/lua/rest-nvim/request.lua:89: in function 'run_request'
	...ocal/share/nvim/lazy/rest.nvim/lua/rest-nvim/request.lua:120: in function <...ocal/share/nvim/lazy/rest.nvim/lua/rest-nvim/request.lua:109>
stack traceback:
	[C]: in function 'error'
	...chenko/.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:100: in function 'close_task'
	...chenko/.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:122: in function 'cb'
	...chenko/.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:183: in function 'waiter'
	...enko/.local/share/nvim/lazy/nvim-nio/lua/nio/control.lua:116: in function 'wake'
	...enko/.local/share/nvim/lazy/nvim-nio/lua/nio/control.lua:129: in function 'set'
	...re/nvim/lazy/rest.nvim/lua/rest-nvim/client/curl/cli.lua:382: in function <...re/nvim/lazy/rest.nvim/lua/rest-nvim/client/curl/cli.lua:376>
                       18 lines yanked
Output of `checkhealth rest-nvim`


==============================================================================
rest-nvim:                                                                  ✅

Installation ~
- ✅ OK Found `luarocks` installed in your system
- ✅ OK Found Luarocks PATHs in your Neovim's Lua `package.path`
- ✅ OK Dependency `mimetypes` was found
- ✅ OK Dependency `xml2lua` was found
- ✅ OK Dependency `nvim-nio` was found
- ✅ OK Dependency `fidget.nvim` was found

Response body formatters ~
- ✅ OK Option 'formatexpr' is set to `v:lua.LazyVim.format.formatexpr()` for json filetype
- ✅ OK Option 'formatexpr' is set to `xmlformat#Format()` for xml filetype
- ✅ OK Option 'formatexpr' is set to `v:lua.LazyVim.format.formatexpr()` for html filetype
- You can set formatter for each filetype via 'formatexpr' or 'formatprg' option

Expected behavior

Should be able to run rest-nvim

Steps to reproduce

  1. Install rest-nvim and run it.

Minimal config for repro (using lazy.nvim)

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
    spec = {
        "rest-nvim/rest.nvim",
        {
            "nvim-treesitter/nvim-treesitter",
            build = ":TSUpdate",
            main = "nvim-treesitter.configs",
            opts = {
                ensure_installed = { "http" },
                sync_install = false,
                highlight = { enable = true },
                indent = { enable = true },
            },
        },
    },
})

Other information

Can't run minimal config, getting this error:

tree-sitter-http 0.0.33-1 depends on lua >= 5.1 (5.1-1 provided by VM: success)
        Failed installing rest.nvim with `luarocks`.
...
Error: Could not satisfy dependency tree-sitter-http 0.0.35: No results matching query were found for Lua 5.1
Details


   Home (H)   Install (I)   Update (U)   Sync (S)   Clean (X)   Check (C)   Log (L)   Restore (R)   Profile (P)   Debug (D)   Help (?) 

  Total: 4 plugins

  Failed (1)
    ● rest.nvim 4.13ms  start
        `lua` version `5.1` needed, but found `Lua 5.4.8  Copyright (C) 1994-2025 Lua.org, PUC-Rio`
        `lua5.1` or `lua` or `lua-5.1` version `5.1` not installed

        This plugin requires `luarocks`. Try one of the following:
         - fix your `luarocks` installation
         - enable `hererocks` with `opts.rocks.hererocks = true`
         - disable `luarocks` support completely with `opts.rocks.enabled = false`

        Will try building anyway, but will likely fail...

        --------------------------------------------------------------------------------

        Warning: Failed searching manifest: Failed downloading https://nvim-neorocks.github.io/rocks-binaries/manifest-5.1 - failed downloading https://nvim-neorocks.github.io/rocks-binaries/manifest-5.1
        Installing https://luarocks.org/rest.nvim-3.13.0-1.src.rock

        Missing dependencies for rest.nvim 3.13.0-1:
           nvim-nio (not installed)
           mimetypes (not installed)
           xml2lua (not installed)
           fidget.nvim (not installed)
           tree-sitter-http 0.0.33 (not installed)

        rest.nvim 3.13.0-1 depends on lua >= 5.1 (5.1-1 provided by VM: success)
        rest.nvim 3.13.0-1 depends on nvim-nio (not installed)
        Installing https://luarocks.org/nvim-nio-1.10.1-1.src.rock


        nvim-nio 1.10.1-1 depends on lua >= 5.1 (5.1-1 provided by VM: success)
        No existing manifest. Attempting to rebuild...
        nvim-nio 1.10.1-1 is now installed in /Users/pavel.savchenko/.repro/data/nvim/lazy-rocks/rest.nvim (license: MIT)

        rest.nvim 3.13.0-1 depends on mimetypes (not installed)
        Installing https://luarocks.org/mimetypes-1.1.0-2.src.rock


        mimetypes 1.1.0-2 depends on lua >= 5.1 (5.1-1 provided by VM: success)
        mimetypes 1.1.0-2 is now installed in /Users/pavel.savchenko/.repro/data/nvim/lazy-rocks/rest.nvim (license: MIT/X11)

        rest.nvim 3.13.0-1 depends on xml2lua (not installed)
        Installing https://luarocks.org/xml2lua-1.6-2.src.rock


        xml2lua 1.6-2 depends on lua >= 5.1, <= 5.4 (5.1-1 provided by VM: success)
        xml2lua 1.6-2 is now installed in /Users/pavel.savchenko/.repro/data/nvim/lazy-rocks/rest.nvim (license: MIT)

        rest.nvim 3.13.0-1 depends on fidget.nvim (not installed)
        Installing https://luarocks.org/fidget.nvim-1.6.0-1.src.rock


        fidget.nvim 1.6.0-1 depends on lua >= 5.1 (5.1-1 provided by VM: success)
        fidget.nvim 1.6.0-1 is now installed in /Users/pavel.savchenko/.repro/data/nvim/lazy-rocks/rest.nvim (license: MIT)

        rest.nvim 3.13.0-1 depends on tree-sitter-http 0.0.33 (not installed)
        Installing https://luarocks.org/tree-sitter-http-0.0.33-1.src.rock
        Missing dependencies for tree-sitter-http 0.0.33-1:
           luarocks-build-treesitter-parser >= 5.0.0 (not installed)

        tree-sitter-http 0.0.33-1 depends on luarocks-build-treesitter-parser >= 5.0.0 (not installed)
        Installing https://luarocks.org/luarocks-build-treesitter-parser-6.0.1-1.src.rock

        Missing dependencies for luarocks-build-treesitter-parser 6.0.1-1:
           luafilesystem ~> 1 (not installed)

        luarocks-build-treesitter-parser 6.0.1-1 depends on lua >= 5.1 (5.4-1 provided by VM: success)
        luarocks-build-treesitter-parser 6.0.1-1 depends on luafilesystem ~> 1 (not installed)
        Installing https://luarocks.org/luafilesystem-1.8.0-1.src.rock


        luafilesystem 1.8.0-1 depends on lua >= 5.1 (5.4-1 provided by VM: success)
        env MACOSX_DEPLOYMENT_TARGET=11.0 gcc -O2 -fPIC -I/opt/homebrew/include/lua5.4 -c src/lfs.c -o src/lfs.o
        env MACOSX_DEPLOYMENT_TARGET=11.0 gcc  -bundle -undefined dynamic_lookup -all_load -o /var/folders/sm/kk03h9816r79ttjjvbpbxqvc0000gn/T/luarocks_build-LuaFileSystem-1.8.0-1-5691296/lfs.so src/lfs.o
        No existing manifest. Attempting to rebuild...
        luafilesystem 1.8.0-1 is now installed in /Users/pavel.savchenko/.repro/data/nvim/lazy-rocks/rest.nvim (license: MIT/X11)


        Error: Failed installing dependency: https://luarocks.org/tree-sitter-http-0.0.33-1.src.rock - Build error: 'tree-sitter CLI' is not installed.
        tree-sitter-http requires the tree-sitter CLI to build.

        luarocks-build-treesitter-parser 6.0.1-1 is now installed in /Users/pavel.savchenko/.repro/data/nvim/lazy-rocks/rest.nvim (license: MIT)


        tree-sitter-http 0.0.33-1 depends on lua >= 5.1 (5.1-1 provided by VM: success)
        Failed installing rest.nvim with `luarocks`.

        --------------------------------------------------------------------------------

        Trying to build from source.
        Error: Could not satisfy dependency tree-sitter-http 0.0.35: No results matching query were found for Lua 5.1.

        Missing dependencies for rest.nvim scm-1:
           tree-sitter-http 0.0.35 (not installed)

        rest.nvim scm-1 depends on lua >= 5.1, < 5.4 (5.1-1 provided by VM: success)
        rest.nvim scm-1 depends on nvim-nio (1.10.1-1 installed: success)
        rest.nvim scm-1 depends on mimetypes (1.1.0-2 installed: success)
        rest.nvim scm-1 depends on xml2lua (1.6-2 installed: success)
        rest.nvim scm-1 depends on fidget.nvim (1.6.0-1 installed: success)
        rest.nvim scm-1 depends on tree-sitter-http 0.0.35 (not installed)

  Loaded (3)
    ● lazy.nvim 30208.7ms  init.lua
    ● nvim-treesitter 7.85ms  start
    ● tokyonight.nvim 4.81ms colorscheme tokyonight

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions