Skip to content

Node v18+ - TLS - local issuer problem #4238

Closed as not planned
Closed as not planned

Description

@Jei23

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.

Activity

  1. preveen-stack commented on Sep 2, 2023

    @preveen-stack
    Contributor

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

  2. Jei23 commented on Sep 2, 2023

    @Jei23
    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

  3. preveen-stack commented on Sep 10, 2023

    @preveen-stack
    Contributor

    Are you using any self signed cerificates

  4. Jei23 commented on Sep 10, 2023

    @Jei23
    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

  5. depdui commented on Mar 12, 2024

    @depdui

    I got the same problem, thanks for any advice

  6. github-actions commented on Sep 9, 2024

    @github-actions

    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.

  7. github-actions commented on Oct 9, 2024

    @github-actions

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions