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

Clerk breaks Remix HMR #1016

Closed
4 tasks done
rolanday opened this issue Mar 31, 2023 · 10 comments
Closed
4 tasks done

Clerk breaks Remix HMR #1016

rolanday opened this issue Mar 31, 2023 · 10 comments
Assignees
Labels

Comments

@rolanday
Copy link

rolanday commented Mar 31, 2023

Package + Version

See here for repro and version info:
https://github.com/rolanday/remix-clerk

Browser/OS

Chrome Version 111.0.5563.146 (Official Build) (x86_64)

Description

After adding Clerk to Remix, HMR support breaks (appears random, but happens frequently), w/the following error:

Application Error
TypeError: Failed to fetch
at fetchData (http://localhost:3000/build/_shared/chunk-EEQ5UKM3.js:1629:24)
at http://localhost:3000/build/_shared/chunk-EEQ5UKM3.js:1864:26
at runHandler (http://localhost:3000/build/_shared/chunk-BI4NODAN.js:2334:26)
at callLoaderOrAction (http://localhost:3000/build/_shared/chunk-BI4NODAN.js:2366:22)
at http://localhost:3000/build/_shared/chunk-BI4NODAN.js:1631:70
at Array.map ()
at callLoadersAndMaybeResolveData (http://localhost:3000/build/_shared/chunk-BI4NODAN.js:1631:55)
at handleLoaders (http://localhost:3000/build/_shared/chunk-BI4NODAN.js:1262:15)
at startNavigation (http://localhost:3000/build/_shared/chunk-BI4NODAN.js:1117:15)
at Object.revalidate (http://localhost:3000/build/_shared/chunk-BI4NODAN.js:1044:7)

HMR support is new in remix 1.14 and was a highly anticipated feature, so appreciate it if someone on the Clerk team could look into it asap. Here are the details:
https://github.com/remix-run/remix/releases/tag/remix%401.14.0

To repro, simply

  1. Add your own keys to .env
  2. npm run dev after installing deps
  3. Open http://localhost:3000 w/ browser
  4. Make some edits to route/index, and after a bit, you'll see the error (sometimes it takes only a few changes, and sometimes it can take after a minute or so -- but fairly easy to repro.
  5. Then, comment out last three lines in root.tsx to disable Clerk, and un-comment // export default App, repeat same as above for a great and reliable HMR experience in Remix.
@nikosdouvlis nikosdouvlis self-assigned this Apr 2, 2023
@paolotiu
Copy link

I got this same issue. Any workaround to this?

@rolanday
Copy link
Author

workaround:
https://github.com/sergiodxa/remix-auth-oauth2

I'm afraid the time saved going w/ turn-key solution is unwound when factoring in awaiting fixes.

@paolotiu
Copy link

That sucks, really wanted to go with clerk for this project. Might have to wait a bit

@rolanday
Copy link
Author

Clerk is super easy to get going with, props for that, but unless have very simple use case, will find you end-up spending more time workaround around it (and / or waiting for fixes, features, etc.) than the time saved. That's my experience anyway, esp. of not on the Nextjs mainline which gets all the love.

@clerk-cookie
Copy link
Collaborator

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@dimkl dimkl removed the Stale label Jun 19, 2023
@anagstef
Copy link
Member

anagstef commented Jul 6, 2023

Hello everyone! I cannot seem to reproduce this issue easily. I'm using the provided repo and following the steps, and it seems that I cannot break it 😅 .

Now that the Dev Server is stable, can you please use the latest version of Remix (v1.18.1) and enable the v2_dev future flag and report back if it breaks? Remember to delete the .cache folder on your project root before running the dev mode.

@clerk-cookie
Copy link
Collaborator

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@clerk-cookie
Copy link
Collaborator

This issue was closed because it has been stalled for 10 days with no activity.

@clerk-cookie clerk-cookie closed this as not planned Won't fix, can't repro, duplicate, stale Aug 15, 2023
@smorimoto
Copy link

@anagstef I'm experiencing this now, and the behaviour changes greatly depending on the Wrangler version. If I create a reproduction case, will the Clerk team review it?

@smorimoto
Copy link

Oh, no, it was my problem. The problem disappears after setting NODE_ENV.

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

No branches or pull requests

7 participants