-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[nextjs app router] ClerkProvider
breaks 404 routing
#2499
Comments
Please note that this does not occur when running in development. You'll need to build and start the server in order to reproduce this. |
ClerkProvider
breaks 404 routingClerkProvider
breaks 404 routing
I also got an error deploying on vercel Nextjs 14 but everything was perfect during development. |
@kaksv yes, this only seems to occur during while running in dev mode. Notably, this is reproducible locally though by building and serving locally. |
There's a worse version of this bug that occurs too. It seems that only navigating to the root page breaks, so there's scenarios like:
This is really bad! In practice, a 404 page being buggy is much more acceptable than a 404 page breaking a completely unrelated page |
Any update on this? |
Hello @JacobJaffe :) |
Hey @JacobJaffe turns out this issue can be replicated just by using nextjs. I have created this issue in their repo. (I used the gif from this PR, I could replace it with on of ours if it bothers you.) For some context, we are making use of |
Update: Seems like the vercel team prioritized the issue and a PR was open to address it. As a workaround, until the fix is out, |
@nikosdouvlis @panteliselef Thank you for the updates and for looking into this! Looking forward to the upstream fix, and thanks for relaying the workaround. |
The fix should have landed in |
Preliminary Checks
Reproduction / Replay Link
https://github.com/JacobJaffe/clerk-nextjs-404-routing-demo/tree/main
Publishable key
pk_test_c2FmZS1zaGFkLTg2LmNsZXJrLmFjY291bnRzLmRldiQ
Description
ClerkProvider
wrapping the application breaks navigating away from 404 pages withnext/link
. Please note that all it takes is theClerkProvider
wrapping the app - I've excluded middleware in the minimal example, that doesn't change this (upgrading to the new middleware of 5.x has no effect on this bug().Steps to reproduce:
See detailed instructions in the provided repo.
Navigating from a 404 page with a nextjs `` component does not work when the app is wrapped in a
ClerkProvider
I have pared down the example repo to the smallest reproducible case of this, but this also occurs in more complex scenarios with custom 404 pages. Interestingly, it doesn't always occur when the
not-found.tsx
page isn't at the root level (e.g. for a dynamic route).Expected behavior:
Navigating should always work.
Actual behavior:
The browser url indicates the route has changed, but the page does not change.
Environment
The text was updated successfully, but these errors were encountered: