gbv / login-server

Login and connect accounts with multiple identity providers
https://coli-conc.gbv.de/login/
MIT License
31 stars 32 forks source link

Database connection issues when using Node.js 17 or later on ARM64 devices #98

Closed stefandesu closed 1 year ago

stefandesu commented 1 year ago

Super low priority issue, but leaving it here because it's an issue on my M1 MacBook Air. For some reason, when using Node.js 17 or later, the database fails to connect with a MongoServerSelectionError. Switching to 16 immediately fixes the issue.

stefandesu commented 1 year ago

This might be relevant soon, considering that Node.js 16 is EOL in September 2023. I'll take a look at some point.

stefandesu commented 1 year ago

There seems to be no issue on ARM Linux, so it seems to be a macOS specific issue.

stefandesu commented 1 year ago

Can't reproduce on my M1 MacBook Air either. Might have been fixed by either a new Node.js release (I'm pretty sure the error occurred on an older version of Node.js 18) or by running npm ci with Node.js 18 (instead of having had it run in 16 and then switch to 18).

stefandesu commented 1 year ago

I reencontered this issue on my Intel machine and was able to pinpoint it to this issue which should be fixed in 97ed918. I also added the same fix in jskos-server: https://github.com/gbv/jskos-server/commit/7c7942039f198ab579babd13266cf2b4cba21873