Closed nebulade closed 1 year ago
The behaviour you described sounds like it would be something to do with the middleware.
It's possible that we are seeing different behaviours between your self-hosted instance and rallly.co which runs on vercel. I'll see if I can reproduce it first by running it inside a container.
Thanks for the quick response. You can see this happening at this test deployment at https://rallly.nebulon.space/
Looking at the middleware code, that part seems fine as the page does rewrite the URL to /de
after setting it to German.
I haven't been able to reproduce the issue locally. If this issue is only happening in your environment that might make it a lot harder to debug. Have you been able to reproduce it locally by any chance?
While I was looking at this I noticed some weird behaviour with the middleware. Seems next updated some syntax when it comes to these paths so I merged #423 to fix this.
Are you able to test these changes?
Ah great, I was able to test this and it indeed fixed the issue! Thanks for the quick turnaround
When a user selects a language in the profile settings, no further resources will load. All requests to .js files and other assets result in a 404
The app as such works fine in english, once the
NEXT_LOCALE "de"
is set in the cookies, the app only responds with 404. Clearing the cookie there on the browser "fixes" the issue.Sadly I don't know much about nextjs but it seems maybe it misses building some assets or so. I tried to debug this but also due to my limited knowledge I couldn't make the server more verbose.
For more context this is happening in the Cloudron app package and the original request is https://forum.cloudron.io/topic/8251/the-language-switch-does-not-work
The package uses the following in the Dockerfile:
and then runs the app as
This is with rallly from sha 6332d6459ffefbea7ab925f508d05ae9e7d204d8
Any hints on where to look further to gather more info would be appreciated.