Skip to content

web testing: use "--no-sandbox" and implement some cleanup logic - #10058

Open
srawlins wants to merge 1 commit into
flutter:masterfrom
srawlins:web-test-again
Open

srawlins wants to merge 1 commit into
flutter:masterfrom
srawlins:web-test-again

Conversation

@srawlins

@srawlins srawlins commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

This issue was found while trying to enable some web tests on Linux on LUCI.

Linux web tests failed on LUCI, see the log. Apparently this is because on Ubuntu 24.04+ w/ AppArmor, we need to pass --no-sandbox.

Additionally this cleans up lifecycle/retry handling: save the ChromeDriver instance and call await chromedriver?.stop() (right now it is never stopped even on success, so retry: 3 retries all hit bind() failed: Address already in use (98) on port 4444), and make driver / devtoolsProcess nullable so tearDownAll doesn't throw LateInitializationError and leak processes when setUpAll fails.

@srawlins
srawlins requested a review from a team as a code owner October 29, 2026 21:22

@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 refactors the setup and teardown logic in web_compiler_test.dart to introduce a robust cleanUp helper and ensure resources are properly released if setup fails. It also adds the --no-sandbox flag for headless Linux environments. Feedback highlights a critical compilation error due to invalid Dart syntax (? prefix) when checking the CHROME_EXECUTABLE environment variable. Additionally, improvements are suggested to prevent exception masking during cleanup and to avoid using the null-assertion operator on chromedriver.

Comment thread packages/devtools_app/webdriver_test/web_compiler_test.dart
Comment thread packages/devtools_app/webdriver_test/web_compiler_test.dart
Comment thread packages/devtools_app/webdriver_test/web_compiler_test.dart

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant