hackage-security icon indicating copy to clipboard operation
hackage-security copied to clipboard

Weird transient "invalid hash" error

Open edsko opened this issue 10 years ago • 3 comments
trafficstars

I don't know why this happened, and I cannot reproduce it; but in the course of installing dependencies for some project I got

Invalid hash for <repo>/package/string-conversions-0.4.tar.gz

halfway the installation. The error did not reappear when re-running cabal install --only-dependencies .

edsko avatar Sep 16 '15 09:09 edsko

Do a few larger installs, see if something breaks. Apparently generics-sop also have an exception at some point (I have a scribble to that effect). If not reproducible, move back to phase 1.

edsko avatar Dec 18 '15 17:12 edsko

I've not seen this again, despite doing some larger installs. Moving milestone.

edsko avatar Jan 07 '16 16:01 edsko

I'm seeing this when running cabal new-update inside a docker container with ghc-8.2.2 and cabal-install-2.2.0.0

To reproduce, save this file as Dockerfile (or skip these first two steps and pull the image with docker pull mitchellsalad/ghc-8.2.2)

FROM ubuntu:16.04
ENV PATH "/opt/cabal/bin:/opt/ghc/bin:$PATH"
RUN apt-get update
RUN apt-get install -y software-properties-common
RUN apt-add-repository -y ppa:hvr/ghc
RUN apt-get update
RUN apt-get install -y cabal-install-2.2 ghc-8.2.2 zlib1g-dev

Build the image.

docker build . -t ghc-8.2.2

Run an ephemeral container.

docker run --rm -it ghc-8.2.2 bash

Run cabal new-update (this wants a cabal.project file for some reason).

touch cabal.project
cabal new-update

Output:

Config file path source is default config file.
Config file /root/.cabal/config not found.
Writing default configuration to /root/.cabal/config
Downloading the latest package list from hackage.haskell.org
Verification loop. Errors in order:
  Invalid hash for <repo>/01-index.tar.gz
  Invalid hash for <repo>/01-index.tar.gz
  Invalid hash for <repo>/01-index.tar.gz
  Invalid hash for <repo>/01-index.tar.gz
  Invalid hash for <repo>/01-index.tar.gz

mitchellwrosen avatar May 08 '18 23:05 mitchellwrosen