kristijanhusak / vim-dadbod-ui

Simple UI for https://github.com/tpope/vim-dadbod
MIT License
1.54k stars 94 forks source link

E605 - no adaptor for https #272

Closed Normanras closed 2 months ago

Normanras commented 2 months ago

This might belong as an issue in the dadbod repo as I saw issues around adaptors, but this error only comes up when I try to open :DBUI after adding a connection.

Error detected while processing function db_ui#open[1]..<SNR>73_init[2]..14[25]..16[10]..17[35]..28[10]..db#adapter#call[1]..<SNR>78_fnname[1]..<SNR>78_prefix[20]..function db_ui#open[
1]..<SNR>73_init[2]..14[25]..16[10]..17[35]..28[10]..db#adapter#call[1]..<SNR>78_fnname[1]..<SNR>78_prefix:
line   20:
E605: Exception not caught: DB: no adapter for https
Press ENTER or type command to continue

I can add a connection and run any of the other DBUI commands except the ones that actually create/open the UI. Couldn't find anything in this repos issues, so happy to close this if I'm in the wrong place.

FWIW, I'm trying to connect to a postgres db on AWS.

kristijanhusak commented 2 months ago

Give me a db url format that you are using. Just conceal username and password.

Normanras commented 2 months ago

postgresql//username:pass@long.db.name.123qwwz.amazonaws.com:port/dbname

psql also connects successfully

kristijanhusak commented 2 months ago

I'm not sure where does https come from. Do you have some other connections? Does your username or password maybe contain https word? It shouldn't cause any issues but I'm just guessing at this point.

Normanras commented 2 months ago

Weird. It is a remote db, but I can't imagine I'm the only one connecting to remote db. It's just weird because just running psql and the flags works without issue. I'll post this over on vim-dadbod. And see if they have seen this before.

kristijanhusak commented 2 months ago

I'm connecting to an AWS postgres without any issues, so that shouldn't be a problem. I'm just not sure where does the adapter figure out https from the url if it does not contain it at all.

Normanras commented 2 months ago

Figured it out. Didn't realize that every connection gets saved to connections.json. This issue & comments helped me solved it. When I first tried the plugin, I absentmindedly typed in my url with https and it kept it in the file, which is why I kept getting the error. Removing everything from the file and re-connecting to the DB got everything working. It's working like a charm!