cypress: Docs site and binary install from yarn can be very slow from Korea

  • Operating System: OSX
  • Cypress Version: Any

Current behavior:

Sometimes cypress can take up to 30 minutes to download

How to reproduce:

Use a blazing fast internet connection in Korea

Additional Info (images, stack traces, etc)

Docs site after a few minutes (still no fonts)

screen shot 2018-01-12 at 2 35 49 pm

Download

[21:47:48]  Downloading Cypress      21% 4487s [title changed]\n[21:47:48]  Downloading Cypress      21% 4489s [title changed]\n[21:47:49]  Downloading Cypress      21% 4491s [title changed]\n[21:47:50]  Downloading Cypress      21% 4495s [title changed]\n[21:47:51]  Downloading Cypress      21% 4498s [title changed]\n[21:47:51]  Downloading Cypress      21% 4500s [title changed]\n[21:47:51]  Downloaded Cypress      [title changed]\n[21:47:51]  Downloaded Cypress      [completed]\n[21:47:51]  Unzipping Cypress       [started]\n[21:47:51]  Unzipping Cypress       [failed]\n[21:47:51] → The Cypress App could not be unzipped.\n\nSearch for an existing issue or open a GitHub issue at\n\nhttps://github.com/cypress-io/cypress/issues\n----------\n\nError: end of central directory record signature not found\n----------\n\nPlatform: darwin (15.6.0)\nCypress Version: 1.4.1\nThe Cypress App could not be unzipped

The cypress docs site takes minutes to load docs sometimes. This isn’t 100% consistent, but it seems to be becoming a more frequent issue. While I can generally use some of the docs during the loading, if I have to re-yarn sometimes it stops me in my tracks as a download can take 30 minutes and fail to unzip. I can’t say that this is always the case, but it is frequent and it is, as far as I can tell, unique to the cypress.io server, as I can’t think of another site I experience this with. I’ve also had this experience at home as well as various coffee shop wifi.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 19 (10 by maintainers)

Commits related to this issue

Most upvoted comments

seems to be fixed… maybe cloudflare fixed it?

The npm local cache directory is normally ~/.npm/.

node_modules is not a cache directory, it’s your installed packages for the current project. While some CI systems will keep it around, it more than likely removed for a few reasons

  1. the node_modules directory is inside your project directory, so a git clean blows it away
  2. If the CI is parallelising builds between machines / directories, you’ll often get a clean tree, or a version of node_modules which is out of date or broken
  3. historically npm has been really bad at keeping node_modules consistent. The first thing you do when you run into npm issues is just delete the node_modules directory and npm install again.

So this gets painful with cypress even locally when you have multiple projects using it, flaky npm, and slow download speeds.

I’m guessing you’re using the free tier of Cloudflare? I’ve seen some pretty poor performance on the free tier from some countries (particularly Australia 😢 )

If cypress can cache the binary via ~/.npm, that would be 💯 💯 💯

cache folder /foo and store downloaded cypress.zip there

This still assumes manual step of downloading cypress.zip and putting it somewhere

It wouldn’t be that easy in fact. Because we’d have to download multiple versions of Cypress and when installing we’d need to copy the good one from the cache.

Can’t promise anything I have a lot to do these days but I’ll try to find some time and dig into the code to see if I can come up with a PR.

Ideally the downloaded binaries would be cached on the local filesystem as per https://github.com/cypress-io/cypress/issues/1233

Also very slow from Australia