cypress: Unzipping Cypress fails on Concourse

Current behavior:

Unzipping Cypress fails on concourse with an error from the unzipping tool used by Cypress, yauzl:

error /tmp/build/ec0e34e0/src/node_modules/cypress: Command failed.                                                                                                                                                                                                                                                                                                                                                                                                                                                
Exit code: 1
Command: node index.js --exec install
Arguments: 
Directory: /tmp/build/ec0e34e0/src/node_modules/cypress
Output:
Installing Cypress (version: 3.1.0)

25l[16:53:03]  Downloading Cypress     [started]
[16:53:03]  Downloading Cypress      0% 0s [title changed]
[16:53:03]  Downloading Cypress      22% 1s [title changed]
[16:53:04]  Downloading Cypress      95% 0s [title changed]
[16:53:04]  Downloaded Cypress      [title changed]
[16:53:04]  Downloaded Cypress      [completed]
[16:53:04]  Unzipping Cypress       [started]
25hevents.js:183
      throw er; // Unhandled 'error' event
      ^

Error: invalid central directory file header signature: 0x1e02014b
    at /tmp/build/ec0e34e0/src/node_modules/yauzl/index.js:249:70
    at /tmp/build/ec0e34e0/src/node_modules/yauzl/index.js:618:5
    at /tmp/build/ec0e34e0/src/node_modules/fd-slicer/index.js:32:7
    at FSReqWrap.wrapper [as oncomplete] (fs.js:658:17)

There also seems to be a previous error when trying to run cypress, not sure if they are related.

Desired behavior:

Downloading and running of Cypress successful on Concourse

Steps to reproduce: (app code and test code)

Install Cypress on Concourse

Versions

Cypress 3.1.5 Yarn 1.9.4 Node 8.12.0

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 8
  • Comments: 35 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Any update on what the timeline for https://github.com/cypress-io/cypress/pull/4193 being merged might be? This is still causing quite a bit of pain for my team!

Released in 3.4.0.

we need to include zip size and checksums for the downloaded zip file for each platform when we build them. The NPM CLI should check these after downloading …

On Fri, Apr 5, 2019 at 10:17 AM Matthías Leó notifications@github.com wrote:

@jennifer-shehane https://github.com/jennifer-shehane yauzl strikes again! This time on cypress 3.2.0 into a gitlab-jenkins pipeline

success Set “workspaces-experimental” to “true”.

Done in 0.04s.

yarn install v1.15.2

[1/4] Resolving packages…

[2/4] Fetching packages…

info fsevents@1.2.7: The platform “linux” is incompatible with this module.

info “fsevents@1.2.7” is an optional dependency and failed compatibility check. Excluding it from installation.

[3/4] Linking dependencies…

[4/4] Building fresh packages…

�[91merror /app/apps/admin/node_modules/cypress: Command failed.

Exit code: 1

Command: node index.js --exec install

Arguments:

Directory: /app/apps/admin/node_modules/cypress

Output:

Installing Cypress (version: 3.2.0)

�[?25l[13:38:14] Downloading Cypress [started]

[13:38:25] Downloading Cypress 99% 0s [title changed]

[13:38:25] Downloaded Cypress [title changed]

[13:38:25] Downloaded Cypress [completed]

[13:38:25] Unzipping Cypress [started]

[13:38:25] Unzipping Cypress 0% 0s [title changed]

read err { Error: unexpected end of file

at Zlib.zlibOnError [as onerror] (zlib.js:162:17) errno: -5, code: 'Z_BUF_ERROR' }

�[?25hevents.js:170

  throw er; // Unhandled 'error' event

  ^

Error: invalid central directory file header signature: 0xcf0000

at /app/apps/admin/node_modules/yauzl/index.js:258:70

at /app/apps/admin/node_modules/yauzl/index.js:631:5

at /app/apps/admin/node_modules/fd-slicer/index.js:32:7

at FSReqCallback.wrapper [as oncomplete] (fs.js:478:5)

Emitted ‘error’ event at:

at emitError (/app/apps/admin/node_modules/yauzl/index.js:232:8)

at emitErrorAndAutoClose (/app/apps/admin/node_modules/yauzl/index.js:227:3)

at /app/apps/admin/node_modules/yauzl/index.js:258:42

at /app/apps/admin/node_modules/yauzl/index.js:631:5

at /app/apps/admin/node_modules/fd-slicer/index.js:32:7

at FSReqCallback.wrapper [as oncomplete] (fs.js:478:5)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cypress-io/cypress/issues/3515#issuecomment-480292156, or mute the thread https://github.com/notifications/unsubscribe-auth/ACHApl714AAfxMwiRjg3A0b3LbLIRaf-ks5vd1r7gaJpZM4a_zg1 .

– Dr. Gleb Bahmutov, PhD

Schedule video chat / phone call / meeting with me via https://calendly.com/bahmutov gleb.bahmutov@gmail.com @bahmutov https://twitter.com/@bahmutov https://glebbahmutov.com/ https://glebbahmutov.com/blog https://github.com/bahmutov

I’m running into the same issue on BuildKite and when trying to install on Debian. Only happening with 3.1.5. Previous version I used (3.1.3) installs without issue. Ran rm -rf node_modules && yarn install and this did not fix the issue for me.

Issue seems to be the same as what ruffle1986 mentions.

Main issue is: The Cypress App could not be unzipped. Error: end of central directory record signature not found

Full output:

yarn install v1.10.1
[1/5] Validating package.json...
[2/5] Resolving packages...
warning Resolution field "extend@3.0.2" is incompatible with requested version "extend@2.*"
[3/5] Fetching packages...
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
[5/5] Building fresh packages...
[-/8] ⢀ waiting...
[-/8] ⠠ waiting...
[3/8] ⠠ cypress
[-/8] ⠠ waiting...
error /home/vagrant/clio/themis/node_modules/cypress: Command failed.
Exit code: 1
Command: node index.js --exec install
Arguments: 
Directory: /home/vagrant/clio/themis/node_modules/cypress
Output:
Installing Cypress (version: 3.1.5)

[19:02:27]  Downloading Cypress     [started]
[19:02:28]  Downloading Cypress      0% 0s [title changed]
[19:02:28]  Downloading Cypress      1% 10s [title changed]
[19:02:28]  Downloading Cypress      1% 20s [title changed]
[19:02:28]  Downloading Cypress      2% 15s [title changed]
[19:02:28]  Downloading Cypress      2% 21s [title changed]
[19:02:28]  Downloading Cypress      3% 17s [title changed]
[19:02:28]  Downloading Cypress      3% 20s [title changed]
[19:02:28]  Downloading Cypress      3% 24s [title changed]
[19:02:28]  Downloading Cypress      3% 27s [title changed]
[19:02:28]  Downloading Cypress      4% 23s [title changed]
[19:02:29]  Downloading Cypress      4% 25s [title changed]
[19:02:29]  Downloading Cypress      5% 22s [title changed]
[19:02:29]  Downloading Cypress      6% 20s [title changed]
[19:02:29]  Downloading Cypress      6% 21s [title changed]
[19:02:29]  Downloading Cypress      6% 23s [title changed]
[19:02:29]  Downloading Cypress      7% 21s [title changed]
[19:02:29]  Downloading Cypress      7% 22s [title changed]
[19:02:29]  Downloading Cypress      8% 21s [title changed]
[19:02:29]  Downloading Cypress      8% 22s [title changed]
[19:02:30]  Downloading Cypress      9% 20s [title changed]
[19:02:30]  Downloading Cypress      9% 21s [title changed]
[19:02:30]  Downloading Cypress      10% 20s [title changed]
[19:02:30]  Downloading Cypress      10% 21s [title changed]
[19:02:30]  Downloading Cypress      11% 19s [title changed]
[19:02:30]  Downloading Cypress      11% 20s [title changed]
[19:02:30]  Downloading Cypress      12% 19s [title changed]
[19:02:30]  Downloading Cypress      12% 20s [title changed]
[19:02:30]  Downloading Cypress      13% 19s [title changed]
[19:02:30]  Downloading Cypress      13% 19s [title changed]
[19:02:31]  Downloading Cypress      14% 18s [title changed]
[19:02:31]  Downloading Cypress      14% 19s [title changed]
[19:02:31]  Downloading Cypress      15% 18s [title changed]
[19:02:31]  Downloading Cypress      15% 19s [title changed]
[19:02:31]  Downloading Cypress      16% 18s [title changed]
[19:02:31]  Downloading Cypress      16% 18s [title changed]
[19:02:31]  Downloading Cypress      17% 18s [title changed]
[19:02:31]  Downloading Cypress      17% 18s [title changed]
[19:02:31]  Downloading Cypress      18% 17s [title changed]
[19:02:31]  Downloading Cypress      18% 18s [title changed]
[19:02:32]  Downloading Cypress      19% 17s [title changed]
[19:02:32]  Downloading Cypress      19% 18s [title changed]
[19:02:32]  Downloading Cypress      20% 17s [title changed]
[19:02:32]  Downloading Cypress      20% 17s [title changed]
[19:02:32]  Downloading Cypress      21% 17s [title changed]
[19:02:32]  Downloading Cypress      21% 17s [title changed]
[19:02:32]  Downloading Cypress      22% 16s [title changed]
[19:02:32]  Downloading Cypress      22% 17s [title changed]
[19:02:32]  Downloading Cypress      22% 17s [title changed]
[19:02:33]  Downloading Cypress      23% 17s [title changed]
[19:02:33]  Downloading Cypress      23% 17s [title changed]
[19:02:33]  Downloading Cypress      24% 16s [title changed]
[19:02:33]  Downloading Cypress      25% 16s [title changed]
[19:02:33]  Downloading Cypress      25% 16s [title changed]
[19:02:33]  Downloading Cypress      25% 16s [title changed]
[19:02:33]  Downloading Cypress      26% 16s [title changed]
[19:02:33]  Downloading Cypress      27% 15s [title changed]
[19:02:33]  Downloading Cypress      27% 16s [title changed]
[19:02:33]  Downloading Cypress      28% 15s [title changed]
[19:02:34]  Downloading Cypress      28% 15s [title changed]
[19:02:34]  Downloading Cypress      28% 16s [title changed]
[19:02:34]  Downloading Cypress      29% 15s [title changed]
[19:02:34]  Downloading Cypress      29% 15s [title changed]
[19:02:34]  Downloading Cypress      30% 15s [title changed]
[19:02:34]  Downloading Cypress      30% 15s [title changed]
[19:02:34]  Downloading Cypress      31% 15s [title changed]
[19:02:34]  Downloading Cypress      31% 15s [title changed]
[19:02:34]  Downloading Cypress      32% 14s [title changed]
[19:02:34]  Downloading Cypress      32% 15s [title changed]
[19:02:35]  Downloading Cypress      33% 14s [title changed]
[19:02:35]  Downloading Cypress      33% 14s [title changed]
[19:02:35]  Downloading Cypress      34% 14s [title changed]
[19:02:35]  Downloading Cypress      34% 14s [title changed]
[19:02:35]  Downloading Cypress      35% 14s [title changed]
[19:02:35]  Downloading Cypress      35% 14s [title changed]
[19:02:35]  Downloading Cypress      36% 14s [title changed]
[19:02:35]  Downloading Cypress      36% 14s [title changed]
[19:02:35]  Downloading Cypress      37% 13s [title changed]
[19:02:35]  Downloading Cypress      38% 13s [title changed]
[19:02:36]  Downloading Cypress      38% 13s [title changed]
[19:02:36]  Downloading Cypress      39% 13s [title changed]
[19:02:36]  Downloading Cypress      39% 13s [title changed]
[19:02:36]  Downloading Cypress      40% 13s [title changed]
[19:02:36]  Downloading Cypress      40% 13s [title changed]
[19:02:36]  Downloading Cypress      41% 12s [title changed]
[19:02:36]  Downloading Cypress      41% 12s [title changed]
[19:02:36]  Downloading Cypress      41% 13s [title changed]
[19:02:36]  Downloading Cypress      42% 12s [title changed]
[19:02:36]  Downloading Cypress      42% 12s [title changed]
[19:02:37]  Downloading Cypress      43% 12s [title changed]
[19:02:37]  Downloading Cypress      43% 12s [title changed]
[19:02:37]  Downloading Cypress      44% 12s [title changed]
[19:02:37]  Downloading Cypress      44% 12s [title changed]
[19:02:37]  Downloading Cypress      44% 12s [title changed]
[19:02:37]  Downloading Cypress      45% 12s [title changed]
[19:02:37]  Downloading Cypress      45% 12s [title changed]
[19:02:37]  Downloading Cypress      46% 11s [title changed]
[19:02:37]  Downloading Cypress      46% 12s [title changed]
[19:02:38]  Downloading Cypress      47% 11s [title changed]
[19:02:38]  Downloading Cypress      47% 11s [title changed]
[19:02:38]  Downloading Cypress      48% 11s [title changed]
[19:02:38]  Downloading Cypress      48% 11s [title changed]
[19:02:38]  Downloading Cypress      49% 11s [title changed]
[19:02:38]  Downloading Cypress      49% 11s [title changed]
[19:02:38]  Downloading Cypress      50% 11s [title changed]
[19:02:38]  Downloading Cypress      50% 11s [title changed]
[19:02:38]  Downloading Cypress      51% 10s [title changed]
[19:02:38]  Downloading Cypress      51% 10s [title changed]
[19:02:39]  Downloading Cypress      51% 11s [title changed]
[19:02:39]  Downloading Cypress      52% 10s [title changed]
[19:02:39]  Downloading Cypress      52% 10s [title changed]
[19:02:39]  Downloading Cypress      53% 10s [title changed]
[19:02:39]  Downloading Cypress      53% 10s [title changed]
[19:02:39]  Downloading Cypress      54% 10s [title changed]
[19:02:39]  Downloading Cypress      54% 10s [title changed]
[19:02:39]  Downloading Cypress      55% 10s [title changed]
[19:02:39]  Downloading Cypress      55% 10s [title changed]
[19:02:39]  Downloading Cypress      56% 9s [title changed]
[19:02:40]  Downloading Cypress      56% 9s [title changed]
[19:02:40]  Downloading Cypress      56% 10s [title changed]
[19:02:40]  Downloading Cypress      57% 9s [title changed]
[19:02:40]  Downloading Cypress      57% 10s [title changed]
[19:02:40]  Downloading Cypress      57% 10s [title changed]
[19:02:41]  Downloading Cypress      57% 10s [title changed]
[19:02:41]  Downloading Cypress      58% 10s [title changed]
[19:02:41]  Downloading Cypress      58% 10s [title changed]
[19:02:41]  Downloading Cypress      58% 10s [title changed]
[19:02:41]  Downloading Cypress      58% 10s [title changed]
[19:02:42]  Downloading Cypress      58% 10s [title changed]
[19:02:42]  Downloading Cypress      58% 10s [title changed]
[19:02:42]  Downloading Cypress      59% 10s [title changed]
[19:02:42]  Downloading Cypress      59% 10s [title changed]
[19:02:42]  Downloading Cypress      59% 10s [title changed]
[19:02:42]  Downloading Cypress      59% 10s [title changed]
[19:02:43]  Downloading Cypress      59% 10s [title changed]
[19:02:43]  Downloading Cypress      59% 11s [title changed]
[19:02:43]  Downloading Cypress      59% 11s [title changed]
[19:02:43]  Downloading Cypress      60% 10s [title changed]
[19:02:43]  Downloading Cypress      60% 10s [title changed]
[19:02:43]  Downloading Cypress      60% 11s [title changed]
[19:02:44]  Downloading Cypress      60% 11s [title changed]
[19:02:44]  Downloading Cypress      61% 10s [title changed]
[19:02:44]  Downloading Cypress      61% 10s [title changed]
[19:02:44]  Downloading Cypress      62% 10s [title changed]
[19:02:44]  Downloading Cypress      62% 10s [title changed]
[19:02:44]  Downloading Cypress      63% 10s [title changed]
[19:02:44]  Downloading Cypress      63% 10s [title changed]
[19:02:44]  Downloading Cypress      64% 9s [title changed]
[19:02:44]  Downloading Cypress      64% 9s [title changed]
[19:02:44]  Downloading Cypress      65% 9s [title changed]
[19:02:45]  Downloading Cypress      65% 9s [title changed]
[19:02:45]  Downloading Cypress      65% 9s [title changed]
[19:02:45]  Downloading Cypress      66% 9s [title changed]
[19:02:45]  Downloading Cypress      66% 9s [title changed]
[19:02:45]  Downloading Cypress      67% 9s [title changed]
[19:02:45]  Downloading Cypress      67% 9s [title changed]
[19:02:45]  Downloading Cypress      68% 8s [title changed]
[19:02:45]  Downloading Cypress      68% 8s [title changed]
[19:02:45]  Downloading Cypress      69% 8s [title changed]
[19:02:45]  Downloading Cypress      69% 8s [title changed]
[19:02:46]  Downloading Cypress      70% 8s [title changed]
[19:02:46]  Downloading Cypress      70% 8s [title changed]
[19:02:46]  Downloading Cypress      71% 7s [title changed]
[19:02:46]  Downloading Cypress      71% 7s [title changed]
[19:02:46]  Downloading Cypress      72% 7s [title changed]
[19:02:46]  Downloading Cypress      72% 7s [title changed]
[19:02:46]  Downloading Cypress      73% 7s [title changed]
[19:02:46]  Downloading Cypress      73% 7s [title changed]
[19:02:46]  Downloading Cypress      73% 7s [title changed]
[19:02:46]  Downloading Cypress      74% 7s [title changed]
[19:02:47]  Downloading Cypress      74% 7s [title changed]
[19:02:47]  Downloading Cypress      75% 6s [title changed]
[19:02:47]  Downloading Cypress      75% 6s [title changed]
[19:02:47]  Downloading Cypress      76% 6s [title changed]
[19:02:47]  Downloading Cypress      76% 6s [title changed]
[19:02:47]  Downloading Cypress      76% 6s [title changed]
[19:02:47]  Downloading Cypress      77% 6s [title changed]
[19:02:47]  Downloading Cypress      77% 6s [title changed]
[19:02:47]  Downloading Cypress      78% 6s [title changed]
[19:02:48]  Downloading Cypress      78% 6s [title changed]
[19:02:48]  Downloading Cypress      79% 5s [title changed]
[19:02:48]  Downloading Cypress      79% 5s [title changed]
[19:02:48]  Downloading Cypress      80% 5s [title changed]
[19:02:48]  Downloading Cypress      80% 5s [title changed]
[19:02:48]  Downloading Cypress      81% 5s [title changed]
[19:02:48]  Downloading Cypress      81% 5s [title changed]
[19:02:48]  Downloading Cypress      81% 5s [title changed]
[19:02:48]  Downloading Cypress      82% 5s [title changed]
[19:02:48]  Downloading Cypress      82% 5s [title changed]
[19:02:49]  Downloading Cypress      83% 4s [title changed]
[19:02:49]  Downloading Cypress      83% 4s [title changed]
[19:02:49]  Downloading Cypress      84% 4s [title changed]
[19:02:49]  Downloading Cypress      84% 4s [title changed]
[19:02:49]  Downloading Cypress      84% 4s [title changed]
[19:02:49]  Downloading Cypress      85% 4s [title changed]
[19:02:49]  Downloading Cypress      85% 4s [title changed]
[19:02:49]  Downloading Cypress      86% 4s [title changed]
[19:02:49]  Downloading Cypress      86% 4s [title changed]
[19:02:49]  Downloading Cypress      87% 3s [title changed]
[19:02:50]  Downloading Cypress      87% 3s [title changed]
[19:02:50]  Downloading Cypress      88% 3s [title changed]
[19:02:50]  Downloading Cypress      88% 3s [title changed]
[19:02:50]  Downloading Cypress      89% 3s [title changed]
[19:02:50]  Downloading Cypress      89% 3s [title changed]
[19:02:50]  Downloading Cypress      89% 3s [title changed]
[19:02:50]  Downloading Cypress      90% 3s [title changed]
[19:02:50]  Downloading Cypress      90% 3s [title changed]
[19:02:50]  Downloading Cypress      91% 2s [title changed]
[19:02:51]  Downloading Cypress      91% 2s [title changed]
[19:02:51]  Downloading Cypress      92% 2s [title changed]
[19:02:51]  Downloading Cypress      92% 2s [title changed]
[19:02:51]  Downloading Cypress      92% 2s [title changed]
[19:02:51]  Downloading Cypress      93% 2s [title changed]
[19:02:51]  Downloading Cypress      93% 2s [title changed]
[19:02:51]  Downloading Cypress      94% 2s [title changed]
[19:02:51]  Downloading Cypress      94% 2s [title changed]
[19:02:51]  Downloading Cypress      95% 1s [title changed]
[19:02:51]  Downloading Cypress      96% 1s [title changed]
[19:02:52]  Downloading Cypress      96% 1s [title changed]
[19:02:52]  Downloading Cypress      96% 1s [title changed]
[19:02:52]  Downloading Cypress      97% 1s [title changed]
[19:02:52]  Downloading Cypress      97% 1s [title changed]
[19:02:52]  Downloading Cypress      98% 0s [title changed]
[19:02:52]  Downloading Cypress      98% 1s [title changed]
[19:02:52]  Downloading Cypress      98% 1s [title changed]
[19:02:52]  Downloading Cypress      99% 0s [title changed]
[19:02:52]  Downloading Cypress      99% 0s [title changed]
[19:02:53]  Downloading Cypress      100% 0s [title changed]
[19:02:53]  Downloaded Cypress      [title changed]
[19:02:53]  Downloaded Cypress      [completed]
[19:02:53]  Unzipping Cypress       [started]
[19:02:53]  Unzipping Cypress       [failed]
[19:02:53] → The Cypress App could not be unzipped.

Search for an existing issue or open a GitHub issue at

https://github.com/cypress-io/cypress/issues
----------

Error: end of central directory record signature not found
----------

Platform: linux (Debian - 9.5)
Cypress Version: 3.1.5
The Cypress App could not be unzipped.

Search for an existing issue or open a GitHub issue at

https://github.com/cypress-io/cypress/issues
----------

Seems to be an issue with version 3.1.5 (for me), I downgraded to 3.1.0 and it worked.

I’m experiencing the same on Travis. This issue is kind of duplication of mine: #3439

Now I see that the title of my issue is not appropriate. The memory leak message is just a warning. The problem is that when the yauzl module does the unizpping, it fails.

We may also want to look into implementing better error handling instead of crashing for yauzl as described here: https://github.com/thejoshwolfe/yauzl#how-to-avoid-crashing

@aryzing rerunning yarn install will recreate yarn.lock, but I get it. Sometimes these things don’t end up pulling the same package versions that once worked.