Repository navigation
Closed
Milestone
Description
General summary/comments
The mirrors.json file expired about an hour ago, and stack is complaining about it.
Steps to reproduce
- start with no
~/.stackdirectory - run
stack setup(I'm using version 1.5.1)
Expected
Stack should have properly set up the local state necessary to create and build projects.
Actual
What actually happened.
$ stack setup
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
Downloading timestamp
Downloading snapshot
Downloading mirrors
Verification error: <repo>/mirrors.json is expired
Downloading root
Downloading timestamp
Downloading snapshot
Downloading mirrors
Verification error: <repo>/mirrors.json is expired
Downloading root
Downloading timestamp
Downloading snapshot
Downloading mirrors
Verification error: <repo>/mirrors.json is expired
Downloading root
Downloading timestamp
Downloading snapshot
Downloading mirrors
Verification error: <repo>/mirrors.json is expired
Downloading root
Downloading timestamp
Downloading snapshot
Downloading mirrors
Verification error: <repo>/mirrors.json is expired
Downloading root
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpcomplete.com/) ...VerificationErrorLoop [Right (VerificationErrorExpired (TargetPathRepo (Path "mirrors.json"))),Right (VerificationErrorExpired (TargetPathRepo (Path "mirrors.json"))),Right (VerificationErrorExpired (TargetPathRepo (Path "mirrors.json"))),Right (VerificationErrorExpired (TargetPathRepo (Path "mirrors.json"))),Right (VerificationErrorExpired (TargetPathRepo (Path "mirrors.json")))]
Stack version
$ stack --version
Version 1.5.1 x86_64
Compiled with:
- Cabal-1.24.2.0
- Glob-0.8.0
- HUnit-1.5.0.0
- MonadRandom-0.5.1
...
Method of installation
nix-env -i stack
Activity
jmitchell commentedon Jan 1, 2018
The file has apparently been updated and is set to expire in a year. If this is an automated process, can whoever manages the mirror file ensure it's scheduled to update before it expires?
snoyberg commentedon Jan 2, 2018
I can't explain the behavior here, I did nothing manually to change this. Perhaps this is just the behavior of the hackage-mirror-tool we're using (https://github.com/haskell-hvr/hackage-mirror-tool). I can't file an issue there, as I'm blocked by the author, but if you'd like to follow up there, I'd be interested in the result.
TravisCardwell commentedon Jul 1, 2019
I just ran into this issue for the first time, installing Stack on a VPS that has not had Stack installed before.
Reading in #3738 about the possibility of clock skew causing the issue, I confirmed that my time is correct:
Checking
mirrors.json, however, I see that it has an expiration of2019-06-30T23:59:59Z, which is about an hour in the past.At least in this case, it is an actual expiration.
On my desktop, which already has Stack installed, I do not receive an error, because the mirrors have already been configured. By copying the contents of
~/.stack/pantry/hackagefrom my working desktop to the VPS, I am able to (perhaps temporarily) get around the issue.BTW, I tried changing my timezone to one where it is still 2019-06-30, and I confirmed that it (correctly) results in the same expiration error.
System information:
prakhunov commentedon Jul 1, 2019
I'm currently in the middle of creating a Dockerfile for an isolated test run, and I too have just now run into the same issue.
Hopefully it will be fixed by tomorrow.
ProofOfKeags commentedon Jul 1, 2019
Happening here too.
snoyberg commentedon Jul 1, 2019
This is a problem on Hackage itself; the mirrors.json file there is marked as expired:
http://hackage.haskell.org/mirrors.json
We can't fix this in the FP Complete mirror, since we can't take one of their files and resign it with their keys. We can only mirror the original files, which are now expired.
So as I see it, we have two options:
Personally, I never bought the motivation around expiration files in the first place. And especially in Stack's usage of hackage-security, where we are typically setting specific snapshots which have pinned dependency versions and cryptographic hashes, I don't see an advantage.
Has anyone on this issue filed an upstream issue with the Hackage team?
snoyberg commentedon Jul 1, 2019
As a short term workaround, you can add the following to your
~/.stack/config.yamlfile to disable the expiry check:snoyberg commentedon Jul 1, 2019
I've opened up a Hackage issue for this:
haskell/hackage-server#834
I've also opened up a discussion issue for deciding how to change Stack's behavior, if at all: #4928
ChristophP commentedon Jul 1, 2019
Thank you
Ignore hackage-security expiry by default
gbaz commentedon Jul 1, 2019
Should be fixed now, if someone can verify.
TravisCardwell commentedon Jul 2, 2019
A test confirms that it is indeed fixed now.
The new expiration date is six months in the future:
googleson78 commentedon Jun 2, 2022
Seems to be expired again today?
balazs-lengyel commentedon Jun 2, 2022
Yes, seems like it expired at midnight.
balazs-lengyel commentedon Jun 2, 2022
This workaround still seems to work: