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

Command 'Db2: Connect' resulted in an error (command 'extension.Db2Connect' not found) #50

Closed
gcmanriq opened this issue Aug 16, 2022 · 4 comments

Comments

@gcmanriq
Copy link

  • Platform: MacOs Monterey version 12.5
  • vscode Version: 1.70.1
  • Is node.js and npm installed: yes
  • node.js and npm Version: nodejs v18.7.0 and npm: 8.15.0
  • Take a screen shot of VScode(Help->About) information and paste it:
    image

Steps to Reproduce:

  1. Install extension
  2. Go to DB2 Connect and select Connect Option
  3. Db2Connect Output:
Downloading and extraction of DB2 ODBC CLI Driver completed successfully ...

/Users/xxxxxx/.vscode/extensions/ibm.db2connect-2.3.0/node_modules/ibm_db/installer/clidriver
Extraction of build.zip completed successfully... 

Successfully renamed the Electron binary
Error: dlopen(/Users/xxxxxx/.vscode/extensions/ibm.db2connect-2.3.0/node_modules/ibm_db/build/Release/odbc_bindings.node, 0x0001): Library not loaded: '/Users/bjha/nodework/clidriver/lib/libdb2.dylib'
  Referenced from: '/Users/xxxxxx/.vscode/extensions/ibm.db2connect-2.3.0/node_modules/ibm_db/build/Release/odbc_bindings.node'
  Reason: tried: '/Users/bjha/nodework/clidriver/lib/libdb2.dylib' (no such file), '/usr/lib/libdb2.dylib' (no such file)

Tried to unistall extension and restarted visual studio code several times and still the same issue.
Library is available under /Users/xxxxxx/.vscode/extensions/ibm.db2connect-2.3.0/node_modules/ibm_db/installer/clidriver/lib/libdb2.dylib but I can't create symbolic link in /usr/lib

@BjarniThor
Copy link

BjarniThor commented Aug 17, 2022

Having the exact same problem, looking forward to hearing about a solution.

DB2Connect log
Successfully renamed the Electron binary Error: dlopen(/Users/rb653/.vscode/extensions/ibm.db2connect-2.3.0/node_modules/ibm_db/build/Release/odbc_bindings.node, 0x0001): Library not loaded: /Users/bjha/nodework/clidriver/lib/libdb2.dylib Referenced from: /Users/rb653/.vscode/extensions/ibm.db2connect-2.3.0/node_modules/ibm_db/build/Release/odbc_bindings.node Reason: tried: '/Users/bjha/nodework/clidriver/lib/libdb2.dylib' (no such file), '/usr/lib/libdb2.dylib' (no such file)

@bimalkjha
Copy link
Member

@BjarniThor @gcmanriq I have just pushed the fix of this issue. In your vscode, click on View -> Command Palette -> Db2: Rebuild Native Module and issue should get fixed. Please try and update. Thanks.

@BjarniThor
Copy link

Very well done, confirmed working for me!
Thanks you.

@gcmanriq
Copy link
Author

It is working, thanks!

bimalkjha added a commit to ibmdb/node-ibm_db that referenced this issue Sep 6, 2022
 * fix: update binaries for windows and vscode (Bimal Jha)
 * fix: Reloading driver causes failures on async functions #514 (Bimal Jha)
 * fea: Convert the library to support Promises for all methods. #715 (Bimal Jha)
 * fea: add result.close API (Bimal Jha)
 * promisify describe related methods (Bimal Jha)
 * update mac binaries for vscode ibmdb/vscode-extension#50 (Bimal Jha)
 * test: update test files (Bimal Jha)
 * fix: Empty Strings in Batch inserts result in corrupt values being inserted #875 (Bimal Jha)
 * fea: Add support for Buffer() for insert and select for binary data. #702, #859, #860, #862, #864 (Bimal Jha)
 * fea: allow installation using specific version of clidriver (Bimal Jha)
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