distributions icon indicating copy to clipboard operation
distributions copied to clipboard

[ERROR] Node.js 18.14.0 - 18.16.0 on Ubuntu22.04.3 Installation fail - unexpected file size

Open antoni-szych-rtbhouse opened this issue 3 years ago • 12 comments

Describe your bug Unexpected file size of Node binaries.

Distribution Information:

  • OS: Ubuntu
  • Version 22.04.3

Node Version:

  • Node: Node.js v18.14.0-1nodesource1

To Reproduce Steps to reproduce the behavior:

  1. Import keys as specified in the instruction 2.
NODE_MAJOR=18
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
  1. sudo apt update
  2. sudo apt install nodejs=18.14.0-1nodesource1

Actually, the same is reproducible with:

18.14.1-1nodesource1
18.14.2-1nodesource1
18.15.0-1nodesource1
18.16.0-1nodesource1

However it's working fine with:

18.16.1-1nodesource1
18.17.0-1nodesource1
18.17.1-1nodesource1

Expected behavior

Installation success.

Screenshots

sudo apt install nodejs=18.14.0-1nodesource1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be upgraded:
  nodejs
1 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Need to get 29,0 MB of archives.
After this operation, 5 931 kB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_18.x nodistro/main amd64 nodejs amd64 18.14.0-1nodesource1 [29,0 MB]
Err:1 https://deb.nodesource.com/node_18.x nodistro/main amd64 nodejs amd64 18.14.0-1nodesource1
  File has unexpected size (28609760 != 29017700). Mirror sync in progress? [IP: 2606:4700:10::6816:51a 443]
  Hashes of expected file:
   - SHA512:17fcb59ef3e1b8e57e20c7e5e3157d77c686f23c79fb0992c53b9c37c7591a372d8935ae6a5916c9a7daaf1184fe9fb87a7eedc02e1e31a6214ce6d92658d384
   - SHA256:3800000f97eb40d5b15d9e03520abf193b74dab228ddd0aed4015cf217854d9c
   - SHA1:74b136a5527ce99e8062e3af4c56746a3222fe0d [weak]
   - MD5Sum:2905962bef8a243cad3c378cca5679a9 [weak]
   - Filesize:29017700 [weak]
E: Failed to fetch https://deb.nodesource.com/node_18.x/pool/main/n/nodejs/nodejs_18.14.0-1nodesource1_amd64.deb  File has unexpected size (28609760 != 29017700). Mirror sync in progress? [IP: 2606:4700:10::6816:51a 443]
   Hashes of expected file:
    - SHA512:17fcb59ef3e1b8e57e20c7e5e3157d77c686f23c79fb0992c53b9c37c7591a372d8935ae6a5916c9a7daaf1184fe9fb87a7eedc02e1e31a6214ce6d92658d384
    - SHA256:3800000f97eb40d5b15d9e03520abf193b74dab228ddd0aed4015cf217854d9c
    - SHA1:74b136a5527ce99e8062e3af4c56746a3222fe0d [weak]
    - MD5Sum:2905962bef8a243cad3c378cca5679a9 [weak]
    - Filesize:29017700 [weak]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

so the hashes are correct, but the filesize is different. Maybe that's an issue with apt or something? Let's try sending a direct HTTP request:

curl -v https://deb.nodesource.com/node_18.x/pool/main/n/nodejs/nodejs_18.14.0-1nodesource1_amd64.deb
*   Trying 2606:4700:10::ac43:acd:443...
* Connected to deb.nodesource.com (2606:4700:10::ac43:acd) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
...
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=Cloudflare, Inc.; CN=sni.cloudflaressl.com
*  start date: Aug 29 00:00:00 2023 GMT
*  expire date: Aug 27 23:59:59 2024 GMT
*  subjectAltName: host "deb.nodesource.com" matched cert's "deb.nodesource.com"
*  issuer: C=US; O=Cloudflare, Inc.; CN=Cloudflare Inc ECC CA-3
*  SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
...
> GET /node_18.x/pool/main/n/nodejs/nodejs_18.14.0-1nodesource1_amd64.deb HTTP/2
> Host: deb.nodesource.com
> user-agent: curl/7.81.0
> accept: */*
> 
< HTTP/2 200 
< date: Fri, 08 Sep 2023 11:10:35 GMT
< content-type: application/octet-stream
< content-length: 28609760
< x-amz-id-2: mLuB7+HvVTu40md9GRK9AtJpy4m00rXT1ehX12xGBdTdn+XIxUhfWVH9chUKE/fL+SG0Bro7jbM=
< x-amz-request-id: K921F0PFS0JA8TY1
< last-modified: Mon, 28 Aug 2023 20:06:08 GMT
< etag: "1d0aacda76659af36caaa3e2505c3d2b-4"
< cache-control: max-age=14400
< cf-cache-status: HIT
< age: 907
< accept-ranges: bytes
< server: cloudflare
< cf-ray: 8036beed0eb4347c-WAW
< 
...

see the content-length: 28609760 ? It was supposed to be 29017700 according to the index file (see second line from the bottom):

curl -s https://deb.nodesource.com/node_18.x/dists/nodistro/main/binary-amd64/Packages | grep -B 13 "2905962bef8a243cad3c378cca5679a9"
Package: nodejs
Priority: optional
Section: web
Installed-Size: 181302
Maintainer: NodeSource Support <[email protected]>
Architecture: amd64
Version: 18.14.0-1nodesource1
Replaces: nodejs-dev (<= 0.8.22), nodejs-legacy, npm (<= 1.2.14)
Provides: nodejs-dev, nodejs-doc, nodejs-legacy, npm
Depends: libc6 (>= 2.28), python3, ca-certificates
Conflicts: nodejs-dev, nodejs-doc, nodejs-legacy, npm
Filename: pool/main/n/nodejs/nodejs_18.14.0-1nodesource1_amd64.deb
Size: 29017700
MD5sum: 2905962bef8a243cad3c378cca5679a9

Additional context

None that seems relevant.

antoni-szych-rtbhouse avatar Sep 08 '23 11:09 antoni-szych-rtbhouse

This is true for the oldest nodejs16 builds too. More recent ones are okay. But I haven't investigated what is the first release to be installable.

Grothesk242 avatar Sep 08 '23 17:09 Grothesk242

I'm also seeing this behavior with the 20_x releases:

Get:10 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages [2,961 B] Err:10 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages File has unexpected size (2795 != 2961). Mirror sync in progress? [IP: 104.22.5.26 443] Hashes of expected file:

  • Filesize:2961 [weak]
  • SHA512:1c2391c7f8304ce68a21043607b73976c8a240d3d2994e9e5608e1a91809cccb906708d11dd35d136a219e84236fdfcfc29af4d629f641259ea7720919015516
  • SHA256:59446fe27da97b0ad0b6d7f7ae357a5d03319b24efeaebe09d4d883f3c6df410
  • SHA1:e1906a12b161c046b707eb137c26f896925966ca [weak]
  • MD5Sum:56f7cc0a07d3c74561b6bc74574f2664 [weak] Release file created at: Fri, 08 Sep 2023 19:30:47 +0000

jdmartin avatar Sep 08 '23 19:09 jdmartin

@jdmartin Node.js v20 errors are due to a new version being released and may appear while the cache is being updated.

JesusPaz avatar Sep 08 '23 19:09 JesusPaz

Gotcha. As it happens, I waited until now, ran apt-get clean, and then the upgrade proceeded as expected. :)

jdmartin avatar Sep 08 '23 19:09 jdmartin

@antoni-szych-rtbhouse we will do an investigation into what is happening

JesusPaz avatar Sep 08 '23 19:09 JesusPaz

Please note that this issue is not reproducible anymore with any of the examples I provided previously:

18.14.0-1nodesource1
18.14.1-1nodesource1
18.14.2-1nodesource1
18.15.0-1nodesource1
18.16.0-1nodesource1

Now their size matches the size specified in the index file and the installation succeeds without any issues.

Example headers:

curl -v https://deb.nodesource.com/node_18.x/pool/main/n/nodejs/nodejs_18.14.0-1nodesource1_amd64.deb
*   Trying 2606:4700:10::ac43:acd:443...
* Connected to deb.nodesource.com (2606:4700:10::ac43:acd) port 443 (#0)
...
< HTTP/2 200 
< date: Wed, 11 Oct 2023 09:19:11 GMT
< content-type: application/octet-stream
< content-length: 29017700
< x-amz-id-2: LDjoaPVNoOmJIgopU9FeF35FigAOmpVk/BFcEZtEEbHinyXJwo0HY+GNDZhVENeJkhUk1+ublx8=
< x-amz-request-id: 1EBVFEHZ5NSKMB6E
< x-amz-meta-md5: 2905962bef8a243cad3c378cca5679a9
< last-modified: Mon, 18 Sep 2023 23:04:07 GMT
< etag: "2905962bef8a243cad3c378cca5679a9"
< cache-control: max-age=14400
< cf-cache-status: MISS
< accept-ranges: bytes
< server: cloudflare
< cf-ray: 8146051b79e135ba-WAW

Maybe the last-modified: Mon, 18 Sep 2023 23:04:07 GMT will be helpful in case you would like to investigate this further. Otherwise please feel free to close this issue as not reproducible anymore (at least for node 18.x).

antoni-szych-rtbhouse avatar Oct 11 '23 09:10 antoni-szych-rtbhouse

It seems this might be occurring again with the nodejs_20.9.0 release. Specifically the Packages.bz2 file.

31.98 E: Failed to fetch https://deb.nodesource.com/node_20.x/dists/nodistro/main/binary-amd64/Packages.bz2  File has unexpected size (4070 != 3613). Mirror sync in progress? [IP: ...]
31.98    Hashes of expected file:
31.98     - Filesize:3613 [weak]
31.98     - SHA512:2baf8ce0fd06ccf978d7e73b1adc6fa8390dc5ff7942ab2d5b89903460ec9e188203851f12877cedcac57fc7047224194e64b772de199d733f72dbfb10b68317
31.98     - SHA256:fba8379cf729d58a5b6adab466a20a4e5bcef6a4e8dc584fe7c2a33f568cb062
31.98     - SHA1:b2ed6eae7078e1c3644014c3afb9f6e2aea85f33 [weak]
31.98     - MD5Sum:a9aebf4761f08a52bda814a67963e487 [weak]
31.98    Release file created at: Tue, 24 Oct 2023 15:16:00 +0000
31.98 E: Some index files failed to download. They have been ignored, or old ones used instead.

jmahlik avatar Nov 01 '23 13:11 jmahlik

Failing for other versions as well: (is there a workaround?!)

E: Failed to fetch https://deb.nodesource.com/node_18.x/pool/main/n/nodejs/nodejs_18.17.1-deb-1nodesource1_amd64.deb  404  Not Found [IP: 104.22.5.26 443]

w601sxs avatar Nov 01 '23 18:11 w601sxs

This issue was due to a cache corruption, but as of today everything is working properly.

riosje avatar Jan 23 '24 20:01 riosje

This issue persists

#6 11.37 Err:2 https://deb.nodesource.com/node_24.x nodistro/main arm64 Packages
#6 11.37   File has unexpected size (2581 != 2397). Mirror sync in progress? [IP: 172.66.150.169 443]
#6 11.37   Hashes of expected file:
#6 11.37    - Filesize:2397 [weak]
#6 11.37    - SHA512:68acb13f92cefa8f94380688bd2f1b7326f29ede70e3b9be6f5bf7fd0ff8effa68066a5308107bf2d49a63d1236f38c45fbadcbed338998c9800536fd831c133
#6 11.37    - SHA256:48cb2882df71aadf029f8f3e5204bb99ddf5b0ee401acaf0f19c2790be7acd09
#6 11.37    - SHA1:60280f32692a896e0782a137ad69ca1b377b25d6 [weak]
#6 11.37    - MD5Sum:588cf9571942bfcf5a99fd3a7d9405c7 [weak]

missinglink avatar Aug 28 '25 13:08 missinglink

Confirmed. I see the same error as @missinglink.

rafleon avatar Aug 28 '25 15:08 rafleon

New issue: https://github.com/nodesource/distributions/issues/1886#issuecomment-3233942654

missinglink avatar Aug 28 '25 15:08 missinglink