Skip to content
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

Lock Chrome version in docker tests #484

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions packages/target-chrome-docker/src/create-chrome-docker-target.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const waitOnCDPAvailable = (host, port) =>

function createChromeDockerTarget({
baseUrl = 'http://localhost:6006',
chromeDockerImage = 'yukinying/chrome-headless-browser-stable',
chromeDockerImage = 'yukinying/chrome-headless-browser-stable:100.0.4896.127',
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

chromeFlags = ['--headless', '--disable-gpu', '--hide-scrollbars'],
dockerNet = null,
dockerWithSudo = false,
Expand Down Expand Up @@ -180,7 +180,13 @@ function createChromeDockerTarget({
async function stop() {
if (dockerId) {
debug(`Killing chrome docker instance with id ${dockerId}`);
await execute(dockerPath, ['kill', dockerId]);
try {
await execute(dockerPath, ['kill', dockerId]);
} catch (e) {
if (e.toString().indexOf('No such container') === -1) {
Copy link
Owner Author

Choose a reason for hiding this comment

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

When the container crashes, failing to kill it obscured the real error.

throw e;
}
}
} else {
debug('No chrome docker instance to kill');
}
Expand Down
Loading