79225708

Date: 2024-11-26 07:32:00
Score: 1.5
Natty:
Report link

If you are getting "Error: connect ECONNREFUSED 127.0.0.1:21222" error while following hardkoded's solution (top voted solution), do this:

Start chrome on port 21222 with sudo, and connect it like this:

$ sudo <chrome_executable_path> --remote-debugging-port=21222;

Then in puppeteer do this:

const browserURL = 'http://127.0.0.1:21222';

const browser = await puppeteer.connect({browserURL});

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: rahul