-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mass concurrent fetches to npmjs.org registry may cause truncated fetches #627
Comments
@kittens - Shouldn't yarn's retry logic handle this case? |
FWIW we just run into same case:
|
I've also run into this issue this morning. After this error occurs a JSON error occurs on subsequent retries when I have no run After a few |
@Daniel15 IIUC, the problem with this case is that, from the http api point of view, it looks like a success; the data is just suddenly truncated. The received data should be shorter than the |
Yarn could treat that as a failure case though. If the tarball doesn't extract properly, or the hash doesn't match, or the Content-Length doesn't match the actual file length, then consider it a failure and retry. |
Experinecing the same problem as @petetnt. Yarn fails with the "invalid tar file" message while fetching arbitray dependencies... After multiple re-runs of yarn install, the process finishes successfully. |
Hm, seems like this could be related to #1619 |
This is particularly frustrating in CI systems. Random & unpredictable failures, having to manually kick CI all the time really screwing up our workflow. Is the yarn team actively looking into this? |
Afaik we fixed it, the reason was in the same tar file being downloaded and unpacked twice, unpacking would crash occasionally. |
This is an issue with the npmjs.org registry itself, but this is probably something yarn will have to deal with internally (retries for this specific failure mode?).
This also affects
pnpm
andied
, other alternative npm frontends that try to do parallel fetches. Merely re-runningyarn
will resume the bad fetch and either complete the install, or fail when doing another fetch. Humans can do this, but shell scripts may have a hard time deciding what to do :)Running
yarn
on a big repository with a bit over 1k (flattened) dependencies:The error is not itself related with the
bower-logger
package; it just happened to be the packagenpmjs.org
didn't feel like sending properly in the HTTP response.Either that or the office's router is temperamental, but only with npmjs.org accesses 😕
The text was updated successfully, but these errors were encountered: