Error reading routerStream: Invalid state: Controller is already closed error
i keep getting this error, however it does not impact my application anyhow - has anyone experienced this error yet? Where should i search?
code: 'ERR_INVALID_STATE'
}
Error reading routerStream: TypeError [ERR_INVALID_STATE]: Invalid state: Controller is already closed
at ReadableStreamDefaultController.enqueue (node:internal/webstreamtb/Documents/Developer/Tatb/Documents/Developer/Tanstack-start-convex/node_modules/.pnpm/@tanstack+router-core@1.132.37/node_modules/@tanstack/router-core/dist/esm/ssr/transformStreamWithRouter.js:29:18)
at file:///C:/Users/vestb/Documents/Developer/Tanstack-start-convex/node_modules/.pnpm/@tanstack+router-core@1.132.37/node_modules/@tanstack/router-core/dist/esm/ssr/transformStreamWithRouter.js:94:26
at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
code: 'ERR_INVALID_STATE'
16 Replies
rare-sapphire•2mo ago
Me too 😅 I dont know what can be the cause
fascinating-indigo•2mo ago
need a reproducer for this
are you both using the query integration?
rare-sapphire•2mo ago
No im not
extended-salmon•2mo ago
I got the same error. I just ran
bun create @tanstack/start@latest --framework solid
with these options
the console then says These exports from "/home/rasib/projects/reading-app/test/src/routes/demo.tanstack-query.tsx" will not be code-split and will increase your bundle size so removed the export at the end of the file
then I get the above errorfascinating-indigo•2mo ago
hm the warning should not be relevant
extended-salmon•2mo ago
the fix is deleting the route gen file and re generating it.
fascinating-indigo•2mo ago
the fix for what?
for the "Error reading routerStream:" error?
extended-salmon•2mo ago
yes.
fascinating-indigo•2mo ago
should not be related really
can you please push the reproducer repo to github?
extended-salmon•2mo ago
ok
extended-salmon•2mo ago
GitHub
GitHub - rasibn/tanstack-bug
Contribute to rasibn/tanstack-bug development by creating an account on GitHub.
rare-sapphire•2mo ago
Anyone found a fix for this yet? fwiw, I encountered this after upgrading dependencies. Deleting the
.tanstack folder helped. Not sure what happened thoughfascinating-indigo•2mo ago
can you share a complete project that reproduces the issue?
rare-sapphire•2mo ago
Trying to reproduce it by downgrading and upgrading again, will share it in a repo if it's possible
quickest-silver•2mo ago
fwiw i've seen this happen in start and in nextjs, but it only appears when the chrome devtools are open and doesn't cause any behavioral issues. i'm not sure what exactly causes it, as i have another project that doesn't do it.
inland-turquoise•5w ago
Second this, for me it fetches my backend each second for few seconds. Does it also happen in production?