Controller is already closed error

My production logs are filled with this error
TypeError [ERR_INVALID_STATE]: Invalid state: Controller is already closed
at ReadableStreamDefaultController.enqueue (node:internal/webstreams/readablestream:1074:13)
at /app/.next/server/app/api/trpc/[trpc]/route.js:5:31811
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ERR_INVALID_STATE'
}
TypeError [ERR_INVALID_STATE]: Invalid state: Controller is already closed
at ReadableStreamDefaultController.enqueue (node:internal/webstreams/readablestream:1074:13)
at /app/.next/server/app/api/trpc/[trpc]/route.js:5:31811
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ERR_INVALID_STATE'
}
Is there anything i can do about it?
2 Replies
PaoloG
PaoloG5mo ago
Same here, would love to understand why is happening
No description
GamerZero
GamerZeroOP4mo ago
Tried switching from unstable_httpBatchStreamedLink or whatever it called on client to httpBatchLink, it seems that number of errors reduced a little. But the problem still persists I guess i should downgrade trpc to version 10 but it also means downgrading react query Would love to know if any other solution exists Not solved yet
Want results from more Discord servers?
Add your server