npm doesn't seem to use snap proxy

Bug #1588870 reported by Colin Watson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
launchpad-buildd
Fix Released
High
Colin Watson

Bug Description

https://launchpadlibrarian.net/263326242/buildlog_snap_ubuntu_xenial_i386_vaca_BUILDING.txt.gz suggests that npm isn't honouring the configured https_proxy, although https://docs.npmjs.com/misc/config#https-proxy says that it should. Exact cause unknown.

Tags: lp-snappy

Related branches

Colin Watson (cjwatson)
tags: added: lp-snappy
Changed in launchpad-buildd:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Scott Moser (smoser) wrote :

I belive that this is addressed by
 https://github.com/snapcore/snapcraft/pull/762

My current theory is that proxy from environment is properly respected but just that node plugin is doing its download in the build phase. the pull request there changes it to do it during the pull phase (and then utilize cache in build).

Revision history for this message
Colin Watson (cjwatson) wrote :
Revision history for this message
Colin Watson (cjwatson) wrote :

npm ERR! network tunneling socket could not be established, cause=write EPROTO 139638736619328:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794:

looks suspicious here. Where's "unknown protocol" coming from?

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Maybe this is indeed needed https://github.com/snapcore/snapcraft/pull/738
Or a launchpad workaround.

Revision history for this message
Aaron Ogle (geekgonecrazy) wrote :

So i'm seeing a couple of articles from about a year ago still acting like npm_config_https_proxy / npm_config_proxy are still needed for npm.

Example of one I found:
http://intenseagile.com/npm-behind-proxy

Here's an issue on the npm repo:
https://github.com/npm/npm/issues/2866

looks like they still haven't fully figured things out them selves? A couple comments on that ticket indicate a work around is the same as presented in the PR.

Not ideal fix probably.. But looks to be necessary?

Revision history for this message
Colin Watson (cjwatson) wrote :

I think it's sufficient to fix our https_proxy setting to be http:// rather than https://.

Changed in launchpad-buildd:
assignee: nobody → Colin Watson (cjwatson)
status: Triaged → In Progress
Colin Watson (cjwatson)
Changed in launchpad-buildd:
status: In Progress → Fix Committed
Colin Watson (cjwatson)
Changed in launchpad-buildd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.