bazelbuild / bazelbuild/bazel

bazel fails with Failed to parse downloader config

Open
#22,104 8 comments 1 reaction 0 assignees View on GitHub
help wanted P2 team-ExternalDeps type: bug
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the bug:

During April, we encounter such a problem three times (on different machines): any bazel command fails locally for some developer with:

```
% bazel build //...
INFO: Invocation ID: 40c6fcdb-de05-4132-99f6-80ab60643974
ERROR: Failed to parse downloader config: bazel_downloader.cfg
```

Every time, it works good for everyone else, so, looks like a local problem.

At the end of March, we upgraded Bazel from 6.2.1 to 7.1.1.

Workaround that we found: restart Macbook.

Relevant part of our .bazelrc:

```
build --experimental_downloader_config=bazel_downloader.cfg
sync --experimental_downloader_config=bazel_downloader.cfg
query --experimental_downloader_config=bazel_downloader.cfg
```

bazel_downloader.cfg:

```
rewrite (github.com/.*) https://s3.mds.yandex.net/bazel-build/mirror/$1

block github.com
```

Any ideas, how to fix it? Or maybe some tips, how to debug the problem next time?

### Which category does this issue belong to?

_No response_

### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

_No response_

### Which operating system are you running Bazel on?

Mac OS

### What is the output of `bazel info release`?

release 7.1.1

### If `bazel info release` returns `development 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 HEAD` ?

_No response_

### Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

_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_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `bazel build //...` on macOS with Bazel 7.1.1, using the `.bazelrc` entries and `bazel_downloader.cfg` shown in the report. Compare behavior before and after the failure and collect diagnostics when restarting the Mac is not used. Done means identifying a reproducible cause and documenting a reliable fix or debugging procedure.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.