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

Failed to fetch due to Hash sum mismatch #86858

Closed
f3wenbo opened this issue Dec 13, 2019 · 93 comments
Closed

Failed to fetch due to Hash sum mismatch #86858

f3wenbo opened this issue Dec 13, 2019 · 93 comments
Assignees
Labels
install-update VS Code installation and upgrade system issues

Comments

@f3wenbo
Copy link

f3wenbo commented Dec 13, 2019

When I was trying to update, I got the Hash sum mismatch error on terminal.

  • VSCode Version:1.40.2
  • OS Version:Ubuntu LTS 18.04 (Linux x64 5.0.0-37-generic)

Steps to Reproduce:

1.sudo apt update at terminal
2.Get the following error log

E: Failed to fetch http://packages.microsoft.com/repos/vscode/dists/stable/main/binary-amd64/Packages.bz2  File has unexpected size (156056 != 156065). Mirror sync in progress? [IP: 10.77.8.70 8080]
   Hashes of expected file:
    - Filesize:156065 [weak]
    - SHA512:12e6dffcd247d1ff067acfa61a3c4eb6078c326c2858feb4f6f141a1d809e22292a78282414a5c103038ea80bb63cd734c7516782c9809c341335083d4e7611b
    - SHA256:c850f35f1979831ac75641978c397e51519fa22313598ec12bde5f52277044c0
    - SHA1:1f65f4a7388c22bcf7b7f30fb7bc337c60d94b2e [weak]
    - MD5Sum:4153a12e4a5629bfb14ed98f4c8ac234 [weak]
   Release file created at: Thu, 12 Dec 2019 19:59:19 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

Previously:

#70584
#66339
#66238
#41117

@vscodebot vscodebot bot added the install-update VS Code installation and upgrade system issues label Dec 13, 2019
@dpkristensen
Copy link

dpkristensen commented Dec 13, 2019

Also seeing this, same version of VSCode and Ubuntu as OP.

In #41094 (almost 2 years ago), @Tyriar said "the team is planning on putting together better monitoring to hopefully catch this sort of thing earlier."

Apparently whatever was planned didn't go so well? Maybe some automation is needed?

@sanjaykarki
Copy link

sanjaykarki commented Dec 13, 2019

Same here with Pop!_OS 19.10

@moharsen
Copy link

Ditto. Ubuntu 18.04.

E: Failed to fetch http://packages.microsoft.com/repos/vscode/dists/stable/main/binary-amd64/Packages.bz2 File has unexpected size (156056 != 156065). Mirror sync in progress? [IP: 40.76.35.62 80]
Hashes of expected file:
- Filesize:156065 [weak]
- SHA512:12e6dffcd247d1ff067acfa61a3c4eb6078c326c2858feb4f6f141a1d809e22292a78282414a5c103038ea80bb63cd734c7516782c9809c341335083d4e7611b
- SHA256:c850f35f1979831ac75641978c397e51519fa22313598ec12bde5f52277044c0
- SHA1:1f65f4a7388c22bcf7b7f30fb7bc337c60d94b2e [weak]
- MD5Sum:4153a12e4a5629bfb14ed98f4c8ac234 [weak]
Release file created at: Thu, 12 Dec 2019 19:59:19 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

@xgdgsc
Copy link
Contributor

xgdgsc commented Dec 13, 2019

Same with Ubuntu 16.04

@scallensc
Copy link

Same 19.10

@pffang
Copy link

pffang commented Dec 13, 2019

Same with Ubuntu 16.04

@taoqf
Copy link

taoqf commented Dec 13, 2019

Debian 10

@qingwang237
Copy link

mint 19.2

@fitzypop
Copy link

same on Pop 19.10

@mrizkimaulidan
Copy link

E: Failed to fetch https://packages.microsoft.com/repos/vscode/dists/stable/main/binary-amd64/Packages.bz2  File has unexpected size (156056 != 156065). Mirror sync in progress? [IP: 13.76.190.189 443]
   Hashes of expected file:
    - Filesize:156065 [weak]
    - SHA512:12e6dffcd247d1ff067acfa61a3c4eb6078c326c2858feb4f6f141a1d809e22292a78282414a5c103038ea80bb63cd734c7516782c9809c341335083d4e7611b
    - SHA256:c850f35f1979831ac75641978c397e51519fa22313598ec12bde5f52277044c0
    - SHA1:1f65f4a7388c22bcf7b7f30fb7bc337c60d94b2e [weak]
    - MD5Sum:4153a12e4a5629bfb14ed98f4c8ac234 [weak]
   Release file created at: Thu, 12 Dec 2019 19:59:19 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

Same problem, Kali Linux Light

@gustavocipriani
Copy link

Same here. Ubuntu 18.04.3.

Reading package lists... Done
N: Skipping acquire of configured file 'contrib/binary-i386/Packages' as repository 'https://download.virtualbox.org/virtualbox/debian bionic InRelease' doesn't support architecture 'i386'
E: Failed to fetch https://packages.microsoft.com/repos/vscode/dists/stable/main/binary-amd64/Packages.bz2 File has unexpected size (156056 != 156065). Mirror sync in progress? [IP: 40.76.35.62 443]
Hashes of expected file:
- Filesize:156065 [weak]
- SHA512:12e6dffcd247d1ff067acfa61a3c4eb6078c326c2858feb4f6f141a1d809e22292a78282414a5c103038ea80bb63cd734c7516782c9809c341335083d4e7611b
- SHA256:c850f35f1979831ac75641978c397e51519fa22313598ec12bde5f52277044c0
- SHA1:1f65f4a7388c22bcf7b7f30fb7bc337c60d94b2e [weak]
- MD5Sum:4153a12e4a5629bfb14ed98f4c8ac234 [weak]
Release file created at: Thu, 12 Dec 2019 19:59:19 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

@mag911
Copy link

mag911 commented Dec 13, 2019

Same issue here with Debian Buster
Looks like a typo 156056 != 156065

@benizra-yahoo
Copy link

Same error with Linux Mint 19.1 Tessa

@IvanRoman
Copy link

Reporting in with the same issue. Ubuntu 18.04.3

@soominjung
Copy link

soominjung commented Dec 13, 2019

Similar error with 2 Ubuntu machines

  • VSCode Version: 1.40.1

  • OS Version:Ubuntu LTS 16.04

  • VSCode Version:1.41.1

  • OS Version:Ubuntu LTS 16.04

E: Failed to fetch http://packages.microsoft.com/repos/vscode/dists/stable/main/binary-amd64/Packages.bz2 Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.

@yankyhoffman
Copy link

yankyhoffman commented Dec 13, 2019

Ubuntu 19.10 here, however, I updated successfully within 30 minutes of the 1.41 release on my work PC which is also Ubuntu 19.10. getting the error now on my laptop. (Was able to install using the .deb. but still can't update using apt)

I am getting the issue for the dotnet core apt repo as well, so it might be microsofts servers...

[/etc/apt/sources.list.d]:$ ll
total 32K
-rw-r--r-- 1 root root  189 Oct 22 21:45 google-chrome.list
-rw-r--r-- 1 root root   50 Oct 22 21:45 insomnia.list
-rw-r--r-- 1 root root   76 Oct 22 21:45 linuxgndu-ubuntu-sqlitebrowser-eoan.list
-rw-r--r-- 1 root root   77 May  7  2019 microsoft-prod.list
-rw-r--r-- 1 root root   73 Oct 22 21:45 pgdg.list
-rw-r--r-- 1 root root 1.2K Oct 22 21:45 teamviewer.list
-rw-r--r-- 1 root root   67 Oct 22 21:45 teejee2008-ubuntu-ppa-eoan.list
-rw-r--r-- 1 root root  193 Dec 13 00:23 vscode.list

[/etc/apt/sources.list.d]:$ cat vscode.list 
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main

[/etc/apt/sources.list.d]:$ cat microsoft-prod.list 
deb [arch=amd64] https://packages.microsoft.com/ubuntu/19.04/prod disco main

[/etc/apt/sources.list.d]:$ sudo apt update 
Hit:1 http://us.archive.ubuntu.com/ubuntu eoan InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu eoan-updates InRelease                             
Hit:3 http://us.archive.ubuntu.com/ubuntu eoan-backports InRelease                           
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease                                 
Get:5 http://packages.microsoft.com/repos/vscode stable InRelease [3,959 B]                  
Get:6 https://packages.microsoft.com/ubuntu/19.04/prod disco InRelease [3,959 B]             
Get:7 http://security.ubuntu.com/ubuntu eoan-security InRelease [97.5 kB]                    
Hit:8 http://dl.google.com/linux/chrome/deb stable Release                                   
Ign:9 https://dl.bintray.com/getinsomnia/Insomnia  InRelease                                 
Get:10 https://dl.bintray.com/getinsomnia/Insomnia  Release [815 B]                          
Get:11 http://packages.microsoft.com/repos/vscode stable/main amd64 Packages [156 kB]        
Err:11 http://packages.microsoft.com/repos/vscode stable/main amd64 Packages              
  File has unexpected size (156056 != 156065). Mirror sync in progress? [IP: 40.76.35.62 80]
  Hashes of expected file:
   - Filesize:156065 [weak]
   - SHA512:12e6dffcd247d1ff067acfa61a3c4eb6078c326c2858feb4f6f141a1d809e22292a78282414a5c103038ea80bb63cd734c7516782c9809c341335083d4e7611b
   - SHA256:c850f35f1979831ac75641978c397e51519fa22313598ec12bde5f52277044c0
   - SHA1:1f65f4a7388c22bcf7b7f30fb7bc337c60d94b2e [weak]
   - MD5Sum:4153a12e4a5629bfb14ed98f4c8ac234 [weak]
  Release file created at: Thu, 12 Dec 2019 19:59:19 +0000
Hit:12 http://linux.teamviewer.com/deb stable InRelease                   
Get:13 https://packages.microsoft.com/ubuntu/19.04/prod disco/main amd64 Packages [156 kB]
Err:13 https://packages.microsoft.com/ubuntu/19.04/prod disco/main amd64 Packages
  File has unexpected size (23655 != 156065). Mirror sync in progress? [IP: 40.76.35.62 443]
  Hashes of expected file:
   - Filesize:156065 [weak]
   - SHA512:12e6dffcd247d1ff067acfa61a3c4eb6078c326c2858feb4f6f141a1d809e22292a78282414a5c103038ea80bb63cd734c7516782c9809c341335083d4e7611b
   - SHA256:c850f35f1979831ac75641978c397e51519fa22313598ec12bde5f52277044c0
   - SHA1:1f65f4a7388c22bcf7b7f30fb7bc337c60d94b2e [weak]
   - MD5Sum:4153a12e4a5629bfb14ed98f4c8ac234 [weak]
  Release file created at: Thu, 12 Dec 2019 19:59:19 +0000
Hit:14 http://apt.postgresql.org/pub/repos/apt eoan-pgdg InRelease
Fetched 102 kB in 1s (86.6 kB/s)
Reading package lists... Done
W: Conflicting distribution: https://packages.microsoft.com/ubuntu/19.04/prod disco InRelease (expected disco but got stable)
E: Failed to fetch http://packages.microsoft.com/repos/vscode/dists/stable/main/binary-amd64/Packages.bz2  File has unexpected size (156056 != 156065). Mirror sync in progress? [IP: 40.76.35.62 80]
   Hashes of expected file:
    - Filesize:156065 [weak]
    - SHA512:12e6dffcd247d1ff067acfa61a3c4eb6078c326c2858feb4f6f141a1d809e22292a78282414a5c103038ea80bb63cd734c7516782c9809c341335083d4e7611b
    - SHA256:c850f35f1979831ac75641978c397e51519fa22313598ec12bde5f52277044c0
    - SHA1:1f65f4a7388c22bcf7b7f30fb7bc337c60d94b2e [weak]
    - MD5Sum:4153a12e4a5629bfb14ed98f4c8ac234 [weak]
   Release file created at: Thu, 12 Dec 2019 19:59:19 +0000
E: Failed to fetch https://packages.microsoft.com/ubuntu/19.04/prod/dists/disco/main/binary-amd64/Packages.bz2  File has unexpected size (23655 != 156065). Mirror sync in progress? [IP: 40.76.35.62 443]
   Hashes of expected file:
    - Filesize:156065 [weak]
    - SHA512:12e6dffcd247d1ff067acfa61a3c4eb6078c326c2858feb4f6f141a1d809e22292a78282414a5c103038ea80bb63cd734c7516782c9809c341335083d4e7611b
    - SHA256:c850f35f1979831ac75641978c397e51519fa22313598ec12bde5f52277044c0
    - SHA1:1f65f4a7388c22bcf7b7f30fb7bc337c60d94b2e [weak]
    - MD5Sum:4153a12e4a5629bfb14ed98f4c8ac234 [weak]
   Release file created at: Thu, 12 Dec 2019 19:59:19 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

@imreverse
Copy link

same on KDE Neon 5.17

@RMacfarlane
Copy link
Contributor

I've contacted the linux repo team about this and am waiting for them to resolve it.

@RMacfarlane RMacfarlane self-assigned this Dec 13, 2019
@furai
Copy link

furai commented Dec 13, 2019

https://packages.microsoft.com/repos/vscode/dists/stable/InRelease
https://packages.microsoft.com/repos/vscode/dists/stable/Release
In these files values changed for

Origin: vscode stable
Label: vscode stable
Suite: stable
Codename: stable

That's probably why there are hash sum mismatches.

@tedlz
Copy link

tedlz commented Dec 13, 2019

same on Debian 10

@peter279k
Copy link

I've the same issue on Ubuntu 18.04.3 and 16.04.6 LTS.

@istinj
Copy link

istinj commented Dec 13, 2019

Same problem on Ubuntu Mate 18.04.03

@pieczarkazsolt
Copy link

pieczarkazsolt commented Dec 13, 2019

same here (ubuntu 19.10)

https://packages.microsoft.com/repos/vscode/dists/stable/main/binary-amd64/Packages.bz2  File has unexpected size (156354 != 156065). Mirror sync in progress? [IP: 13.74.252.37 443]
   Hashes of expected file:
    - Filesize:156065 [weak]
    - SHA512:12e6dffcd247d1ff067acfa61a3c4eb6078c326c2858feb4f6f141a1d809e22292a78282414a5c103038ea80bb63cd734c7516782c9809c341335083d4e7611b
    - SHA256:c850f35f1979831ac75641978c397e51519fa22313598ec12bde5f52277044c0
    - SHA1:1f65f4a7388c22bcf7b7f30fb7bc337c60d94b2e [weak]
    - MD5Sum:4153a12e4a5629bfb14ed98f4c8ac234 [weak]
   Release file created at: Thu, 12 Dec 2019 19:59:19 +0000

@emnovaes
Copy link

emnovaes commented Dec 13, 2019

But removing this file (vscode.list), will be created again?

@yankyhoffman
Copy link

yankyhoffman commented Dec 13, 2019

For all people trying to help by saying "remove the vscode.list file" don't forget, the issue created here is a vscode (Microsoft (as it applies to dotnet-core as well)) issue, not an apt issue, and removing the .list file will only allow us to update all other packages, vscode won't be updated unless the vscode.list file exists and works. (Yes I know we can install the update using the .deb, but that is not the issue here either)

@martindholmes
Copy link

Ditto Ubuntu 19.10.

@mainframed
Copy link

Same on Xubuntu Ubuntu 19.10

@pffang
Copy link

pffang commented Dec 13, 2019

Yeah, I am absolutely clear what the problem is, but also know how to solve it.
But I still come here and write down "Same on ...". This is just a euphemism to express: "Hey, you guys screwed up again."
Yeah, again and again.
You guys represent a great software company. Don't let me so dispoint. Just setup an automated test please.

I've been using vscode for quite a while and this is the only issue I've experienced so far. Pls, be patient.

Just google "vscode Has sum mismatch". You will know what I talk about.
I'm a programer. I understand and accept it has some bugs.
But, this is a small issue and easy to be discovered by automated test. I believe it's not difficult for them technically and resourceally.
They promised to improve it. But sadly, they didn't.

@Hellkyte
Copy link

Same 16.04 ... our ci/cd is failing trying to install the odbc drivers for sqlserver....

@franksmcb
Copy link

Issue exists on Ubuntu MATE 19 as well.

@urielhass
Copy link

same thing here Linux Mint 19.2 Cinnamon

@jorgechavez22
Copy link

on MX Linux the same. But i commented the repository url in /etc/apt/sources.list.d/vscode.list, then i could update without problem, for now.

@cbRoy
Copy link

cbRoy commented Dec 13, 2019

Ubuntu 18.04 brought me here to complain

@maurom
Copy link

maurom commented Dec 13, 2019

It seems the signed release file http://packages.microsoft.com/repos/vscode/dists/stable/InRelease (InRelease) is old and does not match the files on the repo.

URL=http://packages.microsoft.com/repos/vscode/dists/stable

curl -s $URL/InRelease | grep Packages.bz2 |head -1
 4153a12e4a5629bfb14ed98f4c8ac234   156065 main/binary-amd64/Packages.bz2   <-- wrong size
curl -s $URL/Release | grep Packages.bz2 |head -1
 de01bf2799b61b2a6eb891b6c6f173e1   156354 main/binary-amd64/Packages.bz2   <-- ok
curl -s -I $URL/main/binary-amd64/Packages.bz2 | grep Length
Content-Length: 156354   <-- real size

curl -s $URL/InRelease | grep Date
Date: Thu, 12 Dec 2019 19:59:19 UTC   <--- older
curl -s $URL/Release | grep Date
Date: Fri, 13 Dec 2019 14:15:54 UTC   <-- newer

@Hellkyte
Copy link

Looks like this might be fixed

Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Get:5 https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease [4,003 B]
Get:6 https://packages.microsoft.com/ubuntu/16.04/prod xenial/main amd64 Packages [110 kB]
Hit:7 https://packages.gitlab.com/runner/gitlab-runner/ubuntu xenial InRelease
Fetched 440 kB in 1s (232 kB/s)
Reading package lists... Done

@lodyman93
Copy link

Looks like this might be fixed

Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Get:5 https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease [4,003 B]
Get:6 https://packages.microsoft.com/ubuntu/16.04/prod xenial/main amd64 Packages [110 kB]
Hit:7 https://packages.gitlab.com/runner/gitlab-runner/ubuntu xenial InRelease
Fetched 440 kB in 1s (232 kB/s)
Reading package lists... Done

no it's not fixed yet

@aabouissa
Copy link

Same problem on Debian 10, but i removed currently the source list using:

sudo rm /etc/apt/sources.list.d/vscode.list

I'm waiting to fix this error.

@cbRoy
Copy link

cbRoy commented Dec 13, 2019

confirmed. not fixed.

@jasjuang
Copy link

Same problem here on Ubuntu 18.04.

@333fps
Copy link

333fps commented Dec 13, 2019

Fixed :)

@jasjuang
Copy link

For me, now sudo apt update shows

N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease' doesn't support architecture 'i386'

@hiagodotme
Copy link

Was with the same problem, apparently normalized.

@tommituura
Copy link

tommituura commented Dec 13, 2019

Working nicely now, xUbuntu 18.04.3. No changes by myself to any local apt source lists at any point.

@vazgen6
Copy link

vazgen6 commented Dec 13, 2019

Finally fixed, running GNU/Linux Mint (based on Ubuntu Bionic)

@RMacfarlane
Copy link
Contributor

This should now be fixed. Thanks everyone for your patience.

@gregorthebigmac
Copy link

I ... don't think this has to do with PGP key?

After re-reading my comment, I think it's a GPG key, but otherwise, yes. Are you sure you read the error output after running "sudo apt-get update"? Correct me if I'm wrong here, but that's what happens when you fuck up your PGP/GPG key and upload it to the apt repo. The hash key is fucked, and apt no longer trusts it because your key doesn't match the one in the repo. Now, you can choose to trust it anyway with "sudo apt-get --allow-unauthenticated upgrade" as per this explanation, but I wouldn't recommend that, because you can't guarantee it's coming from a trusted source (in this case, MS). This is why I instead told people to hold off on updating vscode until MS fixes it, and they already have.

@emnovaes
Copy link

resolved

@f3wenbo f3wenbo changed the title Failed to fetch due to Has sum mismatch Failed to fetch due to Hash sum mismatch Dec 14, 2019
@deyvisonrocha
Copy link

Snap install without problems.

@Tyriar
Copy link
Member

Tyriar commented Dec 30, 2019

FYI for a little more transparency, this happened because changes were pushed to the system that drives https://packages.microsoft.com/ (for the majority of MS Linux offerings) and they caused issues with metadata sync. We have similar issues periodically where some repo files don't regenerate without their team doing some manual intervention. Unfortunately all we (the VS Code team) can do is ping them when things go wrong and hope that the underlying problems get fixed eventually.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
install-update VS Code installation and upgrade system issues
Projects
None yet
Development

No branches or pull requests