Installation Issue Corporate Proxy

Hi all

I am unable to install Juno behind a corporate proxy. I tracked down the issue to be related to the node package node-pty-prebuilt-multiarch.
It would be important to ease installation at my workplace, as otherwise my colleagues will not be willing to let me use Julia (probably :slight_smile: ). Since they would have a hard time reproducing results if they are not even able to install the ‘standard’ IDE.

The installation fails as it can be seen below.

apm install --verbose julia-client
....
removed sensitive information 
....
> node-pty-prebuilt-multiarch@0.9.0 install C:\Users\xxx\AppData\Local\Temp\apm-install-dir-119113-20428-xk27y7.vw5s\node_modules\julia-client\node_modules\node-pty-prebuilt-multiarch
> prebuild-install || node scripts/install.js

prebuild-install WARN install tunneling socket could not be established, statusCode=407

if i try to run the npm install for this package directly one can see that it is related to the proxy, which gets detected correctly but does not work. (i removed some information and replaced it with xxx)

npm install --verbose node-pty-prebuilt-multiarch@0.9.0

> node-pty-prebuilt-multiarch@0.9.0 install C:\Users\xxx\Downloads\Atom\atom\resources\app\apm\node_modules\node-pty-prebuilt-multiarch
> prebuild-install || node scripts/install.js

prebuild-install info begin Prebuild-install version 5.3.0
prebuild-install info looking for cached prebuild @ C:\Users\xxx\AppData\Roaming\npm-cache\_prebuilds\2ad4a0-node-pty-prebuilt-multiarch-v0.9.0-node-v64-win32-x64.tar.gz
prebuild-install http request GET https://github.com/oznu/node-pty-prebuilt-multiarch/releases/download/v0.9.0/node-pty-prebuilt-multiarch-v0.9.0-node-v64-win32-x64.tar.gz
prebuild-install http request Proxy setup detected (Host: xxx, Port: xxx, Authentication: No) Tunneling with httpsOverHttp
prebuild-install WARN install tunneling socket could not be established, statusCode=407

My guess is that the credentials for authentication are not correctly handled, but unfortunately I do not know enough about proxies to find out the issue and how to resolve it.

Does anybody have an idea on how to solve this Issue?

> apm install --version
apm  2.4.3
npm  6.2.0
node 10.2.1 x64
atom 1.41.0
python 3.6.8
git 2.23.0.windows.1
visual studio

System (sorry its german):

Betriebsystemname Microsoft Windows 10 Enterprise
Version 10.0.17763 Build 17763
Weitere Betriebsystembeschreibung Nicht verfügbar
Betriebsystemhersteller Microsoft Corporation
Systemhersteller Dell Inc.
Systemmodell Latitude 7490
Systemtyp x64-basierter PC
System-SKU 081C
Prozessor Intel(R) Core™ i7-8650U CPU @ 1.90GHz, 2112 MHz, 4 Kern(e), 8 logische(r) Prozessor(en)
BIOS-Version/-Datum Dell Inc. 1.11.0, 7/4/2019

Thanks in advance
Philipp

The short term fix is to download this file and copy it to C:\Users\xxx\AppData\Roaming\npm-cache\_prebuilds\2ad4a0-node-pty-prebuilt-multiarch-v0.9.0-node-v64-win32-x64.tar.gz.
prebuild-install should use that cache instead of pulling the file from GitHub directly.

You could also try something like this, but I’m not sure if that will actually help.

2 Likes

Thanks for your answer!

I already fixed it like this for me, but the problem will still occur at everybody’s pc.

I already played around with many ways off setting the proxy, but in this case the proxy is detected correctly, as seen in

prebuild-install http request Proxy setup detected (Host: xxx, Port: xxx, Authentication: No) Tunneling with httpsOverHttp

I removed the proxy host and port, but these are indeed correct, as far as i can tell the prebuild proxy authentication does not work although host and port are correct.

edit: more information on Proxy authentication

407 Proxy Authentication Required

Normally the authentication is done automatically based on windows credentials or?

edit2: Information on DefaultCredentials
I managed to make binarybuilder work by passing default credentials (through powershell based client)
See Cannot add certain packages (proxy error)
There I also got 407 before i added the credentials.

Hm, this could be a bug in tunnel-agent (the library prebuild-install is using to handle proxies) – if that’s indeed the case then we should probably convince them to use node-tunnel instead, which is actually maintained.

It’s also possible that there’s a mistake in your proxy settings – are you sure that your company is running an unauthenticated proxy over http?

1 Like

I think this might be a good idea.

Well as I wrote before, I do not know much about the proxy stuff, but I think it uses authentication.
Until now i never had to explicitly provide the proxy credentials since the other tools like git or apm retrieve the authentication credentials from the default credential storage of windows.

I think that tunnel-agent might not do this as it just detects the proxy address.