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.

Self signed certificate error: net::ERR_CONNECTION_REFUSED

See original GitHub issue

Steps to reproduce

  • create selfsigned certificate with CA
  • imstall CA certificate into certificate storage for Root Trusted certificate
  • open a page of you local dev server in Chrome
  • add site to exceptions
  • ensure the page is rendered normally
  • try to open the page with puppeteer in jest test

Tell us about your environment:

What steps will reproduce the problem?

Please include code that reproduces the issue.

  1. run the test
const timeout = 10000;

describe(
    '/ (Home Page)',
    () => {
        let page;
        beforeAll(async () => {
            page = await global.browser.newPage();
            await page.goto('https://localhost');
        }, timeout);

        it('should load without error', async () => {
            const text = await page.evaluate(() => document.body.textContent);
            expect(text).toContain('Hello World');
        });
    },
    timeout,
);
  1. set ignoreHTTPSErrors to true
        this.global.browser = await puppeteer.connect({
            browserWSEndpoint: wsEndpoint,
            ignoreHTTPSErrors: true,
        });

What is the expected result? succesfull test

What happens instead? test is faled with error net::ERR_CONNECTION_REFUSED at https://localhost

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
budarincommented, Jun 1, 2018

I’m sorry 😦 - here is the magic - there is no any errors but it was and repeted steadly So I close the issue. Thanks a lot for the help!

1reaction
budarincommented, Jun 1, 2018

No, problem is not in my environment - the problem is in different security options in chrome and chromium. I have self signed certificate and chrome takes it after manual adding to security exceptions but chromium does not have such option! if I use chrome in tests instead chromium - there is no problems with it - it only requires once accept the site to exceptions

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Chrome to accept self-signed localhost certificate
For a local self-signed cert that avoids arcane commands, ... Using Chrome, hit a page on your server via HTTPS and continue past...
Read more >
How can I get Chrome accepting self signed certificates?
I have to create a self signed certificate by using openSSL on the server hosting the API; Browsers have problems accepting self signed...
Read more >
How to Fix the NET::ERR_CERT_AUTHORITY_INVALID Error
You're using a self-signed SSL certificate. Using a self-signed certificate can save you money, but since browsers can't verify its validity, ...
Read more >
Speedtest SSL certificate problem: self signed certificate - Help
https details : Response: , Error: SSL certificate problem: self signed certificate tip : Connection over HTTPS failed. status : FAILED.
Read more >
Page can't be displayed when you connect through SSL
This error message can occur if you have SSL set on the default Web site, and you remove the certificate, and then try...
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