bazelbuild / rules_webtesting

Bazel rules to allow testing against a browser with WebDriver.
Apache License 2.0
97 stars 56 forks source link

Chromium arm64 provided can't be executed due to spaces in its path. #438

Closed Serginho closed 2 years ago

Serginho commented 2 years ago

Description

Using browser @io_bazel_rules_webtesting//browsers:chromium-local. I'm getting the following error on my new M1 PRO macbook pro.

It seems it's caused by chromium framework execution path which contains spaces. Bazel has never supported spaces in paths.

Any workaround?

Error

link or target filename contains space on line 13521: 'org_chromium_chromium_macos_arm64/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Chromium Framework /private/var/tmp/_bazel_user/1278b7bdb66d5638f4b8805b0e51d711/external/org_chromium_chromium_macos_arm64/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Chromium Framework

Full error:

ERROR: /Users/user/project/project-web/src/app/shared/device/BUILD.bazel:68:24: Creating runfiles tree bazel-out/darwin_arm64-fastbuild/bin/src/app/shared/device/test_chromium-local.sh.runfiles failed: build-runfiles failed: error executing command
  (cd /private/var/tmp/_bazel_user/1278b7bdb66d5638f4b8805b0e51d711/execroot/project && \
  exec env - \
    PATH=/bin:/usr/bin:/usr/local/bin \
  /var/tmp/_bazel_user/install/634b8c3c6126994d7642cc4694627f2f/build-runfiles bazel-out/darwin_arm64-fastbuild/bin/src/app/shared/device/test_chromium-local.sh.runfiles_manifest bazel-out/darwin_arm64-fastbuild/bin/src/app/shared/device/test_chromium-local.sh.runfiles): Process exited with status 1: Process exited with status 1
/var/tmp/_bazel_user/install/634b8c3c6126994d7642cc4694627f2f/build-runfiles (args bazel-out/darwin_arm64-fastbuild/bin/src/app/shared/device/test_chromium-local.sh.runfiles_manifest bazel-out/darwin_arm64-fastbuild/bin/src/app/shared/device/test_chromium-local.sh.runfiles): link or target filename contains space on line 13521: 'org_chromium_chromium_macos_arm64/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Chromium Framework /private/var/tmp/_bazel_user/1278b7bdb66d5638f4b8805b0e51d711/external/org_chromium_chromium_macos_arm64/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Chromium Framework'

Target //src/app/shared/device:test_chromium-local failed to build

Versions

Bazel: 4.2.2 rules_nodejs: 4.4.6 Angular: 12

enigmatix commented 2 years ago

@Serginho , potential workaround that seems to work for us is this flag: https://docs.bazel.build/versions/main/command-line-reference.html#flag--experimental_inprocess_symlink_creation

Serginho commented 2 years ago

@enigmatix thank you very much! It works like a charm!