-
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
http_archive, unrecognized file mode for [Content_Types].xml: 0x80 #9236
Comments
Just ran into this, too. Windows 10, Bazel 0.23.1. |
I'm facing the same issue in Bazel 2.0.0. |
Hello, this issue is still in Bazel 3.2.0. A possible workaround is to use https://github.com/zaucy/rules_7zip instead of the native methods. @tomaszstrejczek let me know if you would be interested in a PR in rules_dotnet doing that, it's a bit intrusive as it includes a new third party, but gets the job done. Also it will not work for OSX. |
Fixes bazelbuild#9236. On a rare occasion a zip file contains files with the 0x80 attribute. From https://docs.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants A file that does not have other attributes set. This attribute is valid only when used alone. Closes bazelbuild#15260. PiperOrigin-RevId: 442825326 (cherry picked from commit aa2a1f3)
@bazel-io flag |
Fixes #9236. On a rare occasion a zip file contains files with the 0x80 attribute. From https://docs.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants A file that does not have other attributes set. This attribute is valid only when used alone. Closes #15260. PiperOrigin-RevId: 442825326 (cherry picked from commit aa2a1f3) Co-authored-by: Tom de Goede <[email protected]> Co-authored-by: Chenchu K <[email protected]>
@bazel-io fork 5.3.0 |
1 similar comment
@bazel-io fork 5.3.0 |
Description of the problem / feature request:
http_archive fails with the exception: java.io.IOException: Error extracting '2.2.0.zip': Unrecognized file mode for [Content_Types].xml: 0x80.
The same file is handled without any problems by common zip programs (winrar on Windows, unzip on Ubuntu).
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "failed",
urls = ["https://www.nuget.org/api/v2/package/Remotion.Linq/2.2.0"],
type = "zip",
)
BUILD:
genrule(
name = "foo",
srcs = ["@failed//:failed"],
outs = ["foo.h"],
cmd = "echo dummy",
)
What operating system are you running Bazel on?
Windows 10, Ubuntu
What's the output of
bazel info release
?release 0.28.0 (Windows), release 0.28.1 (ubuntu)
Have you found anything relevant by searching the web?
The problem is specific to a single file. However the file is a popular nuget package (Remotion.Linq)
Any other information, logs, or outputs that you want to share?
INFO: SHA256 (https://www.nuget.org/api/v2/package/Remotion.Linq/2.2.0) = ae93e9db1c878f626c4f2ea4dc5021963be5f393cd6b747d8eb572dd41b486f8
INFO: Call stack for the definition of repository 'failed' which is a http_archive (rule definition at /home/tomek/.cache/bazel/_bazel_tomek/c1626520042faac25914faf60d5e12fe/external/bazel_tools/tools/build_defs/repo/http.bzl:237:16):
ERROR: An error occurred during the fetch of repository 'failed':
java.io.IOException: Error extracting /home/tomek/.cache/bazel/_bazel_tomek/c1626520042faac25914faf60d5e12fe/external/failed/2.2.0.zip to /home/tomek/.cache/bazel/_bazel_tomek/c1626520042faac25914faf60d5e12fe/external/failed: Unrecognized file mode for [Content_Types].xml: 0x80
The text was updated successfully, but these errors were encountered: