Skip to content
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

Infinite reload on localhost #1

Closed
mvcodelabs opened this issue Jul 2, 2023 · 6 comments · Fixed by wobsoriano/h3-clerk#2
Closed

Infinite reload on localhost #1

mvcodelabs opened this issue Jul 2, 2023 · 6 comments · Fixed by wobsoriano/h3-clerk#2

Comments

@mvcodelabs
Copy link

Hi, thanks for this playground and the h3-clerk package, i've been looking for something like this for a while.

I'm trying this playground and on localhost it goes on an infinite loop reloading the page. I tried it on a codespace and it worked the first time.

@wobsoriano
Copy link
Owner

wobsoriano commented Jul 2, 2023

I have this issue locally as well. The ff. seems related

@fanckush
Copy link

fanckush commented Aug 17, 2023

issue seems to be fixed for me with h3-clerk 0.3.0 release
edit false positive, turns out I needed to update to h3 v1.8.0 and the indeed it's still broken

@fanckush
Copy link

fanckush commented Sep 20, 2023

@wobsoriano both refererced issues are now resolved yet the bug is still present.

I tried to debug a bit and ended up with this which looks a lot like the issue clerk/javascript#1566

Currently waiting on a response from Clerk team, would be great if you have any ideas. There is a chance that the cause of the bug is H3 dev server; maybe it messes up with the headers in one way or another. This would explain why a production build works just fine and the bug only occurs in localhost

@wobsoriano
Copy link
Owner

@fanckush thanks for linking your issue here. It's definitely the reason that's stopping me from publishing a Nuxt module (h3-clerk and vue-clerk combined).

This is how they handle infinite reloads in Next

https://github.com/clerkinc/javascript/blob/559a0e6e209d8f8662ededdd16421ad38384c3db/packages/nextjs/src/server/authMiddleware.ts#L363

@fanckush
Copy link

sweet! i'll see if I can adopt that solution for h3-clerk and open a PR

@fanckush
Copy link

PR open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants