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

Error on connection: Invalid channel #125

Open
SergioShz opened this issue Jun 14, 2024 · 0 comments
Open

Error on connection: Invalid channel #125

SergioShz opened this issue Jun 14, 2024 · 0 comments

Comments

@SergioShz
Copy link

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! 🙏🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant