-
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
Extracting the tar content of undefined failed #6312
Comments
Same issue, it's blocking my CI too, we updated recently to yarn 1.9.2 |
@opiation The error is indeed random but I may have found the cause: do you have distant git URLs in your package.json without |
Also, maybe related: #5536 |
@adrienharnay, can you define what you mean by distant? For the record, here's the |
Distant wasn't the right word, I just meant packages installed from Git 🙂 Could you try this?
|
As per my previous comment, I still encounter the issue without |
Indeed, I read too quickly. Well, that fixed our bug, but I have no idea about yours 😕 Sorry |
@opiation Did you update you yarn.lock file too? Cause I had to do that |
@Titozzz, I encounter this error with and without the |
I get this too and I dont have any packages from git. |
I wanted to get around this issue (#6256) by using the tarball versions of the packages but indeed the error above is thrown for tarball urls on self-hosted Github enterprise. github.com hosted tarballs somehow did work. e.g. |
I'm seeing the same issue with a project we have. However when I remove the deps that run a |
@Khendry I got the issue again, and you are right, it comes from git dependencies which have a |
I've been tracking this down with a project we have and so far narrowed it down to the concurrent install the git-fetcher starts here. If the package that is being installed by the git-fetcher has any of the same dependencies of the currently installing package a race condition is created where the duplicated packages will be untarred to offline cache at the same time. I haven't seen enough of the code base to understand where/what the correct fix is, but that's the start of the issue. |
yarn has a bug where it treats github: deps differently from git:// deps (<yarnpkg/yarn#6131>), but it also a separate bug where it just dies if a git:// depenency uses prepare and also depends on the same package as the original package (<yarnpkg/yarn#6312>). Maybe we should just switch to npm...
yarn has a bug where it treats github: deps differently from git:// deps (<yarnpkg/yarn#6131>), but it also a separate bug where it just dies if a git:// depenency uses prepare and also depends on the same package as the original package (<yarnpkg/yarn#6312>). Work around by cloning the ThingTalk repository separately and using yarn link. Maybe we should just switch to npm...
Any news on this? We're facing this issue too. |
Same problem. It's impossible to use yarn with CI. Every 2nd build failed with this error 😞 |
try delete node_modules,
|
Thanks for sharing this. It's at least a workaround 🤗 , but no real solution if you want your build time reasonable fast 😅 |
We did try using the |
For me |
I spoke too soon. I had asked my team mate if we'd tried this, rather than actually trying myself and he was very confident that we had...he was mistaken and miss-read the previous post thinking it was related to the mutex flag, not network concurrency. We've since re-tried and can confirm this does seem to also address the issue for us. |
setting right now, the only workaround I've come across involves completely regenning 2.054 Performing "GET" request to "https://<private-artifactory-npm-registry>/@myorg/eslint-plugin-import/-/@myorg/eslint-plugin-import-3.0.0.tgz".
verbose 2.519 Error: https://<private-artifactory-npm-registry>/@myorg/eslint-plugin-import/-/@myorg/eslint-plugin-import-3.0.0.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "Unexpected end of data"
at MessageError.ExtendableBuiltin (/Users/me/.nvm/versions/node/v8.12.0/lib/node_modules/yarn/lib/cli.js:237:66)
at new MessageError (/Users/me/.nvm/versions/node/v8.12.0/lib/node_modules/yarn/lib/cli.js:266:123)
at Extract.<anonymous> (/Users/me/.nvm/versions/node/v8.12.0/lib/node_modules/yarn/lib/cli.js:59446:14)
at emitOne (events.js:121:20)
at Extract.emit (events.js:211:7)
at Extract.module.exports.Extract.destroy (/Users/me/.nvm/versions/node/v8.12.0/lib/node_modules/yarn/lib/cli.js:135306:17)
at Extract.module.exports.Extract._final (/Users/me/.nvm/versions/node/v8.12.0/lib/node_modules/yarn/lib/cli.js:135364:34)
at callFinal (/Users/me/.nvm/versions/node/v8.12.0/lib/node_modules/yarn/lib/cli.js:70270:10)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9) Update: I've just found that using Im using |
@arcanis @rally25rs more details on this error: So, this seems pretty odd to me that it's failing integrity checksum, considering the sha1's are the same: Error: sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q= integrity checksum failed when using sha1: wanted sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q= but got sha1-AHoWKXweP+Pg9aZkGBsAjFruGaM=. (77 bytes)
at Transform.on (/Users/shargrove/.nvm/versions/node/v8.12.0/lib/node_modules/yarn/lib/cli.js:32831:19)
at emitNone (events.js:111:20)
at Transform.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9) Update: After seeing above, I confirmed that |
Given that this problem suddenly appears much more than usual and that it's during the npm registry being especially flaky, it's quite likely my hypothesis isn't far off |
@arcanis just started having this problem today. I can confirm that by removing that npmrc auth token line the issue was resolved. |
There's no Simply,
EDIT: Faced this issue twice only to end up landing here. 😄 |
In my case, I use CircleCI, |
I have been facing this issue over a week. In btw, this info could be helpful to anyone. |
Removing Not sure if removing |
I'm not really fan of deleting the |
Yes
|
Hi, har-validator-5.1.2 was unpublished from npm as stated here ahmadnassri/node-har-validator#112 (comment) , thus you need to upgrade your dependencies via I suppose this issue can be closed. |
Removing Lastly, the error is not limited to the I summarized my attempts that still reliably reproduce this issue in a previous comment. For the record, when testing with docker, I can reproduce the problem including only the |
The problem is that the npm registry is generally unstable and returns errors (at a higher rate when multiple requests are firing apparently - maybe some kind of per-ip throttling?). For some reason they are not properly caught by Yarn, which blindly tries to hash them and compare them to the expected hash - which fails. So there is a bug in Yarn (we should print a more helpful error), but given that the real problem is how flaky the npm registry is, it's not my priority at the moment (I'd definitely review a PR, though!). As for why it doesn't happen with npm: they retry their requests until they work. Yarn has a mechanism to do that, but not on the part that specifically compute the hash. I'd suggest to use an offline mirror to stop relying on the npm registry for your installs. |
#6817 will "fix" that by showing the actual status code returned by the registry. I'd prefer it to be stable rather than blindly retry until it works so I haven't added the retry code, but if there's no improvements to the horizon we might have to do that. In the meantime I'll close this discussion, as the error messages will change and this thread grown quite large (we can open new ones to discuss each status code individually). |
thank you, |
in case it helps anyone:
|
For me the issue was resolved with |
I've been experiencing intermittent and non-deterministic errors like this one. I restart my build, nothing else having changed and it works. Does anyone have any alternatives to yarn? |
feat: make the title bar's text look bigger/origin size after clicking on it; update: move projector's bottom bar to top; fix: 20% majority -> 20% of the number; fix: 已经有一个Console Lite实例在运行 on Windows caused by limited user privilege; fix: old yarn.lock cause yarn install 's failure (see yarnpkg/yarn#6312); fix: Minio.Client complaining secure option deprecated;
I starting getting this same error on every build (errors on a different npm module each time) after making a PR to update our base docker image from |
Why is this closed? Still breaking CI |
I'll go ahead and lock this thread since it seems to me it reached past its usefulness. As a reminder:
|
Do you want to request a feature or report a bug?
Reporting a bug when running
yarn install
to install node dependencies. For severity, this bug seems critical considering it essentially prevents me from acquiring node dependencies.What is the current behavior?
Fails sometimes with errors like the following:
The occurrence of this error is the challenging part. It does not always fail and does not always fail with the same dependency. The installation is sometimes successful after 3-5 tries.
If the current behavior is a bug, please provide the steps to reproduce.
I've attempted to install dependencies on bare-metal and in a
node:8-alpine
docker container. Both can sometimes encounter the error. I've tested this on my personal device in Montreal, Canada (Mac OS X10.13), on a AWS EC2 instance (Ubuntu 18.04), on a GCE instance (Ubuntu 16.04) and on a production server in France (Debian 8). Each of them can sometimes encounter this error. I've also tried installing with and withoutyarn.lock
to no avail. Find apackage.json
that appears to sometimes reproduce the issue in this gist. The issue does not seem to happen with projects having fewer dependencies.What is the expected behavior?
Successful installation of all packages like
npm install
ornpm ci
which deterministically succeeds without any tar or caching errors.Please mention your node.js, yarn and operating system version.
Tested with the following version:
Node: 8 LTS, 10
Yarn: 1.9.2, 1.9.4
OS: Ubuntu 18.04 LTS, Ubuntu 16.04 LTS, Debian 8, Mac OSX 10.13
Registrie:
registry.yarnpkg.com
,registry.npmjs.org
, private registryIf you require any additional information, don't hesitate to request it. FWIW, reducing the network-concurrency seems to produce a slightly higher success ratio but not consistently enough to conclude the errors are related. It may be an area to investigate however. I've unfortunately exhausted all the time I could afford to spend on this after a few days of troubleshooting. I've reluctantly had to migrate all our CI builds back to using
npm install
/npm ci
:(The text was updated successfully, but these errors were encountered: