lucacasonato/deno-puppeteer

Adding `{headless:false}` to readme examples when using Chrome makes them hang for 30 seconds and then throw a `TimeoutError` (browser doesn't launch)

Opened this issue · 3 comments

I've tried this on my own machine (PopOS 20.04), and on a completely fresh installation of Ubuntu 20.04. I'm using the example.js script from the readme. It works fine without the {headless:false}, and Node.js has no troubles with the {headless:false}. Also, it's only a problem for Chrome - Firefox works fine.

Perhaps headful mode is not supported and the readme just needs to be updated to communicate this?

My exact steps on the fresh Ubuntu install were:

  1. Install Deno with curl -fsSL https://deno.land/x/install/install.sh | sh
  2. Install Chrome with PUPPETEER_PRODUCT=chrome deno run -A --unstable https://deno.land/x/puppeteer@16.2.0/install.ts
  3. Copy example.js code from readme
  4. Run PUPPETEER_PRODUCT=chrome deno run -A --unstable example.js to confirm that it works without {headless:false} (it does)
  5. Add {headless:false} and try again

And at step 5 it gives the TimeoutError:

error: Uncaught TimeoutError: Timed out after 30000 ms while trying to connect to the browser! Only Chrome at revision r1022525 is guaranteed to work.
    throw new TimeoutError(
          ^
    at https://deno.land/x/puppeteer@16.2.0/src/deno/BrowserRunner.ts:163:11
    at Object.action (deno:ext/web/02_timers.js:148:13)
    at handleTimerMacrotask (deno:ext/web/02_timers.js:65:12)

I've confirmed that it did download r1022525 - at least according to the logs produced by the install.ts script.

same problem

got the same problem on my machine
Arch Linux 6.1.23-arch1-1
deno 1.31.1
chrome 1022525

might a linux problem. i also got the problem with devtools: true

I have the same issue

I assume that puppeteer.launch does not work
It will be very useful to get the Error from puppeteer to resolve the issue myself...

works fine with {headless: true}