-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Bazel Unrecoverable Error with Capital Letters in SHA256 String #18291
Labels
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
type: bug
untriaged
Comments
sgowroji
added
the
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
label
May 3, 2023
iancha1992
pushed a commit
to iancha1992/bazel
that referenced
this issue
May 15, 2023
Fixes this crash when e.g. the `sha256` attribute is passed an upper case string: ``` Caused by: java.lang.IllegalArgumentException: Illegal hexadecimal character: D at com.google.common.hash.HashCode.decode(HashCode.java:360) at com.google.common.hash.HashCode.fromString(HashCode.java:346) at com.google.devtools.build.lib.bazel.repository.downloader.Checksum.fromString(Checksum.java:47) at com.google.devtools.build.lib.bazel.repository.starlark.StarlarkBaseExternalContext.validateChecksum(StarlarkBaseExternalContext.java:302) at com.google.devtools.build.lib.bazel.repository.starlark.StarlarkBaseExternalContext.downloadAndExtract(StarlarkBaseExternalContext.java:650) ... ``` Fixes bazelbuild#18291 Closes bazelbuild#18305. PiperOrigin-RevId: 529601921 Change-Id: I75deee47bcac80ee81603591c22f43d013ba0c29
fweikert
pushed a commit
to fweikert/bazel
that referenced
this issue
May 25, 2023
Fixes this crash when e.g. the `sha256` attribute is passed an upper case string: ``` Caused by: java.lang.IllegalArgumentException: Illegal hexadecimal character: D at com.google.common.hash.HashCode.decode(HashCode.java:360) at com.google.common.hash.HashCode.fromString(HashCode.java:346) at com.google.devtools.build.lib.bazel.repository.downloader.Checksum.fromString(Checksum.java:47) at com.google.devtools.build.lib.bazel.repository.starlark.StarlarkBaseExternalContext.validateChecksum(StarlarkBaseExternalContext.java:302) at com.google.devtools.build.lib.bazel.repository.starlark.StarlarkBaseExternalContext.downloadAndExtract(StarlarkBaseExternalContext.java:650) ... ``` Fixes bazelbuild#18291 Closes bazelbuild#18305. PiperOrigin-RevId: 529601921 Change-Id: I75deee47bcac80ee81603591c22f43d013ba0c29
keertk
pushed a commit
that referenced
this issue
Jun 5, 2023
Fixes this crash when e.g. the `sha256` attribute is passed an upper case string: ``` Caused by: java.lang.IllegalArgumentException: Illegal hexadecimal character: D at com.google.common.hash.HashCode.decode(HashCode.java:360) at com.google.common.hash.HashCode.fromString(HashCode.java:346) at com.google.devtools.build.lib.bazel.repository.downloader.Checksum.fromString(Checksum.java:47) at com.google.devtools.build.lib.bazel.repository.starlark.StarlarkBaseExternalContext.validateChecksum(StarlarkBaseExternalContext.java:302) at com.google.devtools.build.lib.bazel.repository.starlark.StarlarkBaseExternalContext.downloadAndExtract(StarlarkBaseExternalContext.java:650) ... ``` Fixes #18291 Closes #18305. PiperOrigin-RevId: 529601921 Change-Id: I75deee47bcac80ee81603591c22f43d013ba0c29 Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
type: bug
untriaged
Description of the bug:
If there is a capital letter present in the SHA256 string bazel crashes with the fatal error contained below. Some tools, specifically Get-FileHash on Windows return upper case SHA256 strings.
The
Illegal hexadecimal character
error message does not make it clear that the problem is that uppercase letters are not valid in a bazel SHA256 string.The code should either be updated so that letter case doesn't matter or the error message should specifically state that upper case letters are not accepted.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Fails:
Succeeds:
Which operating system are you running Bazel on?
Windows & MacOS
What is the output of
bazel info release
?6.1.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: