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

Verification error: Invalid hash for /01-index.tar.gz #3771

Open
kyp0717 opened this issue Jan 14, 2018 · 8 comments
Open

Verification error: Invalid hash for /01-index.tar.gz #3771

kyp0717 opened this issue Jan 14, 2018 · 8 comments

Comments

@kyp0717
Copy link

kyp0717 commented Jan 14, 2018

Hi,
I just upgraded to stack 1.6. When attempting to start a new project, I received the following error:

******** ERROR MSG **************
Downloading root
Downloading timestamp
Downloading snapshot
Downloading mirrors
Cannot update index (update failed twice)
Verification error: Invalid hash for /01-index.tar.gz
Downloading index
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpcomplete.com/) ...
.......

It process stall at the point above.

Thanks,
Ky

@kadoban kadoban changed the title stack error Verification error: Invalid hash for /01-index.tar.gz Jan 14, 2018
@kadoban
Copy link
Collaborator

kadoban commented Jan 14, 2018

Is this stack v1.6.3, do you know?

Also was just a one-time thing, or does it keep happening?

@mgsloan
Copy link
Contributor

mgsloan commented Jan 15, 2018

Pretty sure this is an upstream issue with hackage-security. I think I ran into similar. Not sure how it got resolved, I may have deleted some files in .stack/indices/Hackage.

@mgsloan mgsloan added this to the Support milestone Jan 15, 2018
@declension
Copy link

I had the same error, and indeed blowing away ~/.stack/indices/Hackage "solved" this 😄

@tfausak
Copy link
Contributor

tfausak commented Jan 26, 2018

I also ran into this problem. Here's the output I see:

> stack update
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/                                 
Downloading timestamp                                                                            
Downloading snapshot                                                                             
Downloading mirrors                                                                              
Updating index                                                                                   
Verification error: Invalid hash for <repo>/01-index.tar.gz                                      
Downloading root                                                                                 
Downloading timestamp                                                                            
Downloading snapshot                                                                             
Downloading mirrors                                                                              
Updating index                                                                                   
Verification error: Invalid hash for <repo>/01-index.tar.gz                                      
Downloading root                                                                                 
Downloading timestamp                                                                            
Downloading snapshot                                                                             
Downloading mirrors                                                                              
Cannot update index (update failed twice)                                                        
Downloading index                                                                                
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpcomplete.com/) ...

It hangs, apparently forever, on that last message. Killing it with Ctrl-C makes it go through the whole thing again. Killing it again with Ctrl-C actually exits. This is with Stack 1.6.3:

> stack --version
Version 1.6.3, Git revision b27e629b8c4ce369e3b8273f04db193b060000db (5454 commits) x86_64 hpack-0.20.0

As suggested, I tried running rm -r ~/.stack/indices/Hackage. That fixed it, but it still took a long time to finish the Updating package index Hackage step. Maybe I wasn't waiting long enough before.

@mgsloan
Copy link
Contributor

mgsloan commented Jan 26, 2018

It could be an issue with s3, but that seems unlikely. I've opened haskell/hackage-security#201

@mgsloan
Copy link
Contributor

mgsloan commented Jan 27, 2018

As mentioned by hvr, next time this happens it would be good to have copies of the invalid files for debugging purposes.

@tfausak
Copy link
Contributor

tfausak commented Jan 29, 2018

I briefly saved my ~/.stack/indices/Hackage to a .tar.gz file but then deleted it because it was about 220 MB. Sorry 😬

@kuznero
Copy link

kuznero commented Aug 2, 2018

I'm having same issue when etlas (eta-lang.org) is trying to unpack the file:

Config file path source is default config file.
Config file /home/user/.etlas/config not found.
Writing default configuration to /home/user/.etlas/config
Warning: No mirrors found for http://hackage.haskell.org/
Downloading the latest package lists from:
- hackage.haskell.org
- [email protected]/typelead/etlas-index
Updating binary package index.
Unexpected response 502for http://hackage.haskell.org/01-index.tar.gz%

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

6 participants