ibmdb / vscode-extension

vscode extenstion for db2 as db2connect
7 stars 2 forks source link

Windows WSL - command 'extension.Db2Connect' not found #76

Closed belfortmaycon closed 1 month ago

belfortmaycon commented 1 month ago

Steps to Reproduce:

  1. Install Db2 Connect from Extension Marketplace
  2. Open the DB2 View
  3. Click on + to add connection
  4. Error message: command 'extension.Db2Connect' not found
bimalkjha commented 1 month ago

@belfortmaycon Please use option View ->Command Pallette -> Db2: Rebuild Native Module. If it fails, restart the vscode and try using the extension. It will try to rebuild the native module now again. Open "View -> Output" and select Db2Connect under Task. Copy all output and paste here. Thanks.

belfortmaycon commented 1 month ago

Hi @bimalkjha I tried the suggested steps but still got the same error. There is no Db2Connect in the Output task list.

I tried it on Windows, and it works fine, but I need it on WSL.

bimalkjha commented 1 month ago

@belfortmaycon It seems some OS component is missing in your system. I would suggest to run below commands on terminal of your ubuntu and share complete output here:

cd $HOME/.vscode/extensions/ibm.db2connect-2.3.1/node_modules/ibm_db    # correct path as per your system
node -v
make -v
gcc --version
npm install

Thanks.

bimalkjha commented 1 month ago

@belfortmaycon I tried to reproduce the issue and can see below error when tried to use this extension:

image

After checking Output for Extension Host(Remote) in VSCode, we can see an error:

2024-10-26 13:52:05.330 [info] ExtensionService#_doActivateExtension IBM.db2connect, startup: false, activationEvent: 'onView:db2connect'
2024-10-26 13:52:05.393 [error] Activating extension IBM.db2connect failed due to an error:
2024-10-26 13:52:05.393 [error] TypeError: Cannot read properties of undefined (reading 'split')
    at Object.<anonymous> (/home/bimal/.vscode-server/extensions/ibm.db2connect-2.3.1/extension.js:18:51)

db2connect extension in a electron application. To know the version of electron, db2connect extension code tries to read value of process.versions.electron, but there is no electron under process.versions and hence error.

After google, I found below info: image

I think info on below two links may help you: https://www.beekeeperstudio.io/blog/building-electron-windows-ubuntu-wsl2 https://gist.github.com/caseywatts/9700b402b6b51d1d6af9f0b206739770 Thanks.

belfortmaycon commented 1 month ago

Thank you @bimalkjha. Due to company policies, I can't install an X server on my Windows, but I understand the problem.

Thank you for your support.