Update error: certificate is expired
art1c0 opened this issue · 4 comments
Hello and thanks for the great module!
Recently I noticed the following error when updating the database:
npm run-script updatedb --license_key=xxx
> geoip-country@4.2.79 updatedb ....../node_modules/geoip-country
> node scripts/updatedb.js
Fetching new databases from MaxMind...
Storing files at ....../node_modules/geoip-country/data
Fetching edition GeoLite2-Country-CSV from https://download.maxmind.com/app/geoip_download
Retrieving GeoLite2-Country-CSV.zip ...events.js:183
throw er; // Unhandled 'error' event
^
Error: certificate has expired
at TLSSocket.<anonymous> (_tls_wrap.js:1116:38)
at emitNone (events.js:106:13)
at TLSSocket.emit (events.js:208:7)
at TLSSocket._finishInit (_tls_wrap.js:643:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:473:38)
Not sure what exact certificate is meant here... I tried on 2 different servers, and it works on one, but does not work on another.
Is there a way to overcome the issue, maybe by disabling certificate check?
I know it's not ideal, but I have no other ideas right now, please suggest.
Package version is geoip-country@4.2.79
Hi, sorry for late response.
I have heard that similar problems occur when the node.js version is less than 14.
If you are using a version less than 14, updating might fix it.
Yes I do use Node less than 14, but I have to do it because one of the apps has not been updated to use more modern node version... Everything else works well though :) And your module worked fine previously as well.
Is there a workaround? As I mentioned, there must be an option to disable certificate check at least.
I guess that server setup of maxmind would be changed recently. I searched google and found that by setting the environment as NODE_TLS_REJECT_UNAUTHORIZED=0
might be a workaround.
Either way, it is difficult for us to support older versions of node.js here, as officially support have already stopped.
It worked! Thanks