Skip to content
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

integrity checksum failed when using sha1 #1230

Closed
nickpape opened this issue Jun 15, 2018 · 40 comments
Closed

integrity checksum failed when using sha1 #1230

nickpape opened this issue Jun 15, 2018 · 40 comments
Assignees

Comments

@nickpape
Copy link

nickpape commented Jun 15, 2018

pnpm version: 2.2.1

Code to reproduce the issue:

Don't have a shareable deterministic repro...

Expected behavior:

When performing an install pnpm should use the same SHA algorithm as server is using when checking for integrity.

Actual behavior:

We get an error like:

ERROR  sha1-iPH9Gm3+vKXEGUAhCJubDn/BWkA= integrity checksum failed when using sha1: wanted sha1-iPH9Gm3+vKXEGUAhCJubDn/BWkA= but got sha512-L0FUxzgyBIaJrdc1DigatUZiZ9NbeCYNsW6gG/4ezLc/8Hv0EaHsSWGNRPCKBCkiatd3CUFSb6nWLvEVVc2qdg== sha1-sqnHrJmVkxa8tNfCe8ddecwx9LI=. (6553600 bytes)
at on                     …pnpm/lib/node_modules/ssri/index.js:310  const err = new Error(`${sri} integrity checksum failed when using ${algorithm}…
at emitNone               events.js:91
at emit                   events.js:185
at endReadableNT          _stream_readable.js:974
at _combinedTickCallback  internal/process/next_tick.js:74
at _tickCallback          internal/process/next_tick.js:98
Resolving: total 2430, reused 0, downloaded 2269

We verified that our NPM registry is definitely returning SHA1 hashes that match the expected value. It appears that PNPM is sometimes comparing the wrong hash.

Any ideas/logs I could provide?

This has been affecting several members of our team, but not others. Sometimes we can fix it by cleaning out the store or not using the shrinkwrap file, but today we got a deterministic repro on 2 machines.

Additional information:

  • node -v prints: 8.9.4
  • Windows, OS X, or Linux?: Windows
@nickpape
Copy link
Author

@iclanton @pgonzal FYI

@zkochan
Copy link
Member

zkochan commented Jun 15, 2018

Are you sure the packages were not republished under the same version? The npm registry used to allow that and I believe the admins still have that ability.

Also, if you use sinopia/verdaccio, they allow overriding already published versions of packages.

@octogonz
Copy link
Member

But in this repro, the shrinkwrap.yaml file has been completely deleted. So essentially PNPM is encountering an integrity mismatch with itself, right? If so that would seem like a PNPM bug, not a registry issue...

@octogonz
Copy link
Member

octogonz commented Jun 15, 2018

Also the error only repros for certain people. Other people are able to build with exactly the same:

  • Git hash
  • NodeJS version
  • .npmrc settings

The only consistent difference seems to be the computer itself. Some computers have this problem for some weird reason. (?) And then eventually the person fiddles with stuff and eventually it stops happening. We've had 4 different people encounter this in the past couple months.

@iclanton
Copy link

Where do these checksums come from? Is there a REST endpoint on the registry that returns them? How does PNPM decide which algorithm to use when it (presumably) hashes the tarball that it downloaded?

@zkochan
Copy link
Member

zkochan commented Jun 15, 2018

Integrity verification happens here

https://github.com/pnpm/tarball-fetcher/blob/a7dc4725d41b0130c9a3cceb778672d10a79ea57/src/createDownloader.ts#L161

The integrity checksum is returned by the registry, with the package metafile

@zkochan
Copy link
Member

zkochan commented Jun 15, 2018

Do you use verdaccio? I've seen such issue with verdaccio. What package did it fail on?

@octogonz
Copy link
Member

octogonz commented Jun 15, 2018

Do you use verdaccio?

This is a normal install that's failing.

Do you want us to provide a verbose log?

Also, we have at least one person who is blocked by this error. He can't do any work on his PC. Would a possible workaround be to comment out the integrity check?

            Promise.all([
              Promise.resolve(), // opts.integrity && ssri.checkStream(res.body, opts.integrity),
              unpackStream.local(res.body, tempLocation, {

@octogonz
Copy link
Member

This is the callstack FYI:

ERROR  Fetching <project>.pkgs.visualstudio.com/@ms/odsp-shared-react/40.14.0 failed!
 
ERROR  sha1-iPH9Gm3+vKXEGUAhCJubDn/BWkA= integrity checksum failed when using sha1: wanted sha1-iPH9Gm3+vKXEGUAhCJubDn/BWkA= but got sha512-L0FUxzgyBIaJrdc1DigatUZiZ9NbeCYNsW6gG/4ezLc/8Hv0EaHsSWGNRPCKBCkiatd3CUFSb6nWLvEVVc2qdg== sha1-sqnHrJmVkxa8tNfCe8ddecwx9LI=. (6553600 bytes)
at on                     …pnpm/lib/node_modules/ssri/index.js:310  const err = new Error(`${sri} integrity checksum failed when using ${algorithm}…
at emitNone               events.js:91
at emit                   events.js:185
at endReadableNT          _stream_readable.js:974
at _combinedTickCallback  internal/process/next_tick.js:74
at _tickCallback          internal/process/next_tick.js:98
Resolving: total 2430, reused 0, downloaded 2269
Downloading <project>.pkgs.visualstudio.com/@ms/odsp-shared-react/40.14.0: 6.55 MB/13.3 MB
Downloading <project>.pkgs.visualstudio.com/office-ui-fabric-react/5.112.0: 3.74 MB/7.26 MB
Downloading <project>.pkgs.visualstudio.com/office-ui-fabric-react/5.57.0: 5.59 MB/8.51 MB
Downloading <project>.pkgs.visualstudio.com/office-ui-fabric-react/6.0.0-beta4: 3.9 MB/8 MB
Error: sha1-iPH9Gm3+vKXEGUAhCJubDn/BWkA= integrity checksum failed when using sha1: wanted sha1-iPH9Gm3+vKXEGUAhCJubDn/BWkA= but got sha512-L0FUxzgyBIaJrdc1DigatUZiZ9NbeCYNsW6gG/4ezLc/8Hv0EaHsSWGNRPCKBCkiatd3CUFSb6nWLvEVVc2qdg== sha1-sqnHrJmVkxa8tNfCe8ddecwx9LI=. (6553600 bytes)
    at Transform.on (C:\Users\<alias>\.rush\pnpm-2.2.1\node_modules\pnpm\lib\node_modules\ssri\index.js:310:19)
    at emitNone (events.js:91:20)
    at Transform.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
Error: sha1-iPH9Gm3+vKXEGUAhCJubDn/BWkA= integrity checksum failed when using sha1: wanted sha1-iPH9Gm3+vKXEGUAhCJubDn/BWkA= but got sha512-L0FUxzgyBIaJrdc1DigatUZiZ9NbeCYNsW6gG/4ezLc/8Hv0EaHsSWGNRPCKBCkiatd3CUFSb6nWLvEVVc2qdg== sha1-sqnHrJmVkxa8tNfCe8ddecwx9LI=. (6553600 bytes)
    at Transform.on (C:\Users\<alias>\.rush\pnpm-2.2.1\node_modules\pnpm\lib\node_modules\ssri\index.js:310:19)
    at emitNone (events.js:91:20)
    at Transform.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
 
The command failed:
 E:\work\sp-client\common\temp\pnpm-local\node_modules\.bin\pnpm install --no-optional --store E:\work\sp-client\common\temp\pnpm-store --no-lock
ERROR: Error: The command failed with exit code 1

@zkochan
Copy link
Member

zkochan commented Jun 15, 2018

yes, commenting that line should solve the issue. But removing shrinkwrap.yaml should solve it as well

@zkochan
Copy link
Member

zkochan commented Jun 15, 2018

I think, as a temporary fix, we can add a verify-tarball-integrity config.

Sounds good?

@octogonz
Copy link
Member

But removing shrinkwrap.yaml should solve it as well

This is absolutely NOT the case. PNPM fails with this error even if there is no shrinkwrap file.

I think, as a temporary fix, we can add a verify-tarball-integrity config.

So this would temporarily disable the checks entirely?

Maybe a better hack would be to say "if the hashes cannot be compared because they are different algorithms, then ignore them and don't fail the install."

@zkochan
Copy link
Member

zkochan commented Jun 15, 2018

The whole log file might help, I think it might also be a network issue.

Maybe a better hack would be to say "if the hashes cannot be compared because they are different algorithms, then ignore them and don't fail the install."

no, the algorithm is fine, there are two integrities: sha1 and sha256. When only sha1 is available then it will be used

@zkochan
Copy link
Member

zkochan commented Jun 15, 2018

So this would temporarily disable the checks entirely?

yes, but I just recalled that this check is also used for retrying. Sometimes due to some network issues, not the whole tarball is returned. Checking the integrity helps to catch that issue and redownload

@octogonz
Copy link
Member

After investigating, we found that there are really two bugs here:

  1. The underlying problem has nothing to do with tarball integrity, but PNPM is reporting the errors in a misleading way. I opened a separate issue When a network connection fails, PNPM incorrectly reports a tarball integrity error #1235 to track this. It should be pretty easy to fix.

  2. The root cause here is that while downloading the tarball, the socket is getting closed prematurely due to an ECONNRESET issue. We're still trying to understand what causes this. On the PC's that reproduce the problem, it was noted that the downloads proceed much slower than usual and seem to stall a lot, then resume again. So it might be a real network failure (although in some cases the ECONNRESET occurs only 1 second after the download started). I'll follow up when we have more details.

@prabhubalaji
Copy link

I am also facing the same issue with sha1.
Attaching the error log.Please reply if anyone find a solution.
NPM version: 6.1.0
Platform: Windows 7

26018 verbose node v10.1.0
26019 verbose npm v6.1.0
26020 error code EINTEGRITY
26021 error sha1-PTIkYrrfB3Fup+uFuviAec3c5QU= integrity checksum failed when using sha1: wanted sha1-PTIkYrrfB3Fup+uFuviAec3c5QU= but got sha512-Bmr56pxML1c9kU+NS51SMFkiVQAb+9uFfXwyqR2tn4w2FPvmPt65eZ9aCcEfRXd9G74HkZnILC6p967pED4aiw== sha1-tx1A2UPQqV2gGVa1R/g8SltKNKw=. (8789 bytes)
26022 verbose exit [ 1, true ]

@octogonz
Copy link
Member

You are using an unstable release of NodeJs. Might want to check that first.

Also are you using PNPM or NPM? It's a little unclear from your log.

@octogonz
Copy link
Member

octogonz commented Aug 10, 2018

@zkochan following up from our previous conversation: People are still hitting this issue occasionally. I got a couple people to confirm that --network-concurrency 1 eliminates the error, which supports your earlier theory that it is related to the connection pool.

As a workaround (until we finally get this solved), we're thinking about adding a rush command-line option that would set the --network-concurrency limit. Perhaps we could experiment with different numbers.

@gaetansnl
Copy link

gaetansnl commented Aug 13, 2018

 WARN  Fetching xxx.xxx.xxx.xxx+32772/material-design-icons/3.0.0 failed!
 ERROR  sha1-zL69YZKz3q9rnm8d7iOL4/cEeb8= integrity checksum failed when using sha1: wanted sha1-zL69YZKz3q9rnm8d7iOL4/cEeb8= but got sha512-vrfq4bQmdCEddxR9iri4xm68cs1c7kwu/xtrj9c7Eod6jVv2MkfQkh4t/5IaPb2by+BeoY7RpSKl2kN+pHaX3g== sha1-DRNONZvUOMrB0XtZg5k+aMCSmfM=. (7056736 bytes)
at on                     …pnpm/lib/node_modules/ssri/index.js:310  const err = new Error(`${sri} integrity checksum failed when using ${algorithm}…
at emitNone               events.js:111
at emit                   events.js:208
at endReadableNT          _stream_readable.js:1056
at _combinedTickCallback  internal/process/next_tick.js:138
at _tickCallback          internal/process/next_tick.js:180Resolving: total 1232, reused 1231, downloaded 0Downloading xxx.xxx.xxx.xxx+32772/material-design-icons/3.0.0: 7.06 MB/33.3 MB
Error: sha1-zL69YZKz3q9rnm8d7iOL4/cEeb8= integrity checksum failed when using sha1: wanted sha1-zL69YZKz3q9rnm8d7iOL4/cEeb8= but got sha512-vrfq4bQmdCEddxR9iri4xm68cs1c7kwu/xtrj9c7Eod6jVv2MkfQkh4t/5IaPb2by+BeoY7RpSKl2kN+pHaX3g== sha1-DRNONZvUOMrB0XtZg5k+aMCSmfM=. (7056736 bytes)
    at Transform.on (C:\Users\Gaetan\AppData\Roaming\nvm\v8.9.3\node_modules\pnpm\lib\node_modules\ssri\index.js:310:19)
    at emitNone (events.js:111:20)
    at Transform.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1056:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
Error: sha1-zL69YZKz3q9rnm8d7iOL4/cEeb8= integrity checksum failed when using sha1: wanted sha1-zL69YZKz3q9rnm8d7iOL4/cEeb8= but got sha512-vrfq4bQmdCEddxR9iri4xm68cs1c7kwu/xtrj9c7Eod6jVv2MkfQkh4t/5IaPb2by+BeoY7RpSKl2kN+pHaX3g== sha1-DRNONZvUOMrB0XtZg5k+aMCSmfM=. (7056736 bytes)
    at Transform.on (C:\Users\Gaetan\AppData\Roaming\nvm\v8.9.3\node_modules\pnpm\lib\node_modules\ssri\index.js:310:19)
    at emitNone (events.js:111:20)
    at Transform.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1056:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
Error: sha1-zL69YZKz3q9rnm8d7iOL4/cEeb8= integrity checksum failed when using sha1: wanted sha1-zL69YZKz3q9rnm8d7iOL4/cEeb8= but got sha512-vrfq4bQmdCEddxR9iri4xm68cs1c7kwu/xtrj9c7Eod6jVv2MkfQkh4t/5IaPb2by+BeoY7RpSKl2kN+pHaX3g== sha1-DRNONZvUOMrB0XtZg5k+aMCSmfM=. (7056736 bytes)
    at Transform.on (C:\Users\Gaetan\AppData\Roaming\nvm\v8.9.3\node_modules\pnpm\lib\node_modules\ssri\index.js:310:19)
    at emitNone (events.js:111:20)
    at Transform.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1056:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
Error: sha1-zL69YZKz3q9rnm8d7iOL4/cEeb8= integrity checksum failed when using sha1: wanted sha1-zL69YZKz3q9rnm8d7iOL4/cEeb8= but got sha512-vrfq4bQmdCEddxR9iri4xm68cs1c7kwu/xtrj9c7Eod6jVv2MkfQkh4t/5IaPb2by+BeoY7RpSKl2kN+pHaX3g== sha1-DRNONZvUOMrB0XtZg5k+aMCSmfM=. (7056736 bytes)
    at Transform.on (C:\Users\Gaetan\AppData\Roaming\nvm\v8.9.3\node_modules\pnpm\lib\node_modules\ssri\index.js:310:19)
    at emitNone (events.js:111:20)
    at Transform.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1056:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

It works fine with npm/yarn. network-concurrency don't solve the issue
EDIT: The problem seems to be related to private registry. Our verdaccio private registry is working with yarn/npm but not with pnpm

@zkochan
Copy link
Member

zkochan commented Aug 13, 2018

@pulse14 could you attach the tarball and the metafile of material-design-icons from your verdaccio's storage?

@gaetansnl
Copy link

https://drive.google.com/file/d/1Adle6gzo3gmrSpOy7ouy9mEQe7mfbGpF/view?usp=sharing

I tried to reset verdaccio cache multiple times

@zkochan
Copy link
Member

zkochan commented Aug 13, 2018

I couldn't reproduce it.
what are your Node.js, pnpm and verdaccio versions?

oh, I see node is 8.9.3

@zkochan
Copy link
Member

zkochan commented Aug 13, 2018

ok, reproduced, I had to install more packages to make some load on verdaccio

@zkochan zkochan self-assigned this Aug 13, 2018
@zkochan
Copy link
Member

zkochan commented Aug 13, 2018

ok, I have found it, this is a regression. The fetch retry options have no default values

@octogonz
Copy link
Member

AWESOME!

@octogonz
Copy link
Member

BTW we should also fix the error message so it says something like "The network connection was reset" instead of "integrity checksum failed". That would really help the end user perception of the issue: The "integrity checksum failed" sounds like PNPM is corrupting its own data stream, which is not the case. (#1235)

@zkochan
Copy link
Member

zkochan commented Aug 13, 2018

🚢 2.13.4

I'll try to mock the registry and cover it with tests later

@octogonz
Copy link
Member

Thanks again for fixing @zkochan !

@zkochan
Copy link
Member

zkochan commented Aug 14, 2018

no problem
thanks for reporting

@octogonz
Copy link
Member

People have confirmed that this fixes their repros for this issue. Hurray!

@wmertens
Copy link

wmertens commented Nov 8, 2018

So, is this fixed or not?

I'm encountering an integrity error too, even with --network-concurrency 1, after I tried to install on a flaky network connection.

I wish the error included the failing package, so I could remove it from the cache and refetch.

There is no shrinkwrap.yml yet, and I removed the package-lock.json to be sure.

Output:

 ERROR  sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA== integrity checksum failed when using sha512: wanted sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA== but got sha512-WbRFMvmj/zDA0xqaqJOhK2rwkKrv4I26VZD7Kz6+3uChO7RpDnR+ZNSC+IUzeSXgizVZ2ngFVHG4dDD37AyxvQ==. (1735417 bytes)
at on                     /Users/wmertens/bin/node_modules/.registry.npmjs.org/pnpm/2.17.7/node_modules/pnpm/lib/node_modules/ssri/index.js:328  const err = new Error(`$…
at emitNone               events.js:111
at emit                   events.js:208
at endReadableNT          _stream_readable.js:1064
at _combinedTickCallback  internal/process/next_tick.js:138
at _tickCallback          internal/process/next_tick.js:180
Resolving: total 1722, reused 1719, downloaded 0
Error: sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA== integrity checksum failed when using sha512: wanted sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA== but got sha512-WbRFMvmj/zDA0xqaqJOhK2rwkKrv4I26VZD7Kz6+3uChO7RpDnR+ZNSC+IUzeSXgizVZ2ngFVHG4dDD37AyxvQ==. (1735417 bytes)
    at Transform.on (/Users/wmertens/bin/node_modules/.registry.npmjs.org/pnpm/2.17.7/node_modules/pnpm/lib/node_modules/ssri/index.js:328: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:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
Error: sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA== integrity checksum failed when using sha512: wanted sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA== but got sha512-WbRFMvmj/zDA0xqaqJOhK2rwkKrv4I26VZD7Kz6+3uChO7RpDnR+ZNSC+IUzeSXgizVZ2ngFVHG4dDD37AyxvQ==. (1735417 bytes)

The previous run failed here:

Resolving: total 1722, reused 1533, downloaded 188
Downloading registry.npmjs.org/typescript/3.1.6: 1.74 MB/7.45 MB
FetchError: request to https://registry.npmjs.org/typescript/-/typescript-3.1.6.tgz failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
    at ClientRequest.req.on.err (/Users/wmertens/bin/node_modules/.registry.npmjs.org/pnpm/2.17.7/node_modules/pnpm/lib/node_modules/node-fetch-npm/src/index.js:68:14)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at TLSSocket.socketErrorListener (_http_client.js:387:9)
    at emitOne (events.js:116:13)
    at TLSSocket.emit (events.js:211:7)
    at emitErrorNT (internal/streams/destroy.js:64:8)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

Based on that I took a look here:

$ ls -l ~/.pnpm-store/2/registry.npmjs.org/typescript/3.1.6/
total 2080
drwxr-xr-x 10 wmertens staff     320 Nov  8 08:44 _tmp_65635_d5149cc0201e74a543cde88c1efbf35c
drwxr-xr-x 10 wmertens staff     320 Nov  8 08:46 _tmp_66032_7ce8ff3da6b0244cae53b34c4bfef3b1
drwxr-xr-x  4 wmertens staff     128 Nov  8 09:06 _tmp_69757_dc2216bb306d6fd55c53ca7e905dd61d
drwxr-xr-x 10 wmertens staff     320 Nov  8 09:12 _tmp_71228_401d863dbb7aa301404adc6d60aff2cf
-rw-r--r--  1 wmertens staff 1735417 Nov  8 07:53 packed.tgz

filesize matches, so I removed that directory, and pnpm i worked.

Is this a different bug? Maybe the store should automatically retry fetching? Or at the very least not store intermediate downloads at the final location?

@zkochan
Copy link
Member

zkochan commented Nov 8, 2018

@wmertens please create a separate issue

I thought we only rename the tarball if the integrity was correct but looking at the code I am not sure
There might be an edge case there

https://github.com/pnpm/tarball-fetcher/blob/80f978e584b007cae73b7d98c19ff2c460dc4bbd/src/createDownloader.ts#L151

@octogonz
Copy link
Member

octogonz commented Nov 8, 2018

Are you sure it's an actual integrity error? Based on #1235 it seemed that network failures sometimes get reported as "integrity checksum failed" because the original error does not prevent the integrity check from happening and producing a secondary error.

@wmertens
Copy link

wmertens commented Nov 8, 2018

@pgonzal yes, the file was truncated

@zkochan
Copy link
Member

zkochan commented Dec 18, 2018

We can try something like the following:

If a tarball download fails, we retry the download (as we currently do, we retry it up to 2 times by default) and we automatically reduce network-concurrency to 1

@octogonz
Copy link
Member

This GitHub issue is now closed.

Should we open a separate GitHub issue to track this? People continue to report this issue to us every week or so (admittedly at a very large company with lots of developers). The --network-concurrency workaround seems to work pretty reliably, so I bet there are also people who encounter the problem but do NOT report it any more.

It would be helpful to automate the workaround. Long term it would be ideal to add appropriate logging so we can eventually figure out the root cause and fix it. Currently the real error is obscured by #1235 (which seems like it would be pretty simple fix).

@zkochan
Copy link
Member

zkochan commented Dec 18, 2018

If my proposed solution sounds good, we can create an issue for it

@zkochan
Copy link
Member

zkochan commented Dec 18, 2018

but as I reread the issue, initially it was due to fetch-retries having a bad default number. Setting it to 2 solved most of the issues, so maybe setting a bigger number of retries is the solution. Users may set any number they want.

We can add more details to the error message, something like: Download failed after 2 attempts. You may change the maximum number of retries by changing the fetch-retries config

@octogonz
Copy link
Member

BTW if you wanted to publish a prototype of an idea, it's easy for me to find a person who's encountering the issue and get them to test whether it solves the problem or not.

@wmertens
Copy link

sorry I dropped the ball on this. My problem was actually badly downloaded files being treated as correct - downloading them multiple times won't fix that underlying problem. I'll make an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants