LucianoGanga/simple-headless-chrome

Can not connect with different port

Opened this issue · 0 comments

Hi guys!
I'm using this pm2 to make chrome available as service.

pm2 start google-chrome --name=chrome-9223
--interpreter none
--
--disable-translate
--disable-extensions
--disable-background-networking
--safebrowsing-disable-auto-update
--disable-sync
--metrics-recording-only
--disable-default-apps
--no-first-run
--remote-debugging-port=9223

But for somereason, if I run this code

const browser = new HeadlessChrome({ headless: true, launchChrome: false, chrome: { host: 'localhost', port: 9223, remote: true, }, browserlog: true });

Doesn't work! the console for this error show me this:
Error: connect ECONNREFUSED 127.0.0.1:9222
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1113:14)
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',

This work with port 9222 but any port that I try put there will always try to run in 9222. My idea is run three versions of chrome running in different ports but I don't know if is possible.

I'm using the version 4.3.10.

Thanks for any help!
image