pnpm / pnpm

Fast, disk space efficient package manager
https://pnpm.io
MIT License
28.97k stars 970 forks source link

ERR_PNPM_TARBALL_EXTRACT #7607

Open Omanshb opened 6 months ago

Omanshb commented 6 months ago

Verify latest release

pnpm version

No response

Which area(s) of pnpm are affected? (leave empty if unsure)

CLI

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

Running PNPM install on my macOS for (https://github.com/DSGT-DLP/Deep-Learning-Playground). Running into this error  WARN  GET https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz error (ERR_PNPM_TARBALL_EXTRACT). Will retry in 1 minute. 1 retries left.cript/5.3.3: 5.47 MB/5.76 MB when I am running dlp-cli frontend install.

Describe the Bug

 WARN  GET https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz error (ERR_PNPM_TARBALL_EXTRACT). Will retry in 1 minute. 1 retries left.cript/5.3.3: 5.47 MB/5.76 MB

Expected Behavior

Installation should be going through with no extra errors or warnings.

Which Node.js version are you using?

v20.10.0

Which operating systems have you used?

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

karkir0003 commented 6 months ago

@zkochan , @rstacruz , @gluxon , could anyone of you or the rest of the pnpm team help resolve this blocker ASAP? Thanks for your help!

gluxon commented 6 months ago

Is the current latest pnpm version (v8.15.1) the right version to try reproducing? The pnpm version in the issue report is blank. Giving a similar test on macOS, I don't see an ERR_PNPM_TARBALL_EXTRACT error.

Screenshot 2024-02-03 at 4 07 39 PM
gluxon commented 6 months ago

I'm realizing others have seen this issue recently. https://github.com/pnpm/pnpm/issues/7529

There should be a bit more to the log output. Could that be shared? For example, others in the issue linked above are seeing:

 ERR_PNPM_TARBALL_EXTRACT  Failed to unpack the tarball from "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz":
  TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))
 ERR_PNPM_TARBALL_EXTRACT  Failed to unpack the tarball from "https://[our_private_npm]/@yarnpkg/parsers/-/parsers-3.0.0-rc.48.1.tgz":
  Error: Invalid checksum for TAR header at offset 208384. Expected 0, got 5578

Thanks!

karkir0003 commented 6 months ago

Is the current latest pnpm version (v8.15.1) the right version to try reproducing? The pnpm version in the issue report is blank. Giving a similar test on macOS, I don't see an ERR_PNPM_TARBALL_EXTRACT error.

Screenshot 2024-02-03 at 4 07 39 PM

yes. pnpm 8.15.1 is the version where we ran into the issue @gluxon @zkochan

karkir0003 commented 6 months ago

Is the current latest pnpm version (v8.15.1) the right version to try reproducing? The pnpm version in the issue report is blank. Giving a similar test on macOS, I don't see an ERR_PNPM_TARBALL_EXTRACT error.

Screenshot 2024-02-03 at 4 07 39 PM

It happens when we install pnpm and then install packages with pnpm install

gluxon commented 6 months ago

Thanks. How about the other question? Is there more to the ERR_PNPM_TARBALL_EXTRACT error at the bottom of the pnpm install log?

Omanshb commented 6 months ago

image

here is a more in depth screenshot of the issue I'm facing when I run dlp-cli frontend install

karkir0003 commented 6 months ago

@gluxon see above ^^^

gluxon commented 6 months ago

Thanks. There's still a bit more that would be helpful to debug: The pnpm install command will eventually fail and show more details about what caused ERR_PNPM_TARBALL_EXTRACT. See https://github.com/pnpm/pnpm/issues/7529 for an example of more complete logs. The command is still running in the screenshots above.

I'm having trouble reproducing on my end, so help would be appreciated!

zkochan commented 6 months ago

Might be an issue with the registry. It is unlikely that pnpm would fail to extract so many different packages. I've seen this error in other issues and it is always only one of the packages that is broken somehow. So, my assumption is that this would also fail with npm CLI or Yarn.

To see the error earlier, you can set fetch-retries=0 in .npmrc

Omanshb commented 6 months ago
image

Hey @zkochan and @gluxon, it was taking really long to generate but this is the error that's showing up at the end of the chain of warnings. Is there any way to fix this? We've already tried hard reseting our environment and pnpm.

gluxon commented 6 months ago

@Omanshb Is there anything strange about that file path or the folders leading up to it?

❯ cd ~/Library/pnpm/store/v3/files/78

❯ ls -l

I'm not sure what we're looking for specifically, but to seed a few questions:

zkochan commented 6 months ago

We need to fix error reporting. Currently a lot of different unrelated errors are thrown with the ERR_PNPM_TARBALL_EXTRACT error code. In this case the real error code is EACCESS. As a result, people are posting unrelated issues to the same open issues.