Skip to content

Commit

Permalink
Lock Chrome version in docker tests (#484)
Browse files Browse the repository at this point in the history
  • Loading branch information
oblador authored Oct 31, 2023
1 parent 02c143c commit e50e799
Showing 1 changed file with 8 additions and 2 deletions.
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',
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) {
throw e;
}
}
} else {
debug('No chrome docker instance to kill');
}
Expand Down

0 comments on commit e50e799

Please sign in to comment.