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

[MongoDB] Failed to List Databases #147

Open
dunix241 opened this issue Aug 28, 2024 · 3 comments
Open

[MongoDB] Failed to List Databases #147

dunix241 opened this issue Aug 28, 2024 · 3 comments

Comments

@dunix241
Copy link

dunix241 commented Aug 28, 2024

Steps to reproduce:

  1. Add a MongoDB data source
  2. Place the cursor over the source
  3. Perform the toggle (o) action
  4. Get the error
E5108: Error executing lua: function DbeeConnectionListDatabases[1]..remote#define#request, line 2: Vim(let):Error invoking '0:function:DbeeConnectionListDatabases' on channel 5:
c.ListDatabases: switcher.ListDatabases: failed to retrieve database names: (AtlasError) Unallowed argument in listDatabases command: filter
stack traceback:
	[C]: in function 'DbeeConnectionListDatabases'
	/mnt/f/Projects/nvim-dbee/lua/dbee/handler/init.lua:256: in function 'connection_list_databases'
	/mnt/f/Projects/nvim-dbee/lua/dbee/ui/drawer/convert.lua:95: in function 'lazy_children'
	/mnt/f/Projects/nvim-dbee/lua/dbee/ui/drawer/init.lua:208: in function 'expand_node'
	/mnt/f/Projects/nvim-dbee/lua/dbee/ui/drawer/init.lua:293: in function </mnt/f/Projects/nvim-dbee/lua/dbee/ui/drawer/init.lua:285>

Screenshot

@spencer-thompson
Copy link

Same error here

@FelipeSharkao
Copy link

I got a similar error, but not the exact same

E5108: Error executing lua: function DbeeConnectionListDatabases[1]..remote#define#request, line 2: Vim(let):Error invoking '0:function:DbeeConnectionListDatabases' on channel 5:
c.ListDatabases: switcher.ListDatabases: failed to retrieve database names: (AtlasError) Expected user provided "name" field in filter to be regex or string was primitive.D instead
stack traceback:
        [C]: in function 'DbeeConnectionListDatabases'
        ...ocal/share/nvim/lazy/nvim-dbee/lua/dbee/handler/init.lua:256: in function 'connection_list_databases'
        ...share/nvim/lazy/nvim-dbee/lua/dbee/ui/drawer/convert.lua:95: 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>

It looks like the command to filter the database list is malformed. Funny enough, comparing the code with the documentation, it looks fine.

I have no experience with Go, but I'm down to fixing this, since MongoDB probably isn't priority for the maintainers, and I want something nice to migrate out of Mongo Compass.

@dunix241
Copy link
Author

dunix241 commented Dec 7, 2024

Hello guys, I found a perfect alternative for MondoDB client which is vi-mongo it's like lazygit and integrates with neovim pretty well. Highly recommend it.

I tried to dive into the code to see what I could do but failed even with newer Mongo driver.

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

3 participants