Frachtwerk / essencium-frontend

Next.js based starter monorepo consisting of a component library, types, docs and a boilerplate application.
https://staging.essencium.dev
GNU Lesser General Public License v3.0
17 stars 1 forks source link

props cancelled error in console #485

Open qhantom opened 8 months ago

qhantom commented 8 months ago

Describe the bug Not really a bug but rather a warning.

To Reproduce

  1. Go to 'Essencium staging'
  2. Open dev tools and the console tab
  3. Maybe you need to refresh the page
  4. See the error in the console

Expected behaviour A clear console without errors and warnings.

Screenshots image

PhilKsr commented 6 months ago

Waiting for next 14 upgrade.

Issue is caused because the next router is initial interrupted by a useEffect to set the locale in the AuthLayout.tsx. Tested several other ways to set the locale in the router but none of them worked. Only known "fix" is to set a timeout to let the router first load the page and serverside props and then replace the same path with the locale.

We agreed on waiting for the next 14 upgrade and investigate the issue again afterwards. If it still shows up and no proper fix is available we thought about a workaround like catching the error and return an empty object to avoid the thrown error.

qhantom commented 2 weeks ago

@PhilKsr monitored