Self signed certificate error: net::ERR_CONNECTION_REFUSED
See original GitHub issueSteps 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:
- Puppeteer version: “^1.4.0”
- Platform / OS version: Windows Server 2008R2
- URLs (if applicable): https://github.com/budarin/react-bootstrap-project
- Node.js version: 10.1.0
What steps will reproduce the problem?
Please include code that reproduces the issue.
- 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,
);
- 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:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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!
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