spliit-app / spliit

Free and Open Source Alternative to Splitwise. Share expenses with your friends and family.
https://spliit.app
MIT License
858 stars 162 forks source link

uptime-kuma: Spliit return Internal Server Error 500 #221

Open camrossi opened 2 weeks ago

camrossi commented 2 weeks ago

I am using uptime-kuma to monitor a few of my apps and spliit 1.9 always returns a 500 error. This happens also if I use curl or wget against my spliit instance.

The logs of the spliit container contains this error:

Error: Cannot find module './undefined.json'
    at /usr/app/.next/server/chunks/2221.js:1:198
    at async /usr/app/.next/server/chunks/2221.js:1:19477
    at async /usr/app/.next/server/chunks/3166.js:148:9351
    at async /usr/app/.next/server/chunks/3166.js:148:9816
    at async /usr/app/.next/server/chunks/3166.js:148:10005
    at async X (/usr/app/.next/server/chunks/2221.js:1:17582) {
  code: 'MODULE_NOT_FOUND',
  digest: '1972969468'
}

This happens only with kuma/curl/wget but a browser works just fine so I guess there is something with the request headers perhaps.

Not really a big issue for now I accept 500 as a success

Thanks !

CypressXt commented 4 days ago

Hey, I've noticed the same issue on my side as well. You're right it can be fixed by adding the (apparently required) Accept-Language header:

Header in curl:

curl -v https://your.spliit.instance.tld -H 'Accept-Language: en-US'
[...]
< HTTP/2 200 
< server: nginx

Header in uptime-kuma:

{
    "Accept-Language": "en-US"
}
ChristopherJohnston commented 2 hours ago

probably due to the addition of i18n modules