Next.js Discord

Discord Forum

[Next.js + next-intl] Refresh causes route parameter to become undefined, only works with client-sid

Unanswered
Yellow-bellied Sapsucker posted this in #help-forum
Open in Discord
Yellow-bellied SapsuckerOP
Hello everyone,

I’m running into a strange issue with Next.js (App Router) and next-intl that happens only on page refresh, not when navigating the app via links:

What’s happening
When I navigate within the app (client-side), everything works perfectly—dynamic routes receive correct parameters.

But on refresh, the route URL ends up with undefined, causing network requests like http://localhost:8083/settings/undefined, which returns a 404.

There are no visible errors on the UI; the only clue comes from the Network tab.

The issue occurs only on refresh, then resolves when navigating normally again.

docs:

https://github.com/TexLuciano/errorhelp

1 Reply

Yellow-bellied SapsuckerOP
If anyone has experienced this problem it will probably be due to some lib, in my case it was due to the hero ui lib specifically the Avatar component