Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

Minimal example failing on macOS M1 #465

@Vertexwahn

Description

@Vertexwahn

I get this error:

INFO: Invocation ID: a41cd297-0e7b-455b-8a16-4edceb21421f
INFO: Analyzed target //:browser_test_chromium-local (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /Users/vertexwahn/BazelDemos/intermediate/WebdriverDemoMinimal/BUILD.bazel:3:18: Creating runfiles tree bazel-out/darwin_arm64-fastbuild/bin/browser_test_chromium-local.sh.runfiles failed: build-runfiles failed: error executing command
(cd /private/var/tmp/_bazel_vertexwahn/2b5fd7fbf794ab41b41cacdaf2ebb972/execroot/main &&
exec env -
PATH='/Users/vertexwahn/Library/Caches/bazelisk/downloads/sha256/c3e8a47b9926adc305cacf64e6d17964dfa08c570c139a734e00c381bf38ba49/bin:/Users/vertexwahn/.rd/bin:/Users/vertexwahn/.local/bin:/Users/vertexwahn/Library/pnpm:/Users/vertexwahn/.nvm/versions/node/v14.20.0/bin:/Users/vertexwahn/Library/Python/3.8/bin:/opt/homebrew/opt/openjdk/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/vertexwahn/.rd/bin:/Users/vertexwahn/.local/bin:/Users/vertexwahn/Library/pnpm:/Users/vertexwahn/.nvm/versions/node/v14.20.0/bin:/Users/vertexwahn/Library/Python/3.8/bin:/opt/homebrew/opt/openjdk/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/vertexwahn/Library/Application Support/JetBrains/Toolbox/scripts:/Users/vertexwahn/go/bin:/Users/vertexwahn/Library/Application Support/JetBrains/Toolbox/scripts:/Users/vertexwahn/go/bin'
/var/tmp/_bazel_vertexwahn/install/d1c493495cc9599d12332f6800b1abcf/build-runfiles --allow_relative bazel-out/darwin_arm64-fastbuild/bin/browser_test_chromium-local.sh.runfiles_manifest bazel-out/darwin_arm64-fastbuild/bin/browser_test_chromium-local.sh.runfiles): Process exited with status 1: Process exited with status 1
/var/tmp/_bazel_vertexwahn/install/d1c493495cc9599d12332f6800b1abcf/build-runfiles (args bazel-out/darwin_arm64-fastbuild/bin/browser_test_chromium-local.sh.runfiles_manifest bazel-out/darwin_arm64-fastbuild/bin/browser_test_chromium-local.sh.runfiles): link or target filename contains space on line 176: 'main/external/org_chromium_chromium_macos_arm64/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Chromium Framework /private/var/tmp/_bazel_vertexwahn/2b5fd7fbf794ab41b41cacdaf2ebb972/external/org_chromium_chromium_macos_arm64/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Chromium Framework'

Target //:browser_test_chromium-local failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 3.008s, Critical Path: 0.02s
INFO: 5 processes: 5 internal.
FAILED: Build did NOT complete successfully

When I try build the following demo on macOS M1:

.bazelversion:

6.3.2

browser_test.py:

import unittest
from testing.web import webtest

class BrowserTest(unittest.TestCase):
  def setUp(self):
    self.driver = webtest.new_webdriver_session()

  def tearDown(self):
    try:
      self.driver.quit()
    finally:
      self.driver = None

  def testTitle(self):
    self.driver.get("https://www.python.org")
    self.assertEqual("Welcome to Python.org", self.driver.title)

if __name__ == "__main__":
  unittest.main()

BUILD.bazel:

load("@io_bazel_rules_webtesting//web:py.bzl", "py_web_test_suite")

py_web_test_suite(
    name = "browser_test",
    srcs = ["browser_test.py"],
    browsers = [
        "@io_bazel_rules_webtesting//browsers:chromium-local",
    ],
    local = True,
    deps = [
        "@io_bazel_rules_webtesting//testing/web",
    ],
)

WORKSPACE:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# Python first

SHA = "5868e73107a8e85d8f323806e60cad7283f34b32163ea6ff1020cf27abef6036"

VERSION = "0.25.0"

http_archive(
    name = "rules_python",
    sha256 = SHA,
    strip_prefix = "rules_python-{}".format(VERSION),
    url = "https://github.com/bazelbuild/rules_python/releases/download/{}/rules_python-{}.tar.gz".format(VERSION, VERSION),
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

http_archive(
    name = "io_bazel_rules_webtesting",
    sha256 = "41d500a97ad9621dcf92fcb0cd77916e517388b196e5c3f0e63c7753e983b2bb",
    strip_prefix = "rules_webtesting-4d7ec75d1cbb289f977b41638fc8b630bdf22bee",
    urls = [
        "https://github.com/bazelbuild/rules_webtesting/archive/4d7ec75d1cbb289f977b41638fc8b630bdf22bee/rules_webtesting.tar.gz",
    ],
)

load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")

web_test_repositories()

http_archive(
    name = "io_bazel_rules_go",
    sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
        "https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
    ],
)

load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")

go_rules_dependencies()

go_register_toolchains(version = "1.20.5")

http_archive(
    name = "bazel_gazelle",
    sha256 = "29218f8e0cebe583643cbf93cae6f971be8a2484cdcfa1e45057658df8d54002",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.32.0/bazel-gazelle-v0.32.0.tar.gz",
        "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.32.0/bazel-gazelle-v0.32.0.tar.gz",
    ],
)

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")

gazelle_dependencies()

load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.4.bzl", "browser_repositories")

browser_repositories(
    chromium = True,
    #firefox = True,
    #sauce = True,
)

load("@io_bazel_rules_webtesting//web:go_repositories.bzl", "go_internal_repositories", "go_repositories")

go_repositories()

go_internal_repositories()

load("@io_bazel_rules_webtesting//web:py_repositories.bzl", "py_repositories")

py_repositories()

load("@io_bazel_rules_webtesting//web:java_repositories.bzl", "java_repositories")

java_repositories()

Is macOS (with M1/ARM) not supported?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions