Zekfad / nhentai-api

Node.JS client for nhentai.net undocumented API.
https://zekfad.github.io/nhentai-api/
ISC License
42 stars 6 forks source link

Error: Unable to verify first Certificate #17

Closed Hary1723 closed 2 years ago

Hary1723 commented 2 years ago

I have been following the basic examples located at the NPM README and I got this issue and I have no idea how to fix it.

(node:11232) UnhandledPromiseRejectionWarning: Error: unable to verify first certificate

Version I used: 3.0.2 / latest

Zekfad commented 2 years ago

Its either: your ISP blocking the connection or you're missing some CA's. You can try to use this package: _node_extra_ca_certs_mozilla_bundle_. Also you can look for answers and solutions here on SA.

I've just checked and it works fine on my machine ![image](https://user-images.githubusercontent.com/8970959/133851976-30cb3997-b6c6-498e-b047-da0b0e04c129.png)
Hary1723 commented 2 years ago

I followed your instructions above and it doesn't seem to work; it still gives me the same error.

Zekfad commented 2 years ago

What is your specs? In particular what is your OS, Node version, Last time you updated the system? Do you have access to nhentai from the browser?

Hary1723 commented 2 years ago

What is your specs? In particular what is your OS, Node version, Last time you updated the system? Do you have access to nhentai from the browser?

I'm on Windows 10 and my current Node version is 14.16.0 and since I'm using Opera GX as my browser, I use VPN to access the site.

Hary1723 commented 2 years ago

What is your specs? In particular what is your OS, Node version, Last time you updated the system? Do you have access to nhentai from the browser?

I'm on Windows 10 and my current Node version is 14.16.0 and since I'm using Opera GX as my browser, I use VPN to access the site.

Ahh never mind, I fixed them already! Thanks for the help 👍

Zekfad commented 2 years ago

Could you tell what was the cause, in case anyone else will have the same issue?

Hary1723 commented 2 years ago

Yes, sorry for the late reply (I did not check my GitHub:sweat_smile:)

As you said earlier, it could be either you're missing some CA's or the site was blocked (it doesn't allow you any access to the site). I don't have any access to the site which caused this issue hence I simply fix this by using a VPN.