Open flyfhj opened 1 year ago
Try giving the headless argument to your chrome/chromium.
Usually --headless=new
on newer versions.
Try giving the headless argument to your chrome/chromium. Usually
--headless=new
on newer versions.
Hi,I use the following parameters:
await launch({
...
headless:'new',
...
But it still throws the same error.
The puppeteer-stream code overrides the headless launch option here
I believe the chrome extension needs the browser to launch with a "GUI" it to record the page.
So, setting it on the args
works as it uses a virtual GUI with the Ozone platform, and this is not overridden by puppeteer-stream.
await launch({
...
args: [
...
'--headless=new',
...
],
...
I have the same problem and also receive the error TimeoutError: waiting for target failed
on browser startup. @flyfhj Did you manage to solve that issue? @SamuelScheit Any insights into what's causing the issue?
Having the same issue. Any updates?
Having the same issue. Any updates? @jcuna
I am able to run it headless with this configuration:
const browser = await launch({
executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
defaultViewport: {
width: 1920,
height: 1080,
},
args: [
'--no-sandbox',
'--headless=new',
],
});
Hello, I am running the following script on a linux OS:
But it always throws the following exception:
timeout 30000ms exceeded
In order to be able to locate the problem, I added a log to the
waitForTarget
method innode_modules/puppeteer-core/lib/cjs/puppeteer/common/Browser.js
CODE:
The exception information is as follows:
Version:
node:v16.14.0 npm:8.3.1 os:Linux version 3.10.0-1160.66.1.el7.x86_64 puppeteer:19.2.2 puppeteer-stream:3.0.3 chrome:linux-1056772
Hope to get your help,Thanks!