Closed natanavra closed 4 years ago
Interesting.
The downloader script directly overwrites the database files. I guess if you kill the app while geolite2-redist
is updating/unzipping, or if you lose internet connectivity, the files are effectively left in a corrupted state.
Solution: write to temporary files. Rename them if checksums pass. Delete any temporary files on startup.
Will publish an update soon.
Seems like this issue is still there, haven't seen the error for a while
ENOENT: no such file or directory, rename '.../node_modules/geolite2-redist/dbs-tmp
ENOENT: no such file or directory, open '.../node_modules/geolite2-redist/dbs/GeoLite2-City.mmdb'
Have you upgraded the lib lately? Can you confirm it stops working after printing out these errors?
I'm on the latest 1.0.7 The app crashes with "uncaught exception", seems like it's working after a restart But in general, totally came out of the blue in a production deployment
I'll look into it.
Hard to re-produce as it is inconsistent and happens only sometimes. Seems like the db becomes corrupted and maxmind is unable to read the file. The solution is to
npm remove geolite2-redist
andnpm install
to re-download the db.Any ideas?