Jordy
Jordy
TtRPC
Created by Gwendal on 9/19/2024 in #❓-help
"Failed to load response data: No data found for resource with given identifier" in the network tab
As a workaround, adding a header override in Chrome Dev Tools, something like "x-someting": "something", will magically always show the responses now. Also noticed the docs say: Cause the response to be sent with a transfer-encoding: chunked and content-type: application/jsonl https://trpc.io/docs/client/links/httpBatchStreamLink#streaming-mode However, the response does nót return application/jsonl but just application/json : https://github.com/trpc/trpc/blob/93403aa91a838af1cc645193b106c870654664f2/packages/server/src/unstable-core-do-not-import/http/resolveResponse.ts#L507 Maybe that's the issue? And maybe it should include a charset in the response too, as mentioned here? https://github.com/wardi/jsonlines/issues/19#issuecomment-2698043153
6 replies
TtRPC
Created by Gwendal on 9/19/2024 in #❓-help
"Failed to load response data: No data found for resource with given identifier" in the network tab
Came here from Google, researching the same problem. The problem seems to happen when using httpBatchStreamLink, not when using httpBatchLink or httpLink. Also, in my case, only happens on production environments, not localhost (using tanstack start). Still figuring out what's causing it When you take the request URL and open it in a seperate tab, it shows the response. It works fine when inspecting in Firefox Dev Tools. So I think this is bugging out only in Chrome (and Safari) Dev Tools. The data is showing (and streaming in) just fine in my app, but really annoyying it comes with the cost of not having a easy way to debug responses through Chrome Dev Tools. Which makes me want to not use httpBatchStreamLink.
6 replies