Controller is already closed crash
Im using trpc with nextjs 14 app router and started to see that my app crashes due to such error. Did anyone encouter such error before ??
4 Replies
this is really bothering me and I cant find the problem with this. This error completely crashes my app
So after some digging I found that the fetch request inside the tRPC procedure is causing this error to happen. It's not clear to me why this happens but when I have such procedure
And I do manually refresh my app (browser refresh) fast enough multiple times in a row the query errors and then it throws
Invalid state: Controller is already closed
and crash the app. When I just remove the fetch call it never throws that controller error but I still can see enigmatic error for the query in the console.did u manage to fix it?
@JLN hi. No. I still experience these errors but simply ignore them atm. They happen from time to time
@Mugetsu Fixed it by disabling
batch
and trpc-batch-mode
headers lmao