kndndrj / nvim-dbee

Interactive database client for neovim
GNU General Public License v3.0
606 stars 39 forks source link

Error on connection: Invalid channel #125

Open SergioShz opened 3 weeks ago

SergioShz commented 3 weeks ago

Hi, Awesome plugin, giving it a try I'm encountering this problem whenever I try to connect to a postgres db:

E5108: Error executing lua: function DbeeConnectionGetStructure[1]..remote#define#request, line 2: Vim(let):Error invoking '0:function:DbeeConnectionGetStructure' on channel 3:              
Invalid channel: 3                                                                                                                                                                            
stack traceback:                                                                                                                                                                              
        [C]: in function 'DbeeConnectionGetStructure'                                                                                                                                         
        ...ocal/share/nvim/lazy/nvim-dbee/lua/dbee/handler/init.lua:223: in function 'connection_get_structure'                                                                               
        ...share/nvim/lazy/nvim-dbee/lua/dbee/ui/drawer/convert.lua:92: in function 'lazy_children'                                                                                           
        ...al/share/nvim/lazy/nvim-dbee/lua/dbee/ui/drawer/init.lua:208: in function 'expand_node'                                                                                            
        ...al/share/nvim/lazy/nvim-dbee/lua/dbee/ui/drawer/init.lua:293: in function <...al/share/nvim/lazy/nvim-dbee/lua/dbee/ui/drawer/init.lua:285>   

The weird thing is that for any mysql db everything works fine, but when I try to connect to postgresql the issue appears even for mysql connections (after trying in postgresql).

My config (using lazy):

return {
  "kndndrj/nvim-dbee",
  dependencies = {
    "MunifTanjim/nui.nvim",
  },
  build = function()
    -- Install tries to automatically detect the install method.
    -- if it fails, try calling it with one of these parameters:
    --    "curl", "wget", "bitsadmin", "go"
    require("dbee").install("curl")
  end,
  config = function()
    require("dbee").setup({
           sources = {
      require("dbee.sources").MemorySource:new({
        {
          name = "cool_pg",
          type = "postgres",
          url = "postgres://postgres:mysecretpassword1234@localhost:5432/dvdrental?sslmode=disable",
        },
        {
          name = "cool_mysql",
          type = "mysql",
          url = "me:pwd@tcp(localhost:3306)/dvdrental",
        },
      }),
    }
    })
  end,
}

I also tried as env variables and file as source with no luck...

Logs doesn't seems to output any relevant info (no errors at least), this is for example for a connection to postgres db:

2024/06/14 10:28:08 [info]: method "DbeeConnectionListDatabases" returned successfully
2024/06/14 10:28:10 [info]: calling method "DbeeConnectionGetStructure"

Checkhealth seems fine too:

==============================================================================
dbee: require("dbee.health").check()

DBee report ~
- OK Binary version matches version of install manifest.

==============================================================================

I'm on arch linux 6.9.3-arch1-1 and neovim:

NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1716656478

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Any help is welcome, thank you! 🙏🏻