question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Certificates error using puppeteer

See original GitHub issue

Hello,

I encountered a weird ssl problem using puppeeter 1.2.0 or 1.3.0 (inside a container).

Looking at this example (works on https://try-puppeteer.appspot.com/)

const browser = await puppeteer.launch({
  ignoreHTTPSErrors: true,
  headless: true
});

const page = await browser.newPage();


await Promise.all([
  page.waitForNavigation({timeout: 30000, waitUntil: 'networkidle2'}),
  page.goto('http://www.latabledarc.com/trianon-assiette-a-pain.html')
]);

await Promise.all([
  page.waitFor(5000),
  page.click('#product-addtocart-button')
]);

await Promise.all([
  page.waitForNavigation({timeout: 30000, waitUntil: 'networkidle2'}),
  page.goto('https://www.latabledarc.com/checkout/onepage/')
]);

console.log(await page.url());

await browser.close();

The problem is that I get the following error

Error running your code. Error: net::ERR_CERT_AUTHORITY_INVALID

Instead of to be allowed to navigate on the target url.

But if I try this in my browser everything is fine. The website has a valid ssl certificate.

On my local environment I get the following message using dumpio :

0414/115606.318905:ERROR:nss_ocsp.cc(597)] No URLRequestContext for NSS HTTP handler. host: cacerts.thawte.com
[0414/115606.318962:ERROR:cert_verify_proc_nss.cc(980)] CERT_PKIXVerifyCert for www.latabledarc.com failed err=-8179

And this seems not to be the only website wich is affected by this problem.

Any clue ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:14
  • Comments:25

github_iconTop GitHub Comments

47reactions
evidanacommented, Apr 24, 2018

You can also set an args array inside the launch config

args: [ '--ignore-certificate-errors' ]

I have noticed that this only seems to work when headless if false.

14reactions
jrivera2000tmtcommented, Apr 27, 2018

Anyone seen a workaround for this? We’ve been banging our heads around this issue for a long while…

Read more comments on GitHub >

github_iconTop Results From Across the Web

ignore-certificate-errors + headless puppeteer+google cloud
The website I am trying to access has ssl certificate-errors. I am using this version of puppeteer "puppeteer": "1.13.0" .
Read more >
How to Ignore Certificate Errors in Puppeteer - tekloon
If you're running your puppeteer in non-headless mode. You might encounter the error when the website experiences certificate invalid errors.
Read more >
SSL certificate in puppeteer - Educative.io
You can use Puppeteer to get the security details of a request, including information about the SSL certificate. As of puppeteer v1.7.0, you...
Read more >
How to disable SSL certificate verification in Pyppeteer
How to disable SSL certificate verification in Pyppeteer. If you see an error message like.
Read more >
SSL AIA does not seem to be followed on Headless on Linux
Basically, going to a website with an incomplete certificate chain such as ... dev-tools without Puppeteer) fail to follow the AIA and die...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found