Skip to content

http_archive, unrecognized file mode for [Content_Types].xml: 0x80 #9236

@tomaszstrejczek

Description

@tomaszstrejczek

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):

  • /mnt/c/temp/repro/WORKSPACE:3:1
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3We're not considering working on this, but happy to review a PR. (No assignee)area-WindowsWindows-specific issues and feature requeststeam-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions