-
Notifications
You must be signed in to change notification settings - Fork 283
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
Refresh loop on every page #865
Comments
Hello @matteobad. Thank you for reporting this one too. :) PS: please omit any related information with |
Hi @dimkl, The response headers:
I've noticed that it remains
I'm doing all of my testings on the template with the latest version to avoid any of my code being the problem. but there is no |
By decoding the decodeURIComponent('JWT%20issued%20at%20date%20claim%20(iat)%20is%20in%20the%20future.%20Issued%20at%20date%3A%20Fri%20Feb%2024%202023%2016%3A53%3A01%20GMT%2B0100%20(Ora%20standard%20dell%E2%80%99Europa%20centrale)%3B%20Current%20date%3A%20Fri%20Feb%2024%202023%2016%3A52%3A50%20GMT%2B0100%20(Ora%20standard%20dell%E2%80%99Europa%20centrale)%3B%20(reason%3Dtoken-not-active-yet%2C%20token-carrier%3Dcookie)')
// 'JWT issued at date claim (iat) is in the future. Issued at date: Fri Feb 24 2023 16:53:01 GMT+0100 (Ora standard dell’Europa centrale); Current date: Fri Feb 24 2023 16:52:50 GMT+0100 (Ora standard dell’Europa centrale); (reason=token-not-active-yet, token-carrier=cookie)' Solutions:
(I would suggest the 1st solution) PS: ignore my previous comment about |
I'm having the same problem However, if you put withClerkMiddleware in the source, the entire page will be refreshed whenever the nextjs route is navigated, and this happened the same in both development and production modes. Even when no conditions were applied in the middleware as in the code below, the result was the same. export default withClerkMiddleware(req => {
return NextResponse.next();
}); And I tried both of the above solutions
|
Hello @Conradmaker thank you for reporting. Coud you please check if the
It's gonna take some time for me to respond, sorry for the inconvenience and thank you for your patience. |
I've solved the problem. thanks for the help @dimkl |
Thank you @dimkl! I've synced the system clock and that seems to have solved the issue. Also updated to |
Just had this issue today. My computer's clock was 18 seconds behind (https://time.is/). I updated ntp servers from Apple's to another one (https://www.netnod.se/swedish-distributed-time-service). That fixed the problem. Question is, what if a user has this issue? Will Clerk loop-reload the page for them too? Or does this only happen in development? |
@elitan Clock skew issues are not specific to development instances. In April we are planning to add an infinite loop detection mechanism to mitigate the issue. |
That's excellent news. Is there an issue open so I can follow it, or should we re-open this issue? |
@elitan the |
Package + Version
@clerk/clerk-js
@clerk/clerk-react
@clerk/nextjs
@clerk/remix
@clerk/types
@clerk/themes
@clerk/localizations
@clerk/clerk-expo
@clerk/backend
@clerk/clerk-sdk-node
@clerk/shared
@clerk/fastify
gatsby-plugin-clerk
build/tooling/chore
Version:
Browser/OS
Chrome latest
Description
Hi, I've recently opened the #840 which was quickly fixed :)
Unfortunately, It seems that now there is another problem that I guess previously was obscured by the #840. After updating the previous encoding error is gone, but now when I'm logged in, every page goes in a refresh loop. The reload is due to a Clerk script tag in the HTML
I've managed to replicate the issue on the official template: https://github.com/clerkinc/t3-turbo-and-clerk. If I can help in any way just let me know. Now it is pretty much blocking me and my teammates are stuck with either the old problem or this blocking refresh loop.
Thank you in advance
The text was updated successfully, but these errors were encountered: