Node-oracledb: Install fails with 403 behind proxy

Created on 20 Feb 2018  路  6Comments  路  Source: oracle/node-oracledb

npm install fails while downloading binary behind corporate proxy with the following error:

Error: HTTP proxy request for github.com/oracle/node-oracledb/releases/download/v2.1.1/oracledb-v2.1.1-node-v57-linux-x64.gz failed with code 403

Error occurs when running npm install from docker behind corporate proxy. NPM install tries to download binary from github but the request is rejected by our proxy.

I reproduced the problem by running the node package/oracledbinstall.js directly. I'm getting the same 403 error.

The problem is due to an invalid host header in the request: https://github.com/oracle/node-oracledb/blob/master/package/oracledbinstall.js#L203

I added a colon between hostname and port:

        'host': hostname +':' +  PORT,

This fixed the problem.

bug

All 6 comments

Nice! Thanks for reporting this. We'll get this corrected.

When can we expect a fix published to NPM? This is just to know whether I should revert my dependencies to 1.x or wait for the fix.

@bjouhier I just pushed 2.1.2 with the fix. Thanks for the patch.

Thanks @cjbj. This is speed!

Getting nasty error when executing "npm install oracledb -s".
I have set the npm config with "proxy" and "https-proxy" and able to download other packages with no issues. How ever with oracledb, the situation is ugly.

**### ---------------------------------------------------------------------------------------------------------
oracledb ERR! NJS-054: Binary build/Release/oracledb.node was not installed.
oracledb ERR! Failed to install binary package oracledb-v2.3.0-node-v57-win32-x64.gz
oracledb ERR! unable to get local issuer certificate
oracledb ERR! For help see https://oracle.github.io/node-oracledb/INSTALL.html#troubleshooting


The github URL shed no light.

Note the install instructions show how to set the proxy via environment variables and say:

The node-oracledb binary installer cannot use the npm config set https-proxy value.

This is because npm is not doing the download of the binary.

There is a workaround due to land in https://github.com/oracle/node-oracledb/pull/919

Was this page helpful?
0 / 5 - 0 ratings

Related issues

satodu picture satodu  路  3Comments

cheslyn picture cheslyn  路  3Comments

ChrisHAdams picture ChrisHAdams  路  3Comments

chsnt picture chsnt  路  3Comments

rstor1 picture rstor1  路  4Comments