Skip to content

Node v18+ - TLS - local issuer problem #4238

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

Closed
DesmoGiec opened this issue Sep 1, 2023 · 7 comments
Closed

Node v18+ - TLS - local issuer problem #4238

DesmoGiec opened this issue Sep 1, 2023 · 7 comments

Comments

@DesmoGiec
Copy link

Details

Hello :)
I'm trying to run a discordjs over nodejs on my webhost, but I'm having an issue.
With nodejs v16 all works perfectly.
discordjs requires nodejs 16.1+, I'm on 16.2 so no problem at all, for now.
But for the future I'd like to update nodejs, but here's the issue.
When I try to run the app, I got this error:

[Discord (18)] [pcdjkska@hostingssd84 Bot]$ node index
Error: unable to get local issuer certificate
    at TLSSocket.onConnectSecure (node:_tls_wrap:1540:34)
    at TLSSocket.emit (node:events:513:28)
    at TLSSocket._finishInit (node:_tls_wrap:959:8)
    at ssl.onhandshakedone (node:_tls_wrap:743:12) {
  code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY'
}

I've tried with disabling ssl in strict-ssl npm cmd, tried to generate CA certs and use NODE_EXTRA_CA_CERTS...
Nothing worked.
I have no clues, hope somebody can help me figuring out what's wrong..
Thanks in advance.
Mirko

Node.js version

v16 ok, from 18 the issue shows up.

Example code

No code. Even with an empty index.js the issue shows up.
Just by doing node index.js it triggers

Operating system

It's a unix webhost, cPanel present.

Scope

runtime

Module and version

Not applicable.

@preveen-stack
Copy link
Contributor

Can you run uname -a on your webhost and share the output

@DesmoGiec
Copy link
Author

[pcdjkska@hostingssd84 ~]$ uname -a
Linux hostingssd84.netsons.net 3.10.0-962.3.2.lve1.5.77.el7.x86_64 #1 SMP Mon Dec 12 07:06:14 EST 2022 x86_64 x86_64 x86_64 GNU/Linux

@preveen-stack
Copy link
Contributor

Are you using any self signed cerificates

@DesmoGiec
Copy link
Author

I've used Let's Encrypt, which is implemented in cPanel, so it's not self signed.
When browsing the site, the lock icon shows up, and it's reported that "verified by: Let's Encrypt"
Crypted connection, TLS_AES_128_GCM_SHA256, 128bit keys, TLS 1.3

@depdui
Copy link

depdui commented Mar 12, 2024

I got the same problem, thanks for any advice

Copy link

github-actions bot commented Sep 9, 2024

It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment.
If you need further assistance or have questions, you can also search for similar issues on Stack Overflow.
Make sure to look at the README file for the most updated links.

@github-actions github-actions bot added the stale label Sep 9, 2024
Copy link

github-actions bot commented Oct 9, 2024

It seems there has been no activity on this issue for a while, and it is being closed. If you believe this issue should remain open, please leave a comment.
If you need further assistance or have questions, you can also search for similar issues on Stack Overflow.
Make sure to look at the README file for the most updated links.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants