New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ignoreHTTPSErrors is not working when request interception is on #1159
Comments
Same issue here |
If you can use puppeteer without chrome headless, a solution seems to be the |
And actually the problem is here even if 'use strict';
const puppeteer = require('puppeteer');
const URL = "https://halva.khady.info/";
(async () => {
const args = [
"--disable-setuid-sandbox",
"--no-sandbox",
];
const options = {
args,
headless: true,
ignoreHTTPSErrors: false,
};
const browser = await puppeteer.launch(options);
const page = await browser.newPage();
await page.setRequestInterception(true);
page.on("request", (request) => {
if (request.resourceType === "image") {
request.abort();
} else {
request.continue();
}
});
await page.goto(URL, { timeout: 8000, waitUntil: "load" });
const html = await page.content();
console.log(html);
await page.close();
await browser.close();
})();
|
#1441 same as yours use this args: [
'--ignore-certificate-errors',
'--ignore-certificate-errors-spki-list '
] |
This work only when you launch puppeteer with BTW, the |
I have '--ignore-certificate-errors' in arguments and ignoreHTTPSErrors is TRUE, but receive ERR_CERT_AUTHORITY_INVALID error from Chromium. Url for example: 'https://ostin.com/ru/ru/' |
I have all those ignore flags on and interception on. I only get an ERR_CERT_AUTHORITY_INVALID when running the script against the box I'm on if it uses a self signed cert. If I hit the same box from another server, it works fine. |
Filed upstream: crbug.com/801426 |
This however does not resolve a current issue where chrome headless hangs in self signed ceritificate errors, even with these flags. It only works with `headless: false`, but should hopefully be fixed soon: puppeteer/puppeteer#1159 (comment)
Is there any progress? |
I ran into the same problem, worked around it by doing the following:
However, even with this work-around, I still think that the fix for this issue is super high priority. Thanks! |
This is a major problemo. Hope it gets fixed soon. |
Any update on this front? Looks like there is a solution using the chrome driver https://bugs.chromium.org/p/chromium/issues/detail?id=721739 and chrome 65/66 .
I'll try and find sometime to figure how to apply this to puppeteer/chrome dev tools. If anyone gets there before me please post it up. |
I'm having the same problem and the work-around given by kevinmu didn't work for me. It will run fine running on my linux virtualbox machine but will give a time-out running in a docker container. |
Is there any progress? |
This bug will be fixed once Chromium completes migration onto Network Service. As a workaround, network service could be enabled via a runtime flag Beware! NetworkService is not completed yet and doesn't pass all pptr tests. Still, the following works for me: const puppeteer = require('puppeteer');
const URL = "https://halva.khady.info/";
(async() => {
const browser = await puppeteer.launch({
args: ['--enable-features=NetworkService'],
headless: true,
ignoreHTTPSErrors: true,
});
const page = await browser.newPage();
await page.setRequestInterception(true);
page.on("request", (request) => {
if (request.resourceType === "Image")
request.abort();
else
request.continue();
});
await page.goto(URL, { timeout: 8000, waitUntil: "load" });
const html = await page.content();
console.log(html);
await page.close();
await browser.close();
})(); |
When I use this args: --enable-feature=NetworkService seems like I use '--no-sandbox',and proxy is not working,
|
@aslushnikov thanks for he info — I will give this a try tomorrow. Good to know a fix is on the roadmap! |
Thanks for the workaround with |
use google-chrome-unstable instead of puppeteer's chromium, setRequestInterception is working
|
Side effect of using |
Just tried I tested using the URL browser launch: goto: |
Why is it closed? Isn't it gonna be resolved? |
NetworkService seems to break setting and getting cookies as well |
Wow Wow Wow. The original issue from Chromium was just fixed! Yay! Let's get this stuff moving... |
This roll includes: - https://crrev.com/588420 - DevTools: teach request interception to work with Security.setIgnoreCertificateErrors Fixes puppeteer#1159.
Hi @aslushnikov, any ETA for this to be released? |
This roll includes: - https://crrev.com/588420 - DevTools: teach request interception to work with Security.setIgnoreCertificateErrors Fixes #1159.
@maZahaca: pptr 1.8.0 will be released on September, 6. |
Great job! |
Note: this is still an issue for those of us trying to run on Linux. See: https://bugs.chromium.org/p/chromium/issues/detail?id=877075 |
as @bluepeter mentioned its still an issue. |
Why is this issue being "aggressively closed?" Nobody there uses Mac OS? Not one person tested this on Unix-style systems? Not one of the above examples, with or without any special args[], works on Mac OS, not for secure sites nor for https sites. Puppeteer 1.17 & Chrome 76 |
@webhype The core issue was fixed and we added a test to make sure it doesn't regress. We run all our tests continuously on Mac, Linux and Windows - so yes, we fix across the variety of environments, including UNIX-style systems.
The https://halva.khady.info/ is down - so the example doesn't work any more. I just tried with https://expired.badssl.com/ instead and it worked. If something doesn't work for you - please file a new issue with a script that reproduces the problem. We'll be happy to help! |
@aslushnikov |
Seems to still be an issue
|
I am having same problem with https site, while running puppeteer in docker |
Did you find a solution? I still have the same problem with firefox |
What the shit, after so many bloody years, still the same issue. |
Steps to reproduce
Tell us about your environment:
What steps will reproduce the problem?
Just launch this code to see the problem:
What is the expected result?
With the request interception disabled:
What happens instead?
The text was updated successfully, but these errors were encountered: