Skip to content

Verification error: <repo>/timestamp.json is expired error messages when running stack new my-project #3738

Closed

Description

@bluelotusflower147

General summary/comments

I run into an error after newly-installing Stack when I try to create a project using $ stack new my-project.

Steps to reproduce

  1. Install Stack using $ curl -sSL https://get.haskellstack.org/ | sh
  2. Start a new project using $ stack new my-project

Expected

I expect the my-project directory with files inside to be created without running into any error message.

Actual

my-project directory with files inside is created but I get a slew of error messages in the process:

$ stack new my-project --verbose
Version 1.6.3, Git revision b27e629b8c4ce369e3b8273f04db193b060000db (5454 commits) x86_64 hpack-0.20.0
2018-01-05 14:39:56.152263: [debug] Opening local template: "new-template.hsfiles"
@(Stack/New.hs:148:9)
2018-01-05 14:39:56.152613: [info] Downloading template "new-template" to create project "my-project" in my-project/ ...
@(Stack/New.hs:109:9)
2018-01-05 14:39:56.152680: [debug] Downloading /commercialhaskell/stack-templates/master/new-template.hsfiles
@(Network/HTTP/Download.hs:69:5)
2018-01-05 14:39:56.452830: [debug] Opening local template: "/home/suzil/.stack/templates/new-template.hsfiles"
@(Stack/New.hs:148:9)
2018-01-05 14:39:56.454512: [info] 
The following parameters were needed by the template but not provided: author-email, author-name, category, copyright, github-username
You can provide them in /home/suzil/.stack/config.yaml, like this:
templates:
  params:
    author-email: value
    author-name: value
    category: value
    copyright: value
    github-username: value
Or you can pass each one as parameters like this:
stack new my-project new-template -p "author-email:value" -p "author-name:value" -p "category:value" -p "copyright:value" -p "github-username:value"

@(Stack/New.hs:197:11)
2018-01-05 14:39:56.459300: [info] Looking for .cabal or package.yaml files to use to init the project.
@(Stack/Init.hs:74:5)
2018-01-05 14:39:56.461006: [info] Using cabal packages:
@(Stack/Solver.hs:545:5)
2018-01-05 14:39:56.461216: [info] - my-project/

@(Stack/Solver.hs:546:5)
2018-01-05 14:39:56.461486: [debug] Running hpack on /home/suzil/Documents/playground/my-project/package.yaml
@(Stack/PrettyPrint.hs:63:22)
2018-01-05 14:39:56.469391: [debug] hpack generated a modified version of /home/suzil/Documents/playground/my-project/my-project.cabal
@(Stack/PrettyPrint.hs:63:22)
2018-01-05 14:39:56.473650: [debug] Downloading snapshot versions file from https://s3.amazonaws.com/haddock.stackage.org/snapshots.json
@(Stack/Config.hs:158:5)
2018-01-05 14:39:57.171898: [debug] Done downloading and parsing snapshot versions file
@(Stack/Config.hs:160:5)
2018-01-05 14:39:57.172172: [info] Selecting the best among 12 snapshots...

@(Stack/BuildPlan.hs:430:5)
2018-01-05 14:39:57.172460: [debug] Decoding build plan from: /home/suzil/.stack/build-plan/lts-10.2.yaml
@(Stack/Snapshot.hs:150:5)
2018-01-05 14:39:57.172666: [debug] Trying to decode /home/suzil/.stack/build-plan-cache/lts-10.2.cache
@(Data/Store/VersionTagged.hs:66:5)
2018-01-05 14:39:57.176948: [debug] Success decoding /home/suzil/.stack/build-plan-cache/lts-10.2.cache
@(Data/Store/VersionTagged.hs:70:13)
2018-01-05 14:39:57.177282: [debug] Trying to decode /home/suzil/.stack/loaded-snapshot-cache/x86_64-linux/__snapshot_hints__/lts-10.2.cache
@(Data/Store/VersionTagged.hs:66:5)
2018-01-05 14:39:57.177358: [debug] Exception ignored when attempting to load /home/suzil/.stack/loaded-snapshot-cache/x86_64-linux/__snapshot_hints__/lts-10.2.cache: /home/suzil/.stack/loaded-snapshot-cache/x86_64-linux/__snapshot_hints__/lts-10.2.cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:84:9)
2018-01-05 14:39:57.177433: [debug] Failure decoding /home/suzil/.stack/loaded-snapshot-cache/x86_64-linux/__snapshot_hints__/lts-10.2.cache
@(Data/Store/VersionTagged.hs:73:13)
2018-01-05 14:39:57.177490: [debug] Trying to decode /home/suzil/.stack/indices/Hackage/01-index.cache
@(Data/Store/VersionTagged.hs:66:5)
2018-01-05 14:39:57.177570: [debug] Exception ignored when attempting to load /home/suzil/.stack/indices/Hackage/01-index.cache: /home/suzil/.stack/indices/Hackage/01-index.cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:84:9)
2018-01-05 14:39:57.177620: [debug] Failure decoding /home/suzil/.stack/indices/Hackage/01-index.cache
@(Data/Store/VersionTagged.hs:73:13)
2018-01-05 14:39:57.177776: [info] Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
@(Stack/PackageIndex.hs:309:24)
2018-01-05 14:39:57.179762: [info] Downloading timestamp                                         
@(Stack/PackageIndex.hs:309:24)
2018-01-05 14:39:57.902088: [info] Verification error: <repo>/timestamp.json is expired          
@(Stack/PackageIndex.hs:309:24)
2018-01-05 14:39:57.902253: [info] Downloading root                                              
@(Stack/PackageIndex.hs:309:24)
2018-01-05 14:39:58.051421: [info] Downloading timestamp                                         
@(Stack/PackageIndex.hs:309:24)
2018-01-05 14:39:58.192305: [info] Verification error: <repo>/timestamp.json is expired          
@(Stack/PackageIndex.hs:309:24)
2018-01-05 14:39:58.192706: [info] Downloading root                                              
@(Stack/PackageIndex.hs:309:24)
2018-01-05 14:39:58.339544: [info] Downloading timestamp                                         
@(Stack/PackageIndex.hs:309:24)
2018-01-05 14:39:58.475928: [info] Verification error: <repo>/timestamp.json is expired          
@(Stack/PackageIndex.hs:309:24)
2018-01-05 14:39:58.476295: [info] Downloading root                                              
@(Stack/PackageIndex.hs:309:24)
2018-01-05 14:39:58.803897: [info] Downloading timestamp                                         
@(Stack/PackageIndex.hs:309:24)
2018-01-05 14:39:58.937986: [info] Verification error: <repo>/timestamp.json is expired          
@(Stack/PackageIndex.hs:309:24)
2018-01-05 14:39:58.938318: [info] Downloading root                                              
@(Stack/PackageIndex.hs:309:24)
2018-01-05 14:39:59.087665: [info] Downloading timestamp                                         
@(Stack/PackageIndex.hs:309:24)
2018-01-05 14:39:59.220800: [info] Verification error: <repo>/timestamp.json is expired          
@(Stack/PackageIndex.hs:309:24)
2018-01-05 14:39:59.221117: [info] Downloading root                                              
@(Stack/PackageIndex.hs:309:24)
2018-01-05 14:39:59.417651: [error] Unable to load cabal files for snapshot                      
@(Stack/Snapshot.hs:386:11)
2018-01-05 14:39:59.418048: [error]                                                              
@(Stack/Snapshot.hs:393:15)
2018-01-05 14:39:59.418226: [error] ----                                                         
@(Stack/Snapshot.hs:394:15)
2018-01-05 14:39:59.418389: [error] Deleting cached snapshot file: /home/suzil/.stack/build-plan/lts-10.2.yaml
@(Stack/Snapshot.hs:395:15)
2018-01-05 14:39:59.418552: [error] Recommendation: try running again. If this fails again, open an upstream issue at:
@(Stack/Snapshot.hs:396:15)
2018-01-05 14:39:59.418731: [error] https://github.com/fpco/lts-haskell/issues/new               
@(Stack/Snapshot.hs:397:15)
2018-01-05 14:39:59.418883: [error] ----                                                         
@(Stack/Snapshot.hs:401:15)
2018-01-05 14:39:59.419032: [error]                                                              
@(Stack/Snapshot.hs:402:15)
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpcomplete.com/) ...VerificationErrorLoop [Right (VerificationErrorExpired (TargetPathRepo (Path "timestamp.json"))),Right (VerificationErrorExpired (TargetPathRepo (Path "timestamp.json"))),Right (VerificationErrorExpired (TargetPathRepo (Path "timestamp.json"))),Right (VerificationErrorExpired (TargetPathRepo (Path "timestamp.json"))),Right (VerificationErrorExpired (TargetPathRepo (Path "timestamp.json")))]

Stack version

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

Method of installation

I install stack using $ curl -sSL https://get.haskellstack.org/ | sh.

$ curl -sSL https://get.haskellstack.org/ | sh
Detected Linux distribution: ubuntu

Installing dependencies...

Reading package lists... Done
Building dependency tree       
Reading state information... Done
g++ is already the newest version (4:7.2.0-1ubuntu1).
gcc is already the newest version (4:7.2.0-1ubuntu1).
git is already the newest version (1:2.14.1-1ubuntu4).
gnupg is already the newest version (2.1.15-1ubuntu8).
libc6-dev is already the newest version (2.26-0ubuntu2).
libffi-dev is already the newest version (3.2.1-6).
libgmp-dev is already the newest version (2:6.1.2+dfsg-1).
make is already the newest version (4.1-9.1).
xz-utils is already the newest version (5.2.2-1.3).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-0ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Using generic bindist...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   628    0   628    0     0    628      0 --:--:--  0:00:01 --:--:--  613k
100 12.6M  100 12.6M    0     0  2157k      0  0:00:06  0:00:06 --:--:-- 3404k
Installing Stack to: /usr/local/bin/stack...

-------------------------------------------------------------------------------

Stack has been installed to: /usr/local/bin/stack

Activity

  1. changed the title [-]`<repo>/timestamp.json is expired` error messages when running `stack new my-project`[/-] [+]`Verification error: <repo>/timestamp.json is expired` error messages when running `stack new my-project`[/+] on Jan 2, 2018
  2. bluelotusflower147 commented on Jan 2, 2018

    @bluelotusflower147
    Author

    Resolved: I needed to run $ stack init before trying to run $ stack new my-project. Maybe this step could be added to the quick start documentation?

  3. kadoban commented on Jan 2, 2018

    @kadoban
    Collaborator

    That doesn't sound right. stack init and stack new do related but different jobs. stack init is certainly not required before stack new, at least it's not supposed to be.

    The only thing I notice odd in your log is that your system clock is pretty off, it's not 2018-01-05 yet anywhere in the world for a couple of days.

    This sounds quite similar to #3731 though, I wonder if we have a problem somewhere. Anyone know what's going on here?

  4. reopened this on Jan 2, 2018
  5. snoyberg commented on Jan 2, 2018

    @snoyberg
    Contributor

    I think your detection of the clock skew is probably the real issue here. I cannot reproduce on my system.

  6. kadoban commented on Jan 4, 2018

    @kadoban
    Collaborator

    Yeah I don't see any more reports like this coming in, and the time skew thing does seem like a reasonable explanation. So I suppose we can close this back up.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions