Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to execute request due to missing method getinfo_effective_method (v2) #309

Open
hlidotbe opened this issue Mar 18, 2024 · 3 comments
Labels
v2 rest.nvim v2 issues

Comments

@hlidotbe
Copy link

It's probably linked to my setup but since V2 I cannot execute any request. I get the following error:

Error executing Lua callback: ...im/lazy/luarocks.nvim/.rocks/share/lua/5.1/nio/tasks.lua:95: Async task failed without callback: The coroutine failed with this message:
.../share/nvim/lazy/rest.nvim/lua/rest-nvim/client/curl.lua:292: attempt to call method 'getinfo_effective_method' (a nil value)
stack traceback:
        .../share/nvim/lazy/rest.nvim/lua/rest-nvim/client/curl.lua: in function <.../share/nvim/lazy/rest.nvim/lua/rest-nvim/client/curl.lua:164>
stack traceback:
        [C]: in function 'error'
        ...im/lazy/luarocks.nvim/.rocks/share/lua/5.1/nio/tasks.lua:95: in function 'close_task'
        ...im/lazy/luarocks.nvim/.rocks/share/lua/5.1/nio/tasks.lua:117: in function 'step'
        ...im/lazy/luarocks.nvim/.rocks/share/lua/5.1/nio/tasks.lua:145: in function 'run'
        ...al/share/nvim/lazy/rest.nvim/lua/rest-nvim/functions.lua:78: in function 'exec'
        ...cal/share/nvim/lazy/rest.nvim/lua/rest-nvim/commands.lua:44: in function 'impl'
        ...cal/share/nvim/lazy/rest.nvim/lua/rest-nvim/commands.lua:182: in function <...cal/share/nvim/lazy/rest.nvim/lua/rest-nvim/commands.lua:165>

My Lazy setup:

  {
    "vhyrro/luarocks.nvim",
    opts = {
      rocks = { "lua-curl", "nvim-nio", "mimetypes", "xml2lua" }, -- Specify LuaRocks packages to install
    },
    config = function()
      require("luarocks").setup({})
    end,
  },
  {
    "rest-nvim/rest.nvim",
    ft = "http",
    lazy = false,
    keys = {
      {
        "<leader>xh",
        "<cmd>Rest run<cr>",
        desc = "RestNvim"
      }
    },
    dependencies = { "luarocks.nvim" },
    config = function()
      require("rest-nvim").setup()
    end,
  }
@NTBBloodbath
Copy link
Member

Hi, could you please tell me your installed version of cURL by using curl --version? That method was implemented in version 7.72.0.

Providing a pre-compiled rock binary for the lua-curl dependency should solve this problem since currently the dependency is compiled with your system's versions of the libraries.

@NTBBloodbath NTBBloodbath added the v2 rest.nvim v2 issues label Mar 18, 2024
@hlidotbe
Copy link
Author

Indeed I have 7.68.0. I'll try to upgrade curl and hopefully it'll fix that. Thanks!

@NTBBloodbath
Copy link
Member

No problem, hope I can get the binary rock setup very soon so we won't need to do this in the future. I'll pin this issue so it can have the proper discoverability in case someone else is facing the same issue, and close it once we get the binary rock to properly address this 🙂

@NTBBloodbath NTBBloodbath pinned this issue Mar 18, 2024
@boltlessengineer boltlessengineer unpinned this issue Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 rest.nvim v2 issues
Projects
None yet
Development

No branches or pull requests

2 participants