Vscode-sqltools: Connection Error

Created on 2 Jul 2020  路  5Comments  路  Source: mtxr/vscode-sqltools

PostgreSQL

> code --version                              # service-db-main-migration -> develop $
1.46.1
cd9ea6488829f560dc949a8b2fb789f3cdc05f5d
x64
['ext:error-handler'] Error opening connection Request connection/ConnectRequest failed unexpectedly without providing any details.
['ext:error-handler:verbose'] [ResponseError: Request connection/ConnectRequest failed unexpectedly without providing any details.
    at /Users/calebcushing/.vscode/extensions/mtxr.sqltools-0.22.10/extension.js:16:111706
    at /Users/calebcushing/.vscode/extensions/mtxr.sqltools-0.22.10/extension.js:16:112113
    at Immediate.<anonymous> (/Users/calebcushing/.vscode/extensions/mtxr.sqltools-0.22.10/extension.js:16:112655)
    at processImmediate (internal/timers.js:439:21)
    at process.topLevelDomainCallback (domain.js:131:23)] {
  code: -32603,
  data: undefined
}

this happens because the new UI creates this in the settings, even though I don't want SSL, deleting this code works

        "pgOptions": {
          "ssl": {}
        },

trying to connect the first time fails, a second time it succeeds.

triage

Most helpful comment

settings.json or your workspace file

All 5 comments

I'm getting this error because of that default configuration, where can we modify that?
Thanks in advance!

settings.json or your workspace file

Can you share your settings please? It's not working for me, I don't know what's the format expected here
Thanks for your help!

After you created a connection, you can search pgOptions in your codebase. it should be in a settings.json file. just get rid of that. then everything works.

My format:

{
"sqltools.connections": [
{
"database": "postgres",
"driver": "PostgreSQL",
"name": "remote postgres",
"password": "secretpassword",
"port": 5432,
"previewLimit": 50,
"server": "a string",
"username": "postgres"
}
]
}

Dup #640

Was this page helpful?
0 / 5 - 0 ratings