[Bug] devtools plugin not working in headless mode
See original GitHub issueHi team!
I’ve started using the puppeteer-extra-plugin-devtools package for remote debugging but have found that when running headless I receive 404 errors when attempting to view pages at the tunnel url. When running headful everything works as expected however.
To reproduce the issue you can run the code below, visit the public tunnel url, enter the credentials. You’ll see something like the below screenshot:
But when clicking on one of the pages you’ll see the below 404 error.
Code Snippet
const puppeteer = require('puppeteer-extra');
const devtools = require('puppeteer-extra-plugin-devtools')();
puppeteer.use(devtools);
(async () => {
const browser = await puppeteer.launch({ headless: true });
await devtools.createTunnel(browser);
const page = await browser.newPage();
// this could be any url below, I just put a small example webpage to load as an example
await page.goto('https://meyerweb.com/eric/tools/dencoder/');
await page.waitForTimeout(60000);
await browser.close();
process.exit(0);
})();
I’m running recent versions of everything but have tried with some older versions of puppeteer and can’t get headless devtools to work. Also I run macOS but have had the same issue running on amazon linux 2.
Versions
System: OS: macOS 11.6 CPU: (16) x64 Intel® Core™ i9-9980HK CPU @ 2.40GHz Memory: 1.64 GB / 32.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.10.0 - /usr/local/bin/node Yarn: 1.22.4 - ~/.yarn/bin/yarn npm: 7.24.0 - /usr/local/bin/npm npmPackages: puppeteer: ^10.2.0 => 10.4.0 puppeteer-extra: ^3.1.18 => 3.2.1 puppeteer-extra-plugin-devtools: ^2.3.0 => 2.3.1 puppeteer-extra-plugin-stealth: ^2.7.10 => 2.8.1 puppeteer-page-proxy-abowcut: ^1.2.14 => 1.2.15
Thank you! Thank you for all of your hard work on these plugins, they really are the best and you guys are the best!
Issue Analytics
- State:
- Created 2 years ago
- Comments:18 (8 by maintainers)
Top GitHub Comments
Should be fixed in #567- thanks @abowcut 👍
@abowcut I would like a reply when you are available.