Skip to content

karma_web_test ignores browser launch flags #595

Closed

Description

@clintharrison

🐞 bug report

Affected Rule

The issue is caused by the rule: karma_web_test

Is this a regression?

No

Description

Browser definitions in rules_webtesting (chromium-local.json as an example) have args that can be passed to the browser when launching. These are not used by the karma.conf.js which ultimately sets the flags used by the Karma launcher: https://github.com/bazelbuild/rules_nodejs/blob/master/packages/karma/karma.conf.js#L293.

🔬 Minimal Reproduction

The e2e tests reproduce this; in e2e/karma we see that Chromium is launched without either of the arguments in the chromium-local.json.

🌍 Your Environment

Operating System:

ProductName:	Mac OS X
ProductVersion:	10.14.3
BuildVersion:	18D109

Output of bazel version:

Build label: 0.23.1
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Mon Mar 4 10:40:32 2019 (1551696032)
Build timestamp: 1551696032
Build timestamp as int: 1551696032

Rules version (SHA):

2be3c7a0794f7771c0317e673799fbc1320eb036

Anything else relevant?

The context for needing this might help! On macOS Mojave, running Chromium when non-headless needs --no-sandbox otherwise Chromium Helper crashes and tabs can't render. I didn't dig into it too much, so there's likely a smaller subset of features we could disable to get it running.

Activity

  1. added a commit that references this issue on Jan 15, 2021
    9671291
  2. added a commit that references this issue on Nov 5, 2025
    5a58030
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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