\r\n\n\n### Link to reproduction\n\nhttps://github.com/codingwithmanny/trpc-siwe-monorepo\n\n### To reproduce\n\nClone `https://github.com/codingwithmanny/trpc-siwe-monorepo` and install dependencies, write code in `packages/react`\n\n### Additional information\n\n_No response_\n\n### 👨👧👦 Contributing\n\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[3068,3071,3074,3075],{"name":3069,"color":3070},"👻 invalid","e4e669",{"name":3072,"color":3073},"🔎 needs more investigation/info","d4c5f9",{"name":3024,"color":3025},{"name":3076,"color":3073},"⏳ close if no activity",6315,"bug: @types/node type pollution","2025-03-20T15:42:46Z","https://github.com/trpc/trpc/issues/6315",0.6891141,{"description":3083,"labels":3084,"number":3088,"owner":3027,"repository":3027,"state":3060,"title":3089,"updated_at":3090,"url":3091,"score":3092},"I have separated libs for client and server, and since @trpc/client doesn't export the observable function and type I also have to install @trpc/server just to use this function and type, which is weird. I think this function should be exported in both packages.",[3085],{"name":3086,"color":3087},"wontfix","ffffff",6013,"feat: @trpc/client should export observable","2024-09-25T12:03:09Z","https://github.com/trpc/trpc/issues/6013",0.69910485,{"description":3094,"labels":3095,"number":3096,"owner":3027,"repository":3027,"state":3060,"title":3097,"updated_at":3098,"url":3099,"score":3100},"### Provide environment information\r\n\r\n```\r\n System:\r\n OS: macOS 13.4.1\r\n CPU: (8) arm64 Apple M1\r\n Memory: 223.42 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node\r\n Yarn: 1.22.19 - ~/.nvm/versions/node/v18.16.0/bin/yarn\r\n npm: 9.8.1 - ~/.nvm/versions/node/v18.16.0/bin/npm\r\n pnpm: 8.6.6 - ~/.nvm/versions/node/v18.16.0/bin/pnpm\r\n Browsers:\r\n Brave Browser: 115.1.56.14\r\n Safari: 16.5.2\r\n npmPackages:\r\n @tanstack/react-query: ^4.18.0 => 4.32.1 \r\n @trpc/client: ^10.36.0 => 10.36.0 \r\n @trpc/next: ^10.36.0 => 10.36.0 \r\n @trpc/react-query: ^10.36.0 => 10.36.0 \r\n @trpc/server: ^10.36.0 => 10.36.0 \r\n next: ^13.4.8 => 13.4.12 \r\n react: 18.2.0 => 18.2.0 \r\n typescript: 5.1.3 => 5.1.3 \r\n```\r\n\r\n### Describe the bug\r\n\r\nWhile using [https://github.com/trpc/trpc/tree/main/examples/next-prisma-todomvc](next-prisma-todomvc) reproduction everything seems to be working fine, however, when I do first request httpUtils gets this error:\r\n\r\n```\r\n \u003C\u003C query #1 user.all {\r\n input: undefined,\r\n result: TRPCClientError: Unexpected token \u003C in JSON at position 0\r\n at TRPCClientError.from (file:///Volumes/DEV/ulobo/node_modules/@trpc/client/dist/TRPCClientError-fef6cf44.mjs:26:16)\r\n at file:///Volumes/DEV/ulobo/node_modules/@trpc/client/dist/httpUtils-ad76b802.mjs:125:36\r\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {\r\n meta: { response: [Response] },\r\n shape: undefined,\r\n data: undefined,\r\n [cause]: SyntaxError: Unexpected token \u003C in JSON at position 0\r\n at JSON.parse (\u003Canonymous>)\r\n at parseJSONFromBytes (node:internal/deps/undici/undici:6571:19)\r\n at successSteps (node:internal/deps/undici/undici:6545:27)\r\n at node:internal/deps/undici/undici:1211:60\r\n at node:internal/process/task_queues:140:7\r\n at AsyncResource.runInAsyncScope (node:async_hooks:203:9)\r\n at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)\r\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n },\r\n elapsedMs: 61\r\n}\r\nTRPCClientError: Unexpected token \u003C in JSON at position 0\r\n at TRPCClientError.from (file:///Volumes/DEV/ulobo/node_modules/@trpc/client/dist/TRPCClientError-fef6cf44.mjs:26:16)\r\n at file:///Volumes/DEV/ulobo/node_modules/@trpc/client/dist/httpUtils-ad76b802.mjs:125:36\r\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {\r\n meta: {\r\n response: Response {\r\n [Symbol(realm)]: null,\r\n [Symbol(state)]: [Object],\r\n [Symbol(headers)]: [HeadersList]\r\n }\r\n },\r\n shape: undefined,\r\n data: undefined,\r\n [cause]: SyntaxError: Unexpected token \u003C in JSON at position 0\r\n at JSON.parse (\u003Canonymous>)\r\n at parseJSONFromBytes (node:internal/deps/undici/undici:6571:19)\r\n at successSteps (node:internal/deps/undici/undici:6545:27)\r\n at node:internal/deps/undici/undici:1211:60\r\n at node:internal/process/task_queues:140:7\r\n at AsyncResource.runInAsyncScope (node:async_hooks:203:9)\r\n at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)\r\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n}\r\n```\r\n\r\n\r\n\r\n### Link to reproduction\r\n\r\nhttps://github.com/porydzaj/trpc-404-httputils\r\n\r\n### To reproduce\r\n\r\nRun first fetch at index with utils/trpc\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### 👨👧👦 Contributing\r\n\r\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[],4671,"bug: Unexpected token \u003C in JSON at position 0","2025-03-20T15:41:49Z","https://github.com/trpc/trpc/issues/4671",0.7229835,{"description":3102,"labels":3103,"number":3105,"owner":3027,"repository":3027,"state":3060,"title":3106,"updated_at":3107,"url":3108,"score":3109},"### Provide environment information\r\n\r\n System:\r\n OS: macOS 14.4\r\n CPU: (10) arm64 Apple M1 Pro\r\n Memory: 235.53 MB / 32.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 20.5.1 - ~/.nvm/versions/node/v20.5.1/bin/node\r\n npm: 9.8.0 - ~/.nvm/versions/node/v20.5.1/bin/npm\r\n pnpm: 8.15.4 - ~/Library/pnpm/pnpm\r\n Browsers:\r\n Brave Browser: 115.1.56.20\r\n Chrome: 122.0.6261.112\r\n Chrome Canary: 124.0.6350.0\r\n Safari: 17.4\r\n npmPackages:\r\n typescript: ^5.0.0 => 5.4.2\r\n\r\n### Describe the bug\r\n\r\nRunning TSC in project with latest @trpc packages causes this error:\r\n```\r\n> tsc\r\n\r\nnode_modules/@trpc/server/dist/core/initTRPC.d.ts:21:123 - error TS2344: Type 'TParams extends object ? { [K in \"ctx\" | keyof WithoutIndexSignature\u003CTParams>]: K extends \"ctx\" ? { ctx: Unwrap\u003CTNewContext>; }[K] : K extends keyof TParams ? TParams[K] : never; } : { ctx: Unwrap\u003CTNewContext>; }' does not satisfy the constraint 'Partial\u003CRootConfigTypes>'.\r\n Type '{ meta: object | undefined; transformer: unknown; ctx: Unwrap\u003CTNewContext>; errorShape: unknown; }' is not assignable to type 'Partial\u003CRootConfigTypes>'.\r\n Types of property 'ctx' are incompatible.\r\n Type 'Unwrap\u003CTNewContext>' is not assignable to type 'object | undefined'.\r\n\r\n 21 context\u003CTNewContext extends RootConfigTypes['ctx'] | ((...args: unknown[]) => RootConfigTypes['ctx'])>(): TRPCBuilder\u003CTParams extends object ? { [K in \"ctx\" | keyof import(\"../types\").WithoutIndexSignature\u003CTParams>]: K extends \"ctx\" ? {\r\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n 22 ctx: Unwrap\u003CTNewContext>;\r\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n... \r\n 24 ctx: Unwrap\u003CTNewContext>;\r\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n 25 }>;\r\n ~~~~~\r\n\r\n\r\nFound 1 error in node_modules/@trpc/server/dist/core/initTRPC.d.ts:21\r\n```\r\n\r\n### Link to reproduction\r\n\r\nhttps://stackblitz.com/edit/vitejs-vite-cvkarz?file=tsconfig.json,package.json,src/main.tsx,src/vite-env.d.ts,node_modules/@trpc/server/dist/index.d.ts\r\n\r\n### To reproduce\r\n\r\njust run `npm run build` to see the error\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### 👨👧👦 Contributing\r\n\r\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[3104],{"name":3024,"color":3025},5558,"bug: typescript errors in typescript 5.4","2025-03-20T15:42:18Z","https://github.com/trpc/trpc/issues/5558",0.72679764,{"description":3111,"labels":3112,"number":3115,"owner":3027,"repository":3027,"state":3060,"title":3116,"updated_at":3117,"url":3118,"score":3119},"### Provide environment information\n\n```\n System:\n OS: macOS 15.3.1\n CPU: (10) arm64 Apple M1 Max\n Memory: 682.48 MB / 64.00 GB\n Shell: 5.9 - /bin/zsh\n Binaries:\n Node: 18.18.2 - ~/Library/Caches/fnm_multishells/44925_1740968664677/bin/node\n Yarn: 1.22.19 - ~/Library/Caches/fnm_multishells/44925_1740968664677/bin/yarn\n npm: 9.8.1 - ~/Library/Caches/fnm_multishells/44925_1740968664677/bin/npm\n pnpm: 8.15.6 - ~/Library/Caches/fnm_multishells/44925_1740968664677/bin/pnpm\n bun: 1.2.4 - /opt/homebrew/bin/bun\n Browsers:\n Chrome: 133.0.6943.142\n Safari: 18.3\n```\n\n### Describe the bug\n\nWhen `httpBatchStreamLink` has multiple long-running requests, aborting one (with an AbortController) causes \"both\" requests to keep running until the final one has been ended/aborted\n\nCould we have an `httpStreamLink` without batch? All I want is async generator procedures. They are awesome.\n\n### Link to reproduction\n\nStackblitz crashes\n\n### To reproduce\n\nJust call the same long-running procedure twice, abort one and see both still running on the backend.\n\nThe procedure could be something like\n\n```ts\nasync function* () {\n let count = 0\n while (true) {\n console.log('running', count)\n yield count++\n await new Promise(r => setTimeout(r, 1000))\n }\n}\n```\n\n### Additional information\n\nAs a side note: I also noticed that aborts don't get caught at all when running with bun and using the express adapter.\n\n### 👨👧👦 Contributing\n\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[3113,3114],{"name":3069,"color":3070},{"name":3024,"color":3025},6582,"bug: httpBatchStreamLink doesn't a request abort if other requests are on the same batch","2025-03-20T12:03:10Z","https://github.com/trpc/trpc/issues/6582",0.72986114,{"description":3121,"labels":3122,"number":3128,"owner":3027,"repository":3027,"state":3060,"title":3129,"updated_at":3130,"url":3131,"score":3132},"### Provide environment information\r\n\r\n\"@trpc/client\": \"11.0.0-rc.374\",\r\n\"@trpc/server\": \"11.0.0-rc.374\",\r\n\r\n### Describe the bug\r\n\r\nDisconnected subscriptions don't re-subscribe after reconnecting. This can be caused by intermittent network connections.\r\n\r\n### Link to reproduction\r\n\r\nN/A\r\n\r\n### To reproduce\r\n\r\n- Create a simple subscription\r\n- Use it in the client\r\n- Terminate the server\r\n- Check the client as it attempts to reconnect\r\n- Bring back the server online\r\n- Client will be connected once again, but the subscriptions are never restored\r\n\r\n\r\n\r\n\r\n### Additional information\r\n\r\nAdd a way to catch/detect broken connections? onError and onStop does not detect broken network connections\r\n\r\n### 👨👧👦 Contributing\r\n\r\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[3123,3126,3127],{"name":3124,"color":3125},"🙋♂️ help wanted","008672",{"name":3069,"color":3070},{"name":3024,"color":3025},5748,"bug: Disconnected subscriptions don't re-subscribe after reconnecting","2025-03-20T15:42:25Z","https://github.com/trpc/trpc/issues/5748",0.7334914,["Reactive",3134],{},["Set"],["ShallowReactive",3137],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fzGA7W5LKQZNZcUxhvQT_-0km2_sb5VbBo6zOywTGBoo":-1},"/trpc/trpc/6432"]