I recently started using modules in Go, but I frequently encounter issues where everything works fine on one machine, but a checksum mismatch is encountered when building the codebase on another machine.
The issue always concerns the same third party dependency (github.com/ericlagergren/decimal):
go: verifying github.com/ericlagergren/[email protected]: checksum mismatch
downloaded: h1:HQGCJNlqt1dUs/BhtEKmqWd6LWS+DWYVxi9+Jo4r0jE=
go.sum: h1:x4oNpFLLl+8l+iLgksNHzZewTS0SKp6m0hlLwzXRbqA=
I've tried various things: removing & regenerating go.sum
, upgrading Go itself to the latest patch version and removing the dependency from go.mod
but nothing seems to fix this issue.
Does anyone have an idea how to fix this issue?
If you encounter a checksum mismatch error, delete go. sum, execute go clean -modcache , and then execute go mod download . That's what I did, and after that, no more errors were reported. When I commit the new go.
A checksum mismatch is what happens when a file on the client and on the server are not identical. When players get this error it can be for various reasons, but most commonly they are: A recent Assetto Corsa update has not been applied to either the client or server.
The go. sum file may contain hashes for multiple versions of a module. The go command may need to load go. mod files from multiple versions of a dependency in order to perform minimal version selection. go. sum may also contain hashes for module versions that aren't needed anymore (for example, after an upgrade).
You can run go clean -modcache
and then go mod tidy
which will re-download all deps with the correct checksum (this updates the pkg cache in $GOPATH/pkg/mod/
).
To update vendor/
folder run: go mod vendor
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With