-
Notifications
You must be signed in to change notification settings - Fork 60
[wasm][test-browser] Retry launching chrome if it fails on startup #343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When starting chrome via selenium+chromedriver, it seems to crash inexplicably (dotnet/runtime#43955). As a workaround, let's retry that a few times.
|
/cc @lewing @akoeplinger |
|
I don't think we should be adding We're definitely not running Chrome as root so I'm a bit hesitant to add this highly discouraged option. The retry should hopefully fix it too. |
| { | ||
| return (driverService, new ChromeDriver(driverService, options, _arguments.Timeout)); | ||
| } | ||
| catch (WebDriverException wde) when (wde.Message.Contains("exited abnormally") && retry_num < max_retries - 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we make this check for failed to start: exited abnormally so we don't accidentally retry other cases of abnormal exits, e.g. if the browser crashes due to some WASM bug while running tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is catching exceptions only while starting the browser, before any page gets opened.
|
We could also try passing the options puppeteer passes by default: https://github.com/puppeteer/puppeteer/blob/main/src/node/Launcher.ts#L159-L181 |
.. and remove `--no-sandbox`, as that seems to be discouraged in the docs.
|
I have removed |
When starting chrome via selenium+chromedriver, it seems to crash
inexplicably (dotnet/runtime#43955).
As a workaround, let's retry that a few times.
Also, adds
--no-sandboxfrom #340 .