Skip to content

Commit 1ec011c

Browse files
committed
fix: defaultFlags fix
1 parent 7016948 commit 1ec011c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/utils/chrome.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const Promise = require('bluebird');
22
const noop = require('lodash/noop');
33
const ChromeRemote = require('chrome-remote-interface');
44
const { encode } = require('64');
5-
const { Launcher } = require('chrome-launcher');
5+
const { Launcher, defaultFlags } = require('chrome-launcher');
66
const { HttpStatusError } = require('common-errors');
77
const clone = require('rfdc')({ proto: false, circles: false });
88
const debug = require('debug')('ms-printer:chrome');
@@ -54,6 +54,14 @@ class Chrome {
5454
handleSIGINT: false,
5555
}, restOpts);
5656

57+
// NOTE: this is a temporary workaround for
58+
// https://github.com/GoogleChrome/chrome-launcher/pull/162
59+
this.settings.ignoreDefaultFlags = true;
60+
this.settings.chromeFlags = [
61+
...defaultFlags(),
62+
...this.settings.chromeFlags,
63+
];
64+
5765
// use custom logger if provided
5866
this.log = logger || {
5967
info: (...args) => debug('[info]', ...args),

0 commit comments

Comments
 (0)