npm install network errors with build.snapcraft.io proxy configuration

Bug #1886861 reported by Ben Francis
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Snapcraft
Confirmed
High
Chris Patterson
launchpad-buildd
New
Undecided
Unassigned

Bug Description

Note: I originally discovered this issue last year and it got fixed upstream with electron-packager (https://forum.snapcraft.io/t/getaddrinfo-enotfound-github-com-builds-failing-on-snapcraft-io-due-to-network-problems/14164/6) but the problem seems to have returned.

My snapcraft.yaml (https://github.com/krellian/kiosk/blob/master/snap/snapcraft.yaml) runs `npm install` in override-build, which includes installing the electron-packager npm package. That installation process tries to fetch resources from github.com:443 and fails due to the network proxy configuration being used on build.snapcraft.io

        RequestError: getaddrinfo ENOTFOUND github.com github.com:443

Full build log here: https://build.snapcraft.io/user/krellian/kiosk/1034152

I was able to work around this issue by adding the following to my snapcraft.yaml but it would be great if this could be fixed. I suspect it's probably an upstream bug again, but perhaps there's something that could be changed about the build server configuration to reduce these types of errors?

        if [ -n "$http_proxy" ]; then
          export ELECTRON_GET_USE_PROXY=1
          export GLOBAL_AGENT_HTTP_PROXY="${http_proxy}"
          export GLOBAL_AGENT_HTTPS_PROXY="${http_proxy}"
        fi

Revision history for this message
Oliver Grawert (ogra) wrote :

adding launchpad, perhaps these vars could just be added to the build env by default.

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

Wouldn't it be a lot more sensible to do this sort of bridging with individual build systems in snapcraft? It's kind of a large part of its job, and I don't think it really makes sense to do it in LP since they aren't at all generic.

affects: launchpad → launchpad-buildd
Revision history for this message
Sergio Schvezov (sergiusens) wrote : Re: [Bug 1886861] Re: npm install network errors with build.snapcraft.io proxy configuration

Colin Watson <email address hidden> writes:

> Wouldn't it be a lot more sensible to do this sort of bridging
> with
> individual build systems in snapcraft? It's kind of a large
> part of its
> job, and I don't think it really makes sense to do it in LP
> since they
> aren't at all generic.

Indeed, this is just the very very very specific rules we have to
support maven.

Changed in snapcraft:
assignee: nobody → Chris Patterson (cjp256)
importance: Undecided → High
status: New → Confirmed
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.