Skip to content

[web] Enable Firefox Skwasm UI CI suites, configure COI configs, and fail fast on loader rejections - #193187

Merged
auto-submit[bot] merged 11 commits into
flutter:masterfrom
kevmoo:skwasm-ci-suites-v2
Sep 25, 2026
Merged

auto-submit[bot] merged 11 commits into
flutter:masterfrom
kevmoo:skwasm-ci-suites-v2

Conversation

@kevmoo

@kevmoo kevmoo commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Enables the Firefox dart2wasm + skwasm UI test suites in Flutter Web Engine CI (Linux run firefox suites), configures cross-origin-isolated (COOP/COEP) run configurations for both Firefox and Safari, and prevents felt test suites from hanging silently for 12 minutes per test when _flutter.loader.load() rejects.

Part of #143603

Summary of Changes

  1. Enable Firefox dart2wasm + skwasm Suites in CI (felt_config.yaml & linux_web_engine_test.json):
    • Enables firefox-dart2wasm-skwasm-ui, firefox-coi-dart2wasm-skwasm-ui, and firefox-coi-dart2wasm-skwasm-skwasm in Linux run firefox suites.
    • Adds firefox-coi-wasm and safari-coi-wasm (cross-origin-isolated: true) run configurations and safari-coi-dart2wasm-skwasm-{ui,skwasm} test suite definitions.
    • Keeps desktop safari-dart2wasm-* suites at enable-ci: false until LUCI Mac tester bots upgrade from os=Mac-15.7 (macOS Sequoia 15.7.7 with desktop Safari 18.6, which lacks js-string builtins) to macOS 26.2+ (Safari 26.2+).
    • Adds skwasm to artifact-deps for firefox-fallbacks and safari-fallbacks.
  2. Headless Firefox Software WebGL, Xvfb Display, & Container Sandbox Configuration (firefox.dart):
    • Enables webgl.force-enabled and webgl.disable-fail-if-major-performance-caveat, and on CI (if (isCi)) sets gfx.webrender.software, security.sandbox.content.level = 0, LIBGL_ALWAYS_SOFTWARE=1, MOZ_DISABLE_*_SANDBOX=1, and spawns a virtual X11 display (Xvfb :99) when DISPLAY is unset so headless Firefox can initialize Mesa llvmpipe (swrast) WebGL2 inside GPU-less LUCI Linux containers.
  3. Cache ImageSource Dimensions Before Multi-Threaded Skwasm Worker Transfer (image_source.dart):
    • Captures width and height as final int fields on ImageBitmapImageSource and VideoFrameImageSource at construction time before worker.postMessage transfers and synchronously detaches the underlying JS object (width = 0, height = 0) on the main thread.
  4. Fail Fast on _flutter.loader.load() Rejections (test_platform.dart):
    • Enables verboseBuildSelection: true in _testBootstrapHandler and forwards _flutter.loader.load() Promise rejections (loadException) to window.parent (host.dart) so incompatible or failed builds fail immediately with diagnostic skippedBuilds warnings instead of timing out after 12 minutes per test.

Test Exemption

This PR contains configuration (felt_config.yaml), test runner infrastructure (test_platform.dart, firefox.dart), and generated Linux/Mac Engine builder JSON files to run Skwasm UI tests on Firefox. The PR itself enables test suites on LUCI.

@kevmoo
kevmoo marked this pull request as ready for review September 22, 2026 21:14

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds new test suites and configurations for running Dart2WASM and Skwasm tests on Firefox and Safari in CI, including cross-origin isolated (COI) variants. It also configures Firefox to force-enable WebGL and use software WebRender. Feedback suggests adding explanatory comments for the newly added Firefox user preferences to clarify that they enable software WebGL rendering on GPU-less CI runners.

Comment thread engine/src/flutter/lib/web_ui/dev/firefox.dart
@kevmoo kevmoo added the CICD Run CI/CD label Sep 22, 2026
@kevmoo
kevmoo changed the base branch from main to master September 22, 2026 21:24
@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@github-actions

Copy link
Copy Markdown

This pull request targets the main branch, but the primary branch for this repository is master.

Please change the base branch of this pull request to master.

See: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-base-branch-of-a-pull-request

@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. platform-web Web applications specifically team-web Owned by Web platform team labels Sep 22, 2026
Comment thread engine/src/flutter/lib/web_ui/dev/firefox.dart
@kevmoo kevmoo changed the title [web] Enable Safari and Firefox Skwasm UI suites in Engine CI [web] Enable Firefox Skwasm UI CI suites, configure COI configs, and fail fast on loader rejections Sep 23, 2026
@kevmoo

kevmoo commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

@harryterkelsen PTAL

@harryterkelsen harryterkelsen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread engine/src/flutter/lib/web_ui/dev/firefox.dart Outdated
Comment thread engine/src/flutter/lib/web_ui/dev/firefox.dart Outdated
@kevmoo

kevmoo commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

@harryterkelsen Thanks! Addressed both comments in 716fe166a95 (and Linux linux_web_engine passed on LUCI with the Xvfb :99 display setup). Could you flip the review status from Changes requested to Approve when you get a chance?

harryterkelsen
harryterkelsen previously approved these changes Sep 23, 2026

@harryterkelsen harryterkelsen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

harryterkelsen
harryterkelsen previously approved these changes Sep 23, 2026

@harryterkelsen harryterkelsen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but can we split out the ImageSource stuff into another PR please?

@harryterkelsen harryterkelsen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kevmoo

kevmoo commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

LGTM but can we split out the ImageSource stuff into another PR please?

it's needed so the tests pass! I'd rather keep it here!

@kevmoo kevmoo added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 23, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Sep 24, 2026
@auto-submit

auto-submit Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/193187, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@kevmoo kevmoo added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 25, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Sep 25, 2026
Merged via the queue into flutter:master with commit 5b41d8b Sep 25, 2026
30 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Sep 25, 2026
DanTup pushed a commit to DanTup/flutter that referenced this pull request Sep 28, 2026
…fail fast on loader rejections (flutter#193187)

Enables the Firefox `dart2wasm` + `skwasm` UI test suites in Flutter Web
Engine CI (`Linux run firefox suites`), configures cross-origin-isolated
(`COOP`/`COEP`) run configurations for both Firefox and Safari, and
prevents `felt` test suites from hanging silently for 12 minutes per
test when `_flutter.loader.load()` rejects.

Part of flutter#143603

### Summary of Changes

1. **Enable Firefox `dart2wasm` + `skwasm` Suites in CI
(`felt_config.yaml` & `linux_web_engine_test.json`)**:
- Enables `firefox-dart2wasm-skwasm-ui`,
`firefox-coi-dart2wasm-skwasm-ui`, and
`firefox-coi-dart2wasm-skwasm-skwasm` in `Linux run firefox suites`.
- Adds `firefox-coi-wasm` and `safari-coi-wasm` (`cross-origin-isolated:
true`) run configurations and `safari-coi-dart2wasm-skwasm-{ui,skwasm}`
test suite definitions.
- Keeps desktop `safari-dart2wasm-*` suites at `enable-ci: false` until
LUCI Mac tester bots upgrade from `os=Mac-15.7` (macOS Sequoia 15.7.7
with desktop Safari 18.6, which lacks `js-string` builtins) to macOS
26.2+ (Safari 26.2+).
- Adds `skwasm` to `artifact-deps` for `firefox-fallbacks` and
`safari-fallbacks`.
2. **Headless Firefox Software WebGL, `Xvfb` Display, & Container
Sandbox Configuration (`firefox.dart`)**:
- Enables `webgl.force-enabled` and
`webgl.disable-fail-if-major-performance-caveat`, and on CI (`if
(isCi)`) sets `gfx.webrender.software`, `security.sandbox.content.level
= 0`, `LIBGL_ALWAYS_SOFTWARE=1`, `MOZ_DISABLE_*_SANDBOX=1`, and spawns a
virtual X11 display (`Xvfb :99`) when `DISPLAY` is unset so headless
Firefox can initialize Mesa `llvmpipe` (`swrast`) WebGL2 inside GPU-less
LUCI Linux containers.
3. **Cache `ImageSource` Dimensions Before Multi-Threaded Skwasm Worker
Transfer (`image_source.dart`)**:
- Captures `width` and `height` as `final int` fields on
`ImageBitmapImageSource` and `VideoFrameImageSource` at construction
time before `worker.postMessage` transfers and synchronously detaches
the underlying JS object (`width = 0`, `height = 0`) on the main thread.
4. **Fail Fast on `_flutter.loader.load()` Rejections
(`test_platform.dart`)**:
- Enables `verboseBuildSelection: true` in `_testBootstrapHandler` and
forwards `_flutter.loader.load()` Promise rejections (`loadException`)
to `window.parent` (`host.dart`) so incompatible or failed builds fail
immediately with diagnostic `skippedBuilds` warnings instead of timing
out after 12 minutes per test.

## Test Exemption
This PR contains configuration (felt_config.yaml), test runner
infrastructure (test_platform.dart, firefox.dart), and generated
Linux/Mac Engine builder JSON files to run Skwasm UI tests on Firefox.
The PR itself enables test suites on LUCI.
DanTup pushed a commit to DanTup/flutter that referenced this pull request Sep 28, 2026
…fail fast on loader rejections (flutter#193187)

Enables the Firefox `dart2wasm` + `skwasm` UI test suites in Flutter Web
Engine CI (`Linux run firefox suites`), configures cross-origin-isolated
(`COOP`/`COEP`) run configurations for both Firefox and Safari, and
prevents `felt` test suites from hanging silently for 12 minutes per
test when `_flutter.loader.load()` rejects.

Part of flutter#143603

### Summary of Changes

1. **Enable Firefox `dart2wasm` + `skwasm` Suites in CI
(`felt_config.yaml` & `linux_web_engine_test.json`)**:
- Enables `firefox-dart2wasm-skwasm-ui`,
`firefox-coi-dart2wasm-skwasm-ui`, and
`firefox-coi-dart2wasm-skwasm-skwasm` in `Linux run firefox suites`.
- Adds `firefox-coi-wasm` and `safari-coi-wasm` (`cross-origin-isolated:
true`) run configurations and `safari-coi-dart2wasm-skwasm-{ui,skwasm}`
test suite definitions.
- Keeps desktop `safari-dart2wasm-*` suites at `enable-ci: false` until
LUCI Mac tester bots upgrade from `os=Mac-15.7` (macOS Sequoia 15.7.7
with desktop Safari 18.6, which lacks `js-string` builtins) to macOS
26.2+ (Safari 26.2+).
- Adds `skwasm` to `artifact-deps` for `firefox-fallbacks` and
`safari-fallbacks`.
2. **Headless Firefox Software WebGL, `Xvfb` Display, & Container
Sandbox Configuration (`firefox.dart`)**:
- Enables `webgl.force-enabled` and
`webgl.disable-fail-if-major-performance-caveat`, and on CI (`if
(isCi)`) sets `gfx.webrender.software`, `security.sandbox.content.level
= 0`, `LIBGL_ALWAYS_SOFTWARE=1`, `MOZ_DISABLE_*_SANDBOX=1`, and spawns a
virtual X11 display (`Xvfb :99`) when `DISPLAY` is unset so headless
Firefox can initialize Mesa `llvmpipe` (`swrast`) WebGL2 inside GPU-less
LUCI Linux containers.
3. **Cache `ImageSource` Dimensions Before Multi-Threaded Skwasm Worker
Transfer (`image_source.dart`)**:
- Captures `width` and `height` as `final int` fields on
`ImageBitmapImageSource` and `VideoFrameImageSource` at construction
time before `worker.postMessage` transfers and synchronously detaches
the underlying JS object (`width = 0`, `height = 0`) on the main thread.
4. **Fail Fast on `_flutter.loader.load()` Rejections
(`test_platform.dart`)**:
- Enables `verboseBuildSelection: true` in `_testBootstrapHandler` and
forwards `_flutter.loader.load()` Promise rejections (`loadException`)
to `window.parent` (`host.dart`) so incompatible or failed builds fail
immediately with diagnostic `skippedBuilds` warnings instead of timing
out after 12 minutes per test.

## Test Exemption
This PR contains configuration (felt_config.yaml), test runner
infrastructure (test_platform.dart, firefox.dart), and generated
Linux/Mac Engine builder JSON files to run Skwasm UI tests on Firefox.
The PR itself enables test suites on LUCI.
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Sep 29, 2026
…#13060)

Manual roll Flutter from 4fcd90be0045 to c5a061b18fa2 (222 revisions)

Manual roll requested by [email protected]

flutter/flutter@4fcd90b...c5a061b

2026-09-28 [email protected] [cross imports] navigator_test.dart (flutter/flutter#190954)
2026-09-28 [email protected] Revert: Reland: Only render views that need to be rendered  (flutter/flutter#193360)
2026-09-28 [email protected] ci(bringup): android_intent_security_test is green (flutter/flutter#193469)
2026-09-28 [email protected] Sync CHANGELOG.md from stable (flutter/flutter#193020)
2026-09-28 [email protected] Roll Fuchsia Linux SDK from ukukV5lEkKabtOATk... to QdgqP02_cYpRQQQNN... (flutter/flutter#193454)
2026-09-28 [email protected] Roll pub packages (flutter/flutter#193460)
2026-09-28 [email protected] Un-nest sceneBuildDuration and windowRenderDuration in web SceneBuilderRecorder (flutter/flutter#193260)
2026-09-28 [email protected] Fix unresolved doc comment references in dev/integration_tests and dev/benchmarks (flutter/flutter#193433)
2026-09-28 [email protected] Roll Packages from e55e7ac to ba0364a (9 revisions) (flutter/flutter#193450)
2026-09-28 [email protected] [tool] Require explicit dependency injection for FlutterDevice and FlutterDevice.create (flutter/flutter#192830)
2026-09-28 [email protected] Roll pub packages (flutter/flutter#193442)
2026-09-28 [email protected] [flutter_tools] Include data assets from hooks when pubspec.yaml is empty (flutter/flutter#193434)
2026-09-28 [email protected] Roll pub packages (flutter/flutter#193438)
2026-09-28 [email protected] Fix unresolved doc comment references in Material and Cupertino (flutter/flutter#193283)
2026-09-28 [email protected] Fix doc references to Material and Cupertino in the widgets library and its tests (flutter/flutter#193334)
2026-09-26 [email protected] wasm: enforce WasmGC opt-in capability checks and Firefox < 147 guard (flutter/flutter#193180)
2026-09-26 [email protected] [Android] Refuse external setters of engine entrypoint and cached engine arguments via `Intent`s (flutter/flutter#190249)
2026-09-26 [email protected] [web] Unskip TextPainter.getWordBoundary test (flutter/flutter#193378)
2026-09-26 [email protected] Specify non-obvious types in pattern variable declarations (flutter/flutter#192632)
2026-09-26 [email protected] Removes feedback loop from advanced filters without offscreen msaa and framebufferfetch (flutter/flutter#193306)
2026-09-26 [email protected] [web] Unskip 8 passing image tests in painting and rendering (flutter/flutter#193377)
2026-09-26 [email protected] Revert: Allow resetting test invariants in `addTearDown` (flutter/flutter#193383)
2026-09-25 [email protected] [tool] Migrate CoverageCollector to modular dependency injection (flutter/flutter#192924)
2026-09-25 [email protected] Fix more unresolved doc comment references (flutter/flutter#193336)
2026-09-25 [email protected] Allow resetting test invariants in `addTearDown` (flutter/flutter#192082)
2026-09-25 [email protected] [a11y] Add a semantics role for slider (flutter/flutter#193324)
2026-09-25 [email protected] Fix plugin tests after Pigeon plugin template changes (flutter/flutter#193302)
2026-09-25 [email protected] [Android 17] Bump Standard Test Apps in flutter/flutter to AGP 9.3.1 (flutter/flutter#193263)
2026-09-25 [email protected] SSBO-based gradients in UberSDF (flutter/flutter#192962)
2026-09-25 [email protected] [Linux] Handle FlView being destroyed before rendering is complete. (flutter/flutter#193268)
2026-09-25 [email protected] [flutter_tools] Handle Windows reserved characters in test target path (flutter/flutter#191900)
2026-09-25 [email protected] docs(tools): nit: say hook/build.dart in CMake native assets comment (flutter/flutter#192205)
2026-09-25 [email protected] [web] Enable Firefox Skwasm UI CI suites, configure COI configs, and fail fast on loader rejections (flutter/flutter#193187)
2026-09-25 [email protected] [Android 17] Bumped Engine Dependencies to 9.3.1 (flutter/flutter#193265)
2026-09-25 [email protected] [web] Omit group role on menu scrollables and assign region role to named routes (flutter/flutter#192965)
2026-09-25 [email protected] Roll Skia from 8eedeed98e79 to f441ca223b2b (5 revisions) (flutter/flutter#193353)
2026-09-25 [email protected] Roll Fuchsia Linux SDK from EbPpoJW-Lnsu-8dyZ... to ukukV5lEkKabtOATk... (flutter/flutter#193326)
2026-09-25 [email protected] Roll Packages from 431ea69 to e55e7ac (6 revisions) (flutter/flutter#193351)
2026-09-25 [email protected] Support DynamicLibrary.codeAsset in Flutter (flutter/flutter#188947)
2026-09-25 [email protected] Roll Dart SDK from 75d9e87d4e3d to 0e7642b85457 (1 revision) (flutter/flutter#193346)
2026-09-25 [email protected] Exclude iOS PRs from macOS link (flutter/flutter#193315)
2026-09-25 [email protected] Roll Skia from 6357608543ec to 8eedeed98e79 (4 revisions) (flutter/flutter#193341)
2026-09-25 [email protected] Roll Dart SDK from d3aedb186aab to 75d9e87d4e3d (3 revisions) (flutter/flutter#193335)
2026-09-25 [email protected] Cache the paint offset adjusted line metrics in TextPainter (flutter/flutter#191223)
...
gmackall pushed a commit to gmackall/flutter that referenced this pull request Sep 30, 2026
…flutter#193510)

Follow-up to flutter#193187.

`Firefox._ensureLinuxDisplay()` previously spawned a detached `Xvfb :99`
process if `/tmp/.X11-unix/X99` did not exist. When Swarming terminates
a task with `SIGKILL`, the detached `Xvfb :99` dies without unlinking
`/tmp/.X11-unix/X99` or `/tmp/.X99-lock` on the persistent host `/tmp`.
Because `File('/tmp/.X11-unix/X99').existsSync()` returns `true` for a
dead Unix domain socket inode, subsequent `felt` runs on that bot skip
starting `Xvfb` and pass a dead `DISPLAY=:99` to headless Firefox,
causing `firefox-dart2wasm-skwasm-ui` to fail with:

```
Flutter Web: build dart2wasm/skwasm was skipped: Skwasm requires WebGL support; this browser does not provide it.
Flutter Web: no compatible build found for this browser.
```

Example CI failures:
- https://ci.chromium.org/b/8669380038177002257 (parent:
https://ci.chromium.org/b/8669382164984858001)
- https://ci.chromium.org/b/8669393954254325569 (parent:
https://ci.chromium.org/b/8669396677649449377)

This change:
1. Launches `Xvfb` with `-displayfd 1` instead of hardcoding `:99`,
letting `Xvfb` pick an unused display (recovering automatically from
stale dead sockets) and report the display number on stdout once ready
to accept connections.
2. Runs `Xvfb` as a managed child process and terminates it in
`FirefoxEnvironment.cleanup()` (invoked inside `RunSuiteStep.run()`'s
`finally` block).

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant in-code documentation (doc comments with
`///`).
- [ ] If this PR introduces a new feature or capability, I created and
linked a website documentation issue or PR in [flutter/website] (or
verified none is needed).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[flutter/website]: https://github.com/flutter/website
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
@kevmoo
kevmoo deleted the skwasm-ci-suites-v2 branch October 8, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD engine flutter/engine related. See also e: labels. platform-web Web applications specifically team-web Owned by Web platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants