ibmdb / vscode-extension

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

Failed to rebuild native modules #48

Closed galczynskiCS closed 2 years ago

galczynskiCS commented 2 years ago

Steps to Reproduce:

  1. Open VSCode
  2. Select DB2 extension from ribbon
  3. Select Connect
  4. image

I did try to reinstall the db2 extension. It didn't help.

bimalkjha commented 2 years ago

@galczynskiCS Please find the file C:\Users\bjha\.vscode\extensions\ibm.db2connect-2.3.0\rebuilt_dont_delete and delete it. Then close the VSCode and reopen it. Try to use connection. It should go for rebuild native module and fix the issue. You can check the rebuild log as in below screen shot and share here if rebuild fails. You may check issue #28 to know how output log looks and other solutions. Thanks. image

galczynskiCS commented 2 years ago

Hi @bimalkjha,

There is no rebuilt_dont_delete file neither in the repository you mentioned, nor in the extension folder itself. image

bimalkjha commented 2 years ago

@galczynskiCS Then delete the directory C:\Users\youruserid\.vscode\extensions\ibm.db2connect-2.3.0\node_modules\ibm_db manually and restart vscode. Try to capture the output log as mentioned in previous update. Thanks.

bimalkjha commented 2 years ago

If still do not work, then run below commands from windows command prompt, reopen vscode, verify and share the complete output from command prompt:

cd C:\Users\YOURUSERID\.vscode\extensions\ibm.db2connect-2.3.0\
npm uninstall ibm_db
npm install ibm_db

I hope you are using ibm.db2connect-2.3.0, if your version is different let us know. Try to uninstall the extension and go for fresh installation. New installation should fix the issue. Thanks.

galczynskiCS commented 2 years ago

Hi @bimalkjha I've deleted the folder, but I still can't install the extension. I've captured the log on new installation.

Intellisense Activated [8/16/2022 1:00:52 PM] Proceeding to rebuild native modules [8/16/2022 1:00:52 PM] No ibm_db found... Downloading node ibm_db Driver from https://github.com/ibmdb/node-ibm_db/archive/master.zip...

Error: read ECONNRESET

bimalkjha commented 2 years ago

@galczynskiCS Why vscode fails to download https://github.com/ibmdb/node-ibm_db/archive/master.zip? Do you not have an active internet connection during activation? Click on the link and check if you are able to download https://github.com/ibmdb/node-ibm_db/archive/master.zip using your browser. Thanks.

galczynskiCS commented 2 years ago

@bimalkjha
The thing is that my internet connection works correctly. I can download the extension manually from the link you provided. I can also operate within VScode, download extensions etc. I'm a bit puzzeled why the ECCONNRESET error pops up.

bimalkjha commented 2 years ago

@galczynskiCS From VSCode, click on View -> Command Palette -> Db2: Rebuild Native Modules. Then, click on View -> Output and it will open output windows. In the output windows, select Db2Connect in Task as in below screen shot: image

It should reinstall db2connect extension and extension should work fine. If there is any error in the Output window, please copy the text and share here. Thanks.

galczynskiCS commented 2 years ago

@bimalkjha I did as you instructed. The error I get right now is: image

I reinstalled VSCode. Currently the log whenever I go for db2 icon > + reults in: Intellisense Activated [8/18/2022 2:10:05 PM] Proceeding to rebuild native modules [8/18/2022 2:10:05 PM] No ibm_db found... Downloading node ibm_db Driver from https://github.com/ibmdb/node-ibm_db/archive/master.zip...

 100.00% | 6302 bytes downloaded out of 6302 bytes.

And it's stuck.

bimalkjha commented 2 years ago

@galczynskiCS It should proceed to download till 7278220 bytes. Looks some issue with your internet is blocking further download. Please retry installing db2connect extension and see if issue persists. I just installed on a fresh new Windows 11 system and db2connect extension installed without any issue with blow output:

NaN% | 7278220 bytes downloaded out of NaN bytes.
Downloading and extraction of node ibm_db Driver completed successfully... 

Successfully renamed the directory.
platform = win32, arch = x64, node.js version = v16.13.2
Downloading DB2 ODBC CLI Driver from https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/ntx64_odbc_cli.zip...
.........

Thanks.

galczynskiCS commented 2 years ago

I believe we can close this one. I did the same on my other machine and it works. Right now I receive error SOCKET CLOSED. Seems like it's an internal company network policy or issue.