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

[VSCode Extension]: Cannot connect to DuckDB database due to broken driver detection behind corporate Proxy. #21

Open
evx73 opened this issue Aug 6, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@evx73
Copy link

evx73 commented Aug 6, 2024

Describe the bug

Cannot connect to DuckDB database due to broken driver detection behind corporate Proxy.

Steps to Reproduce

Set a new DuckDB connection, and connect

SqlTools log:

ERROR (ls): Connecting error: {"code":1000,"data":{"notification":"Core/missingModule","dontNotify":true,"args":{"conn":{"name":"DuckDB2","accessMode":"Read/Write","previewLimit":50,"driver":"DuckDB","databaseFilePath":":memory:","isActive":false,"isConnected":false,"id":"DuckDB2|DuckDB||"},"action":"install","deps":[{"type":"package","name":"duckdb-async","version":"0.10.2"}]}}}
ns: "conn-manager"

Warning: You need to install "[email protected]" to conttect to DuckDB

Action: Install now

Info: "[email protected]" installed. Go ahead and connect!

Action: Connect to DuckDB

Repeat from step "2" above

Logs

ERROR (ls): Connecting error: {"code":1000,"data":{"notification":"Core/missingModule","dontNotify":true,"args":{"conn":{"name":"DuckDB2","accessMode":"Read/Write","previewLimit":50,"driver":"DuckDB","databaseFilePath":":memory:","isActive":false,"isConnected":false,"id":"DuckDB2|DuckDB||"},"action":"install","deps":[{"type":"package","name":"duckdb-async","version":"0.10.2"}]}}}
ns: "conn-manager"

System Info

SQLTools Version 0.28.3
VS Code Version: 1.92.0
OS: Windows 10
Driver:
DuckDBDriver for SQLTools Version 1.0.0
Database version: :memory:
Node: node-v19.9.0-x64 or node-v20.16.0-x64

Severity

serious, but I can work around it

Additional Information, or Workarounds

Raise as vscode-sqltools bug and I was advised to raise a bug with the author of the DuckDB driver mtxr/vscode-sqltools#1362

@evx73 evx73 added the bug Something isn't working label Aug 6, 2024
@evx73 evx73 changed the title [Bug]: [VSCode Extension]: Cannot connect to DuckDB database due to broken driver detection behind corporate Proxy. Aug 6, 2024
@archiewood archiewood transferred this issue from evidence-dev/evidence Aug 6, 2024
@archiewood
Copy link
Member

Moving this across to the correct repo

@evx73
Copy link
Author

evx73 commented Aug 7, 2024

I have logged the exception that causes the connection to fail.

exception duckdb-async 0.10.2 Error: Module did not self-register: '\\?\C:\Users\XXXX\AppData\Local\vscode-sqltools\Data\node_modules\duckdb\lib\binding\duckdb.node'.

Do you have any suggestions on how to fix this? I have tried with several versions on nodejs and installed the module several times with no success.

This is the code to log the exception:

checkDependencies() {
....
                } catch (e) {
                  this.log.error(`exception ${dep.name} ${dep.version} ${e}`); // @hack
                  throw new missing_module_1.default(this.deps, this.credentials, mustUpgrade);
                }

@evx73
Copy link
Author

evx73 commented Aug 7, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants