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.

Unable to verify first Certificate

See original GitHub issue
[DEBUG][2016-09-30T20:29:04.465Z][undefined] Entering state: 1
[ERROR][2016-09-30T20:29:04.725Z][undefined] Could not connect to server Error: Could not open socket: unable to verify the first certificate
[DEBUG][2016-09-30T20:29:04.725Z][undefined] Entering state: 5
[DEBUG][2016-09-30T20:29:04.725Z][undefined] Closing connection...

Any Ideas?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
felixhammerlcommented, Sep 18, 2018

I’ve worked around it by doing this: process.env.NODE_TLS_REJECT_UNAUTHORIZED = “0”;

DO NOT DO THIS! If you have a custom domain, please use proper certificates via letsencrypt. If this is for testing, please generate a trusted certificate via mkcert!

1reaction
WhatFreshHellIsThiscommented, Mar 10, 2017

Dug into the code, this is not actually related to this repository, it’s coming from the node socket library.

Looks like there is some confusion with the cert we are using, it’s accepted by other code and libraries on other platforms and clients, just not by the node socket.

Since this is an internal facing only application I’ve worked around it by doing this: process.env.NODE_TLS_REJECT_UNAUTHORIZED = “0”; Which temporarily overrides and allows it to work with our faulty cert.

This is entirely unsafe to do in most other circumstances, more info here: http://stackoverflow.com/questions/31673587/error-unable-to-verify-the-first-certificate-in-nodejs

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: unable to verify the first certificate in nodejs
It means that the webserver you are connecting to is misconfigured and did not include the intermediate certificate in the certificate chain it...
Read more >
Postman responds to API calls with "Error: Unable to verify the ...
Open Postman, then select File -> Settings · Select the General tab. · Move the slider for SSL certificate verification to the OFF...
Read more >
Unable to Verify the First Certificate with OpenSSL - Pavol Kutaj
This error means that the certificate chain is broken for OpenSSL — but does not have to be for browsers! Why? Because browsers...
Read more >
Error: unable to verify the first certificate. How to fix? - NodeBB
As that answer on SO says, the error unable to verify the first certificate means that the webserver you are connecting to is...
Read more >
Unable to Verify First Cert Issue - Enable SSL Cert Verification
Navigate to Certificate > Web Hosting > Certificates and select your SSL cert · Then right click and select “All Task” & “Export”...
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