Szpadel / chrome-headless-render-pdf

223 stars 67 forks source link

Waiting for chrome to became available #11

Open bkopin-bfg opened 7 years ago

bkopin-bfg commented 7 years ago

I got following error: `Using /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome Waiting for chrome to became available events.js:160 throw er; // Unhandled 'error' event ^

Error: spawn /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome ENOENT at exports._errnoException (util.js:1022:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32) at onErrorNT (internal/child_process.js:359:16) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9)`

chrome version 60.0.3112.113

Szpadel commented 7 years ago

can you maybe check if reverting changes from #1 solves this issue?

mikefogg commented 6 years ago

@Szpadel I'm getting the same error now, is there any info you need that would help?

firvida commented 1 year ago

I'm getting this error in Manjaro

jacobkauffmann commented 1 year ago

For me, it stops at "Waiting for chrome to became available". This is on MacOS Monterey with Chrome 107.0.5304.87. It stopped working a few days ago. I can see that Chrome is starting in the process manager. Port 9222 stays closed, though. If I manually start a Chrome instance with remote debugging, the port opens, but the script stays stuck at "Waiting for..."

As a workaround, it works for some time after restarting the computer. I have no idea why it stops working at some point.

Edit: not true, restarting does not fix the problem. I also tried Canary and Chromium, both don't work. However, I get a line "Chrome port open!" after every 15 minutes or so.

winterstein commented 1 year ago

I'm also seeing this issue -- on Linux Mint with up-to-date Chrome.

firvida commented 1 year ago

In my case the reason was that chrome binds to the IPv6 interface, while the client is trying to connect to "localhost" using the IPv4 interface. The solution is to remove "localhost" from resolving IPv6.

In /etc/hosts

Standard host addresses

::1 ip6-localhost ip6-loopback 127.0.0.1 localhost