Because I'm running Puppeteer from a server where I need specific versions of Chrome I thought I would try to use only puppeteer-core. I mean, how specific is Puppeteer that it needs it own Chrome to work...?
So trying this with as minimal code as possible:
const puppeteer = require('puppeteer-core');
(async () => {
const browser = await puppeteer.launch({ executablePath: 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe' });
await browser.close();
})();
This just times out after 30 seconds with an exception. It manages to "find" Chrome since there is no error about that, but it cannot connect to the debugger. Only thing I can think of is port mismatch, but I thought that was one of the benefits of using Puppeteer - no handling of ports.
However, if I try this without Puppeteer, using chrome-launcher and chrome-remote-interface, I have no issues whatsoever.
Is Puppeteer so sensitive that it needs it's own installation of Chrome, or should it in theory work with the latest version?
Due to firewall issues it's not easy to test either, but I will go through the hoops if it's necessary for Puppeteer to only use it's own version of Chrome.
It should work but you need to make sure that the Chrome version is compatible with the Puppeteer version. https://pptr.dev/chromium-support
You can run with the env var
DEBUG=puppeteer:*
to get additional insights into why it does not work.