-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Bug]: YN0018 in Windows, but not macOS/Linux: "remote archive doesn't match the expected checksum" #5795
Comments
I'm not sure what is going on yet, but I think I have to use |
When installing a git dependency, the repo is cloned to the local filesystem then zipped to produce the package. So there are room for differences across systems (e.g. regarding file permissions: #5136) I checked the zip archive I generated on a Windows machine with
Since you don't get the error locally I assume the zip on your system matches the checksum? Can you check whether your zip archive in your yarn cache matches the above (especially the perms on |
Ah, it was late. I should have clarified after I realized: By "not locally" I meant "not locally on macOS" (that's what I was using at the time, shown in the Environment section), but then I was pushing to the repo and it was failing in CI for Windows. But I in fact verified later after I got onto my Windows machine that the I updated the title to be more accurate. |
Probably something like: #2774 (comment) If not, the ideal would be for you to exfiltrate the problematic archive and post it here (along with with the expected cache entry) so we can compare its byte content. |
Here's the checksum: I'm not sure which archive for three.js is the one, I see this from
but I don't see 0.139.1 in the cache. Here are all the three-npm-0.157.0-1b19c1ef00-444797461c.zip I'm guessing none of those are it. Any idea where to get the zip after the failed install? @clemyan perhaps you can upload yours? Would it be ok if the |
@trusktr My understanding is that you have a (local) MacOS machine that can install without checksum errors. Meanwhile me on my Windows machine is seeing checksum errors. If that is the case, we have two differing zip archives. One of the errors is on docsify-cli-https-e76244022d-8.zip You can find the global cache in |
Oh wow, I'm sorry, I thought I was seeing this error for the |
I'm having a very similar issue. When running This is happening with Yarn 4.0.1. |
After some fiddling around, I finally understood that my git repository was not set up to know that .zip files should be considered binary, so git was the problem. It was likely performing some kind of line ending conversion on the .zip files. I had to add the following to my .gitattributes file:
Then, had to clear my yarn cache and reinstall so that the archives were back in the correct format and would not be changed by git. |
Hi! 👋 It seems like this issue as been marked as probably resolved, or missing important information blocking its progression. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it. |
I don't think this issue is resolved, but I've moved on by not installing some packages from git and now installing them from npm. |
Hi! 👋 It seems like this issue as been marked as probably resolved, or missing important information blocking its progression. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it. |
This is still an issue, see e.g. https://github.com/bdunderscore/modular-avatar/actions/runs/7436253662/job/20232535460 where the In this case I'm not checking in any archives, so this is purely an issue with how yarn retrieves archives from NPM. |
yarn --immutable seems to be unreliable due to yarnpkg/berry#5795
yarn --immutable seems to be unreliable due to yarnpkg/berry#5795
Hi! 👋 It seems like this issue as been marked as probably resolved, or missing important information blocking its progression. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it. |
I just encountered this. For me, it is not an option to not use git dependencies as I have a forked project and I need to pull it via https. I checked to see if I have any binaries but that's not the case. Disabling checksums is a workaround but sounds insecure. Do you have any other suggestions as to what might be going on? |
This was something of a WTF. It was only a problem on Github Actions, I was unable to reproduce otherwise. I solved it by upgrading yarn + the lock file, and a lot of things dependent on it:
|
I'm encountering this too after opt-out pnp: n0099/open-tbm@82904a0 ➤ YN0018: │ @fortawesome/vue-fontawesome@npm:3.0.8: The remote archive doesn't match the expected checksum
➤ YN0018: │ v-viewer@npm:3.0.13: The remote archive doesn't match the expected checksum
➤ YN0018: │ vue-types@npm:3.0.2: The remote archive doesn't match the expected checksum
➤ YN0018: │ vue-router@npm:4.3.3: The remote archive doesn't match the expected checksum
➤ YN0018: │ ant-design-vue@npm:4.2.3: The remote archive doesn't match the expected checksum Linux: Archive: /home/n0099/.yarn/berry/cache/vue-router-npm-4.3.3-af8e67016f-10c0.zip
Zip file size: 812925 bytes, number of entries: 23
drwxr-xr-x 6.3 unx 0 b- stor 84-Jun-22 21:50 node_modules/
drwxr-xr-x 6.3 unx 0 b- stor 84-Jun-22 21:50 node_modules/vue-router/
-rw-r--r-- 6.3 unx 1100 b- stor 84-Jun-22 21:50 node_modules/vue-router/LICENSE
drwxr-xr-x 6.3 unx 0 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/
-rw-r--r-- 6.3 unx 148647 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.cjs
-rw-r--r-- 6.3 unx 112962 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.prod.cjs
-rw-r--r-- 6.3 unx 179 b- stor 84-Jun-22 21:50 node_modules/vue-router/index.js
-rw-r--r-- 6.3 unx 50 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.cjs.js
-rw-r--r-- 6.3 unx 55 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.cjs.prod.js
-rw-r--r-- 6.3 unx 148093 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.esm-browser.js
-rw-r--r-- 6.3 unx 38 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.esm-bundler.js
-rw-r--r-- 6.3 unx 161626 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.global.js
-rw-r--r-- 6.3 unx 24990 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.global.prod.js
drwxr-xr-x 6.3 unx 0 b- stor 84-Jun-22 21:50 node_modules/vue-router/vetur/
-rw-r--r-- 6.3 unx 1847 b- stor 84-Jun-22 21:50 node_modules/vue-router/vetur/attributes.json
-rw-r--r-- 6.3 unx 5218 b- stor 84-Jun-22 21:50 node_modules/vue-router/package.json
-rw-r--r-- 6.3 unx 636 b- stor 84-Jun-22 21:50 node_modules/vue-router/vetur/tags.json
-rw-r--r-- 6.3 unx 4361 b- stor 84-Jun-22 21:50 node_modules/vue-router/README.md
-rw-r--r-- 6.3 unx 150716 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.mjs
-rw-r--r-- 6.3 unx 76 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.node.mjs
-rw-r--r-- 6.3 unx 95 b- stor 84-Jun-22 21:50 node_modules/vue-router/vue-router-auto-routes.d.ts
-rw-r--r-- 6.3 unx 101 b- stor 84-Jun-22 21:50 node_modules/vue-router/vue-router-auto.d.ts
-rw-r--r-- 6.3 unx 48483 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.d.ts
23 files, 809273 bytes uncompressed, 809273 bytes compressed: 0.0% Windows: Archive: /c/Users/n0099/AppData/Local/Yarn/Berry/cache/vue-router-npm-4.3.3-af8e67016f-10c0.zip
Zip file size: 776245 bytes, number of entries: 23
drwxr-xr-x 6.3 unx 0 b- stor 84-Jun-22 21:50 node_modules/
drwxr-xr-x 6.3 unx 0 b- stor 84-Jun-22 21:50 node_modules/vue-router/
-rw-r--r-- 6.3 unx 1100 b- stor 84-Jun-22 21:50 node_modules/vue-router/LICENSE
drwxr-xr-x 6.3 unx 0 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/
-rw-r--r-- 6.3 unx 148647 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.cjs
-rw-r--r-- 6.3 unx 112962 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.prod.cjs
-rw-r--r-- 6.3 unx 179 b- stor 84-Jun-22 21:50 node_modules/vue-router/index.js
-rw-r--r-- 6.3 unx 50 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.cjs.js
-rw-r--r-- 6.3 unx 55 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.cjs.prod.js
-rw-r--r-- 6.3 unx 148093 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.esm-browser.js
-rw-r--r-- 6.3 unx 38 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.esm-bundler.js
-rw-r--r-- 6.3 unx 161626 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.global.js
-rw-r--r-- 6.3 unx 24990 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.global.prod.js
drwxr-xr-x 6.3 unx 0 b- stor 84-Jun-22 21:50 node_modules/vue-router/vetur/
-rw-r--r-- 6.3 unx 1847 b- stor 84-Jun-22 21:50 node_modules/vue-router/vetur/attributes.json
-rw-r--r-- 6.3 unx 5218 b- stor 84-Jun-22 21:50 node_modules/vue-router/package.json
-rw-r--r-- 6.3 unx 636 b- stor 84-Jun-22 21:50 node_modules/vue-router/vetur/tags.json
-rw-r--r-- 6.3 unx 4361 b- stor 84-Jun-22 21:50 node_modules/vue-router/README.md
-rw-r--r-- 6.3 unx 150716 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.mjs
-rw-r--r-- 6.3 unx 76 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.node.mjs
-rw-r--r-- 6.3 unx 95 b- stor 84-Jun-22 21:50 node_modules/vue-router/vue-router-auto-routes.d.ts
-rw-r--r-- 6.3 unx 101 b- stor 84-Jun-22 21:50 node_modules/vue-router/vue-router-auto.d.ts
-rw-r--r-- 6.3 unx 48601 b- defX 24-Jun-15 16:04 node_modules/vue-router/dist/vue-router.d.ts
23 files, 809391 bytes uncompressed, 772593 bytes compressed: 4.5% -Archive: /home/n0099/.yarn/berry/cache/vue-router-npm-4.3.3-af8e67016f-10c0.zip
-Zip file size: 812925 bytes, number of entries: 23
+Archive: /c/Users/n0099/AppData/Local/Yarn/Berry/cache/vue-router-npm-4.3.3-af8e67016f-10c0.zip
+Zip file size: 776245 bytes, number of entries: 23
--rw-r--r-- 6.3 unx 48483 b- stor 84-Jun-22 21:50 node_modules/vue-router/dist/vue-router.d.ts
-23 files, 809273 bytes uncompressed, 809273 bytes compressed: 0.0%
+-rw-r--r-- 6.3 unx 48601 b- defX 24-Jun-15 16:04 node_modules/vue-router/dist/vue-router.d.ts
+23 files, 809391 bytes uncompressed, 772593 bytes compressed: 4.5% #2774 (comment) yarn cache clean --all
rm yarn.lock
yarn on windows side will sync to the linux one and fix this. |
I also ran into this issue, also trying to build on Windows in github actions, but the original dependency was added to package.json on a mac: package.json
|
If people have to use ignore checksum, it would be nice if we could do this on a selective basis - because otherwise using Yarn Berry is more insecure than using Yarn 1.x... |
Self-service
Describe the bug
I just started using Yarn for the first time in a project (Berry, not Classic) and I'm loving it! But I'm now having this issue,
in GitHub Actions only, not locally.
To reproduce
Here's the job with the error:
https://github.com/lume/lume/actions/runs/6538252764/job/17753779120
The relevant output there:
The package
docsify-cli
is being installed from git, fromgh.neting.cc/trusktr/docsify-cli
. Does this have anything to do with it perhaps?I wonder if it is CRLFs...
Is this a known issue with packages installed from git?
Environment
Additional context
EDIT:
I tried putting
.gitattributes
witheol=lf
in thetrusktr/docsify-cli
repo (its theadd-cors
branch), recreated my yarn.lock, and also addedgit config core.eol lf && git config core.autocrlf input
to the beginning of my GitHub Actions before it runs the yarn install, but no luck.The text was updated successfully, but these errors were encountered: