-
Notifications
You must be signed in to change notification settings - Fork 131
Open
Description
Hello,
I use:
- nodejs: v22
- puppeteer version 24.16.2
- puppeteer-stream 3.0.22
- google-chrome-stable
and a dockerfile that I built (no-alpine), which works well on Mac and Linux.
I am trying to optimize my module (3.20 GB) by replacing it with Chromium, and for that I am using the “zenika/alpine-chrome:with-puppeteer” image + a few minor modifications.
Unfortunately, as soon as I run Docker on Linux, I get the following error:
/home/pptruser/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:102
#error = new Errors_js_1.ProtocolError();
^
ProtocolError: Protocol error (Extensions.loadUnpacked): 'Extensions.loadUnpacked' wasn't found
at <instance_members_initializer> (/home/pptruser/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:102:14)
at new Callback (/home/pptruser/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:106:16)
at CallbackRegistry.create (/home/pptruser/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:24:26)
at Connection._rawSend (/home/pptruser/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Connection.js:99:26)
at Connection.send (/home/pptruser/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Connection.js:90:21)
at CdpBrowser.installExtension (/home/pptruser/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Browser.js:203:47)
at /home/pptruser/app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserLauncher.js:174:36
at Array.map (<anonymous>)
at ChromeLauncher.launch (/home/pptruser/app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserLauncher.js:173:34)
at runNextTicks (node:internal/process/task_queues:65:5)
Node.js v22.20.0
My launch browser:
launchOptions = {
headless: 'new',
executablePath,
args: [
'--no-sandbox',
'--no-default-browser-check',
'--no-first-run',
'--disable-setuid-sandbox',
'--disable-dev-shm-usage',
'--enable-features=NetworkService,NetworkServiceInProcess',
'--window-position=0,0',
'--kiosk', // TRUE FULLSCREEN
`--window-size=${width},${height}`,
'--use-gl=egl', // or desktop
'--enable-gpu',
'--enable-accelerated-video-decode',
'--enable-accelerated-video-encode',
'--disable-software-rasterizer',
'--disable-sync',
`--user-data-dir=${this.userDataDir}`,
'--allowlisted-extension-id=jjndjgheafjngoipoacpjgeicjeomjli',
'--autoplay-policy=no-user-gesture-required',
'--alsa-output-device=default',
'--alsa-input-device=default',
],
defaultViewport: {
width,
height,
},
// protocolTimeout: 180000,
}
this.browser = await launch(puppeteer, launchOptions)
So, I try used yours examples (puppeteer-extra.js) but I have an error;
puppeteer-stream git:(main) ✗ ./docker.sh
[+] Building 0.9s (7/7) FINISHED docker:default
=> [internal] load build definition from Dockerfile
=> [internal] load metadata for docker.io/zenika/alpine-chrome:with-puppeteer
=> [internal] load .dockerignore
=> [internal] load build context
=> CACHED [1/2] FROM docker.io/zenika/alpine-chrome:with-puppeteer@sha256:ee10e24217aa27443e6b58da628f3b09ea9b814459915b8b62fe15a555f9692a 0.0s
=> [2/2] COPY . .
=> exporting to image
=> => naming to docker.io/library/puppeteer-stream
/usr/src/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:72
this._reject(callback, new Errors_js_1.TargetCloseError('Target closed'));
I've spent two days on it, but I can't find anything. If you have any suggestions, I'm all ears.
Thanks.
xarvel and nomad2102
Metadata
Metadata
Assignees
Labels
No labels