Sporadic ECONNRESETs during npm install grunt-contrib-imagemin - connectivity issues to github?

Anthony Seddon's Avatar

Anthony Seddon

07 Apr, 2015 03:25 PM

Is there an issue connecting to GitHub from the AV build machines?

We're getting sporadic ECONNRESET errors when running npm install grunt-contrib-imagemin. I've setup a reproducable example yml file as follows using pngquant-bin, a dependency of grunt-contrib-imagemin:

version: 1.0.{build}
install:
- ps: Install-Product node 0
build_script:
- node --version
- npm --version
- npm install grunt pngquant-bin

The vast majority of the time, we get ECONNRESETs when the installer downloads binaries from github (see the line with ‼ read ECONNRESET:

Build started
git clone -q --branch=master https://bitbucket.org/livsmarter/av-build-problem.git C:\projects\av-build-problem
git checkout -qf f1efe686b3d060a7a624b0b2196b21b5d97bd9f3
Running Install scripts
Install-Product node 0
Uninstalling node 0.10.38 (x86)... 
Installing node 0.12.2 (x86)... 
node --version
v0.12.2
npm --version
2.7.4
npm install grunt pngquant-bin


> pngquant-bin@2.0.3 postinstall C:\projects\av-build-problem\node_modules\pngquant-bin > node lib/install.js


‼ read ECONNRESET ‼ pngquant pre-build test failed i compiling from source × Error: pngquant failed to build, make sure that libpng-dev is installed at ChildProcess.exithandler (child_process.js:751:12) at ChildProcess.emit (events.js:110:17) at maybeClose (child_process.js:1015:16) at Process.ChildProcess._handle.onexit (child_process.js:1087:5) grunt@0.4.5 node_modules\grunt ├── dateformat@1.0.2-1.2.3 ├── which@1.0.9 ├── eventemitter2@0.4.14 ├── getobject@0.1.0 ├── colors@0.6.2 ├── rimraf@2.2.8 ├── async@0.1.22 ├── grunt-legacy-util@0.2.0 ├── hooker@0.2.3 ├── exit@0.1.2 ├── nopt@1.0.10 (abbrev@1.0.5) ├── minimatch@0.2.14 (sigmund@1.0.0, lru-cache@2.5.0) ├── glob@3.1.21 (inherits@1.0.0, graceful-fs@1.2.3) ├── lodash@0.9.2 ├── coffee-script@1.3.3 ├── underscore.string@2.2.1 ├── iconv-lite@0.2.11 ├── findup-sync@0.1.3 (glob@3.2.11, lodash@2.4.1) ├── grunt-legacy-log@0.1.1 (underscore.string@2.3.3, lodash@2.4.1) └── js-yaml@2.0.5 (argparse@0.1.16, esprima@1.0.4)


pngquant-bin@2.0.3 node_modules\pngquant-bin ├── logalot@2.1.0 (figures@1.3.5, squeak@1.2.0) ├── bin-build@2.1.1 (exec-series@1.0.1, url-regex@2.1.2, tempfile@1.1.0, archive-type@2.0.0, rimraf@2.3.2, decompress@2.2.1, download@3.3.0) └── bin-wrapper@2.1.3 (os-filter-obj@1.0.3, is-path-global@1.0.1, download-status@2.1.1, npm-installed@1.0.0, bin-check@1.0.0, bin-version-check@2.1.0, globby@1.2.0, lnfs@1.0.0, download@3.3.0) dir node_modules\pngquant-bin\vendor Volume in drive C has no label. Volume Serial Number is F074-BCDF


Directory of C:\projects\av-build-problem\node_modules\pngquant-bin


File Not Found Command exited with code 1
During the postinstall script, npm tries to download a file from github, specifically https://raw.githubusercontent.com/imagemin/pngquant-bin/v2.0.3/vend... and it looks like this is where the ECONNRESET happens. Checking the contents of C:\projects\av-build-problem\node_modules\pngquant-bin\vendor verifies this.

Interestingly (or frustratingly), it works some of the time:

Build started
git clone -q --branch=master https://bitbucket.org/livsmarter/av-build-problem.git C:\projects\av-build-problem
git checkout -qf f1efe686b3d0
Running Install scripts
Install-Product node 0
Uninstalling node 0.10.38 (x86)... 
Installing node 0.12.2 (x86)... 
node --version
v0.12.2
npm --version
2.7.4
npm install grunt pngquant-bin


> pngquant-bin@2.0.3 postinstall C:\projects\av-build-problem\node_modules\pngquant-bin > node lib/install.js


√ pngquant pre-build test passed successfully grunt@0.4.5 node_modules\grunt ├── dateformat@1.0.2-1.2.3 ├── which@1.0.9 ├── getobject@0.1.0 ├── eventemitter2@0.4.14 ├── colors@0.6.2 ├── rimraf@2.2.8 ├── async@0.1.22 ├── grunt-legacy-util@0.2.0 ├── hooker@0.2.3 ├── exit@0.1.2 ├── nopt@1.0.10 (abbrev@1.0.5) ├── minimatch@0.2.14 (sigmund@1.0.0, lru-cache@2.5.0) ├── glob@3.1.21 (inherits@1.0.0, graceful-fs@1.2.3) ├── lodash@0.9.2 ├── coffee-script@1.3.3 ├── underscore.string@2.2.1 ├── iconv-lite@0.2.11 ├── grunt-legacy-log@0.1.1 (underscore.string@2.3.3, lodash@2.4.1) ├── findup-sync@0.1.3 (glob@3.2.11, lodash@2.4.1) └── js-yaml@2.0.5 (argparse@0.1.16, esprima@1.0.4)


pngquant-bin@2.0.3 node_modules\pngquant-bin ├── logalot@2.1.0 (figures@1.3.5, squeak@1.2.0) ├── bin-build@2.1.1 (exec-series@1.0.1, url-regex@2.1.2, tempfile@1.1.0, archive-type@2.0.0, rimraf@2.3.2, decompress@2.2.1, download@3.3.0) └── bin-wrapper@2.1.3 (os-filter-obj@1.0.3, is-path-global@1.0.1, download-status@2.1.1, npm-installed@1.0.0, bin-check@1.0.0, bin-version-check@2.1.0, globby@1.2.0, lnfs@1.0.0, download@3.3.0) dir node_modules\pngquant-bin\vendor Volume in drive C has no label. Volume Serial Number is F074-BCDF


Directory of C:\projects\av-build-problem\node_modules\pngquant-bin\vendor


04/07/2015 02:58 PM <DIR> . 04/07/2015 02:58 PM <DIR> .. 04/07/2015 02:58 PM 544,355 pngquant.exe 1 File(s) 544,355 bytes 2 Dir(s) 56,997,486,592 bytes free Discovering tests...OK Build success

I've been able to reproduce the issue with optipng-bin, gifsicle, jpegtran-bin and grunt-contrib-imagemin which is what we use on our main build and is causing us constant build failures since it has dependencies on the other 4 packages I've mentioned.

Showing page 2 out of 2. View the first page

  1. 31 Posted by giacomo.tag on 12 Apr, 2015 10:59 PM

    giacomo.tag's Avatar

    Great news!

    Awesome support from appveyor, yeah :)

  2. 32 Posted by bniemyjski on 13 Apr, 2015 07:18 PM

    bniemyjski's Avatar

    I'm also seeing this issue with our repos: https://ci.appveyor.com/project/Exceptionless/exceptionless-ui

  3. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:55 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac