Clerk fix for 1.132
with the new release of 1.132, has anyone worked out a hack/hotfix for clerk which can be put in place to keep going with that whilst that package is updated?
Trying to get the server.ts working.
85 Replies
passive-yellow•3mo ago
No luck for me yet. I saw somewhere Clerk is aware of the issue and working on a fix. I'm patiently waiting for said fix
wise-white•3mo ago
Same here, waiting for this issue to be fixed.I think this is the related thread on Clerk's Discord
https://discord.com/channels/856971667393609759/1420142965095141477
unwilling-turquoise•3mo ago
There is a snapshot that you can test out now
https://github.com/clerk/javascript/pull/6859
passive-yellow•3mo ago
This works perfectly for me btw @mackattack3k
unwilling-turquoise•3mo ago
Cool it worked for me too! Now I just have 3 other bugs to sort out
fair-rose•2mo ago
Thanks @mackattack3k Merged 18 hours ago!
https://github.com/clerk/javascript/pull/6859
GitHub
feat(tanstack-react-start): Introduce middleware and support for Ta...
Description
This PR introduces a new clerkMiddleware() replacing the custom server handler.
DX Guide
For beta testers:
Installation
To test this, use the snapshot version of Clerk's TanStac...
exotic-emerald•2mo ago
Available next week! Be sure to read the changelog 😀
Use the canary version in the meantime
0.26.0-canary.v20251010143932exotic-emerald•2mo ago
Updated docs PR. You can check the preview links
https://github.com/clerk/clerk-docs/pull/2690
GitHub
Use new TanStack RC setup by wobsoriano · Pull Request #2690 · cl...
🔎 Previews:
Quickstart
Read session and user data
auth()
clerkMiddleware()
What does this solve?
What changed?
Checklist
…
unwilling-turquoise•2mo ago
I upgraded all my packages today (this canary being one of them) and I'm getting this error
Anyone else?
Sorry, this was actually not related to tanstack per se.
I narrowed it down to the
srvx package which I upgraded from 0.8.15 -> 0.8.16 which broke this.conscious-sapphire•2mo ago
i have the same issue, but downgrading srvx does not have any impact 🤔
unwilling-turquoise•2mo ago
Can I see your package json so I can compare it to mine?
crude-lavenderOP•2mo ago
yes, also getting this error...
exotic-emerald•2mo ago
Are you guys seeing this error in the canary version? https://discord.com/channels/719702312431386674/1420668404599099392/1426567627760734312
unwilling-turquoise•2mo ago
I am running
0.26.0-canary.v20251010143932 without issues and srvx: 0.8.15. As soon as I upgrade srvx this error happens.
I noticed that srvx did change the cookie handling in 0.8.16 for what its worth: https://github.com/h3js/srvx/releases/tag/v0.8.16exotic-emerald•2mo ago
ohhh
thank you so much
it indeed is fixed in pre 0.8.16 of srvx
worth checking @Manuel Schiller
good catch @mackattack3k !
are you using srvx?
unwilling-turquoise•2mo ago
Nope, I'm using a custom Bun server right now (almost like the hosting docs). So its just a dependency right now.
exotic-emerald•2mo ago
I think manuel's already looking at it https://github.com/TanStack/router/pull/5470#discussion_r2427604403
GitHub
fix: do not pass signal into server function by schiller-manuel · ...
this depends on h3js/srvx#122
after this is merged and released, srvx must be bumped here
Summary by CodeRabbit
New Features
Added a Cloudflare Workers configuration scaffold to the React start-...
exotic-emerald•2mo ago
probably not related, but yeah
equal-aqua•2mo ago
i dont see the relationship between that h3 change and this yet
exotic-emerald•2mo ago
FYI, you can install the latest version now which includes tanstack start RC support https://github.com/clerk/javascript/releases/tag/%40clerk%2Ftanstack-react-start%400.26.0
GitHub
Release @clerk/tanstack-react-start@0.26.0 · clerk/javascript
Minor Changes
Added support for TanStack Start v1 RC! Includes a new clerkMiddleware() global middleware replacing the custom server handler. (#6859) by @wobsoriano
Usage:
Create a src/start.ts ...
unwilling-turquoise•2mo ago
Just tried it and it works great. I upgraded srvx now too and that seems to work too. Is that expected now?
No hang on, it seems to be broken if I upgrade to srvx 0.8.16 as expected still!
noble-gold•2mo ago
In my case I'm receiving the following error, I tried again with a fresh tanstack start app and the same error is raising

exotic-emerald•2mo ago
Yeah need to pin srvx 0.8.15. Havent had the time to check whats wrong with cookie stuff in srvx side
rival-black•2mo ago
I have srvx pinned to 0.8.15 but I'am still facing the same error:
exotic-emerald•2mo ago
Try deleting node_modules
exotic-emerald•2mo ago
Compare with the deps in this quickstart https://github.com/clerk/clerk-tanstack-react-start-quickstart
GitHub
GitHub - clerk/clerk-tanstack-react-start-quickstart: Learn how to ...
Learn how to use Clerk to quickly add secure authentication and user management to your TanStack Start application. - clerk/clerk-tanstack-react-start-quickstart
exotic-emerald•2mo ago
trying to figure out where exactly in srvx is causing the issue. something relating to cookie parsing
fascinating-indigo•2mo ago
facing this error, even after all the recommended changes
this is my package
exotic-emerald•2mo ago
I tried your tanstack versions and they work on my end. Hmm try deleting node_modules and lockfile and reinstalling?
fascinating-indigo•2mo ago
already tried
exotic-emerald•2mo ago
running perfectly here. These are my dependencies. Using pnpm here I had to delete node_modules and pnpm-lock and reinstall srvx@0.8.15


fascinating-indigo•2mo ago
Let me try doing that again
getting this, I don't have a server.ts
replaced it with start.ts
exotic-emerald•2mo ago
working now? Docs still in review but here's a preview link https://clerk.com/docs/pr/rob-tanstack-start-rc/tanstack-react-start/getting-started/quickstart
xenophobic-harlequin•2mo ago
Pinning
srvx worked for me, thanks.fascinating-indigo•2mo ago
nope, followed all the steps,
solved
there were some issues with my router
thanks for the support @wobsoriano
fair-rose•2mo ago
I got it to work, but wasn’t able to migrate my repo directly. I started with the updated tanstack start template then migrated everything over to that but as of right now it seems that I got it working.
rival-black•2mo ago
Solved, also a problem in my router.
Thanks for helping !
unwilling-turquoise•2mo ago
Holler if you need any help from my end here! I can probably set up the source and check that out too.
xenial-black•2mo ago
following up on this thread - is there a latest recommendation for adding clerk + start? Added the clerk middleware start.ts file, and using a lower version of srvx, but wondering if theres been movement on the clerk side that addresses the issue
note: using "@tanstack/react-start": "^1.133.3"
exotic-emerald•2mo ago
I believe you got it all set up correctly. What exact issue are you experiencing?
xenial-black•2mo ago
thanks. Runtime error when I go to localhost:3000
wise-white•2mo ago
I am getting a similar error when attempting to authenticate my convex functions with clerk.
But clerk I can have up and running fine until I start trying to use it along side convex
xenial-black•2mo ago
yeah, i'm wrapping the inside the
that might be the culprit
The convex/react-clerk library might just not be ready to support the tanstack start rc
wise-white•2mo ago
That's what I was thinking as well. Haven't seen anything in their PRs or commits that show any changes for the RC, at least none that fix this issue
exotic-emerald•2mo ago
Pinning srvx@0.8.15 fixes that error. If you still get it, try deleting node modules and your lockfile and reinstalling
xenial-black•2mo ago
thanks, i did try this, no luck.
here is my __root.tsx file, feel like theres a lot goin on . Before upgrading to the RC was all workign smoothly:
``````
xenial-black•2mo ago
oh do i need to be using the nitroV2Plugin in the vite.config?
exotic-emerald•2mo ago
No need for nitro plugin. You can base your setup off of this quickstart https://github.com/clerk/clerk-tanstack-react-start-quickstart
GitHub
GitHub - clerk/clerk-tanstack-react-start-quickstart: Learn how to ...
Learn how to use Clerk to quickly add secure authentication and user management to your TanStack Start application. - clerk/clerk-tanstack-react-start-quickstart
xenial-black•2mo ago
thank you. yes very strange, even with using srvx version 0.8.15 Still running into this runtime issue:

xenial-black•2mo ago
im starting to think this is a node version issue
it looks like my overrides configuration isn't forcing all transitive dependencies to use srvx@0.8.15
exotic-emerald•2mo ago
Can you share your package.json?
xenial-black•2mo ago
this solved it: and yarn install --force
think I'm running into more issues though, with convex i think not supporting node version 22, which is the new min version for tanstack start
passive-yellow•2mo ago
I'm getting this same issue now, and pinning srvx to 0.8.15 is not working for me. There's something deeper here. If anyone else figures this out plz post here, I'm struggling
wait nvm. got it working. I had to use 'overrides' for bun, not resolutions.
noble-gold•2mo ago
What worked for me is to use overrides, remove node_modules and package-lock, and point to the specific version 0.8.15 I was trying to use npm i srvx@0.8.15 and automatically was adding ^0.8.15 and installing 0.8.16, removing the caret solved it for me
exotic-emerald•2mo ago
Yeah caret will install the latest compatible version
conscious-sapphire•2mo ago
Thanks to the above i got clerk working with the RC... except for POST server function when using bun.
it seems that clerkMiddleware consume the body of the request, and thefore it mess with tanstack start internal (
ERR_BODY_ALREADY_USED errors).
@wobsoriano i created https://github.com/clerk/javascript/pull/7020, please lmk if that's useful / if you need any more informationexotic-emerald•2mo ago
Nice! Looks good and thanks for this
xenial-black•2mo ago
ok i'm making some progress here. yarn dev works, and hitting localhost works. Im able to run serverside calls to convex. Able to run serversdie authentication calls to clerk, and the conditional rendering with clerk componenets based on signed in and signed out state works.
Noticing that the <SignIn> component from clerk/tanstack-react-start package has no functionality, and noticing that content wrapped inside of <motion.div> is only rendering the first paint. I'm wondering if this might be a hydration issue with start.
xenial-black•2mo ago
this is the error message i see in the console when the page loads:
no other behavior occuring on button clicks.
To confirm the issue related to client-side js, i added a button with a simple onClick with a console log, and it is not working either.

xenial-black•2mo ago
anyone else experiencing issues with client bundle?
perplexity has said to: Temporarily pin TanStack Start to 1.128.3 , seems like this is not exactly right
I've been using yarn
exotic-emerald•2mo ago
looks like a different issue https://github.com/TanStack/router/issues/5342
might be worth moving to a new thread
xenial-black•2mo ago
sweet thanks!
its been a turbulent migration, i still have faith though
means theres some incredible work happening on the tanstack side
the issue was related to static server functions (middleware)
conscious-sapphire•2mo ago
thanks for the merge! it was fast 🙂
exotic-emerald•2mo ago
Sorry if I wasnt able to help. Long time since I used yarn… probs v1 days
unwilling-turquoise•2mo ago
Checking in here again just to say that srvx released 0.9.0 which seems to change the cookies.
I upgraded to latest clerk + tanstack today and then removed srvx and everything works. Thanks for the fixes!
EDIT: Too fast again, I hadnt removed my node modules. It is still broken, both using srvx 0.9.1 or removing it
xenial-black•2mo ago
interesting. why exactly do we need to pin the version to 0.8.15? I remember seeing something about it in the clerk docs but think they removed it
exotic-emerald•2mo ago
I have so little time to check sorry. I tried to check whats happening on srvx side with no success
unwilling-turquoise•5w ago
Don’t stress it since we have the workaround
exotic-emerald•4w ago
I pinned my srvx version, hitting this error now:
>// src/tokens/clerkRequest.ts
import {parse} from "/node_modules/cookie/dist/index.js?v=c2083859";
Are these issues not being hit on the clean install starter for clerk + tanstack start? Seems odd we're just finding them tbh
fascinating-indigo•4w ago
I can confirm they're happening on clean installs. Yesterday got the feelign of testing Start (haven't used it yet), checked out all the templates (from both Clerk and Start) and both first showed the error of get cookie and, when applied the fix (pin version of srvx), got the exact same error as you just mentioned
It's a bummer but also it was clearly stated that the clerk-start sdk is in beta, so bugs are expected
exotic-emerald•4w ago
Oof is this a new bug. Not aware of any changes on Clerk side
exotic-emerald•4w ago
Do you still get it if you follow the tanstack versions here? https://github.com/clerk/clerk-tanstack-react-start-quickstart
could be an update on tanstack side Im not aware of
GitHub
GitHub - clerk/clerk-tanstack-react-start-quickstart: Learn how to ...
Learn how to use Clerk to quickly add secure authentication and user management to your TanStack Start application. - clerk/clerk-tanstack-react-start-quickstart
fascinating-indigo•4w ago
So far:
1. patched clerk/backend
This solved the issue mentioned by Peacock that I was also facing, but then I brought a new one:
So it didn't solve the issue, just made it appear somewhere else lol
compared to their package.json, my only changes are:
exotic-emerald•4w ago
Haa what is happening
Somethung changed in 1.134 maybe? Can you try 1.132 and see if the errors are gone?
fascinating-indigo•4w ago
you 100% right, 1.132.56 has no errors lol
so it happened between 1.132.56 -> 1.134.7 (latest)
exotic-emerald•4w ago
@Manuel Schiller any update in 1.133-134 that may have caused new issues above?
fascinating-indigo•4w ago
few more tests:
- removed patch for
@clerk/backend
- deleted both node_modules and bun.lock
- up to v1.134.6 works
problem definitely latest releasefascinating-indigo•4w ago
there's also a comment in the PR: https://github.com/TanStack/router/pull/5715/files#r2483144116
GitHub
fix: package crawling include start-client-core by schiller-manuel ...
Summary by CodeRabbit
Improvements
Expanded package compatibility detection logic to recognize additional compatible packages.
Optimized framework package handling to ensure excluded packages are...
fascinating-indigo•4w ago
oh sorry there's already an issue for it: https://github.com/TanStack/router/issues/5717
GitHub
@tanstack/react-start v1.134.7 causes import error with use-sync-ex...
Which project does this relate to? Start Describe the bug When I upgrade to to v1.134.7 of @tanstack/react-start, I get a runtime error if I view a react component that imports tanstack-store. I pe...
exotic-emerald•4w ago
Oh so maybe a version before that would work? Can you try?
fascinating-indigo•4w ago
Yup, 1.134.6 works just fine
tldr (as of now):
override both srvx and TS Start:
exotic-emerald•4w ago
Tried the latest tanstack version with fix to https://github.com/TanStack/router/issues/5717 but still getting this error
exotic-emerald•4w ago
GitHub
Some server-side modules incorrectly bundled into the client? · Is...
Which project does this relate to? Start Describe the bug Starting with @tanstack/react-start@1.134.7, I think server-side modules are being incorrectly bundled into the client bundle. For example,...
exotic-emerald•4w ago
Def works in .6, something about .7 introduced this
solid-orange•3w ago
any solution to this?
I've done:
updated tanstack packages:
but still getting this
this worked. (notice the karet
^ as well)