trpc / trpc/trpc

bug: ReadableStream uploading is not supported on safari

Open
#6,895 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

⏮ needs reproduction 🐛 bug: unconfirmed 🙋‍♂️ help wanted
Dominant language
TypeScript
Stars
40.6k
Forks
1.7k
Avg merge
1d 22h
Merged PRs (30d)
22

Description

Provide environment information
System:
    OS: macOS 15.5
    CPU: (12) arm64 Apple M4 Pro
    Memory: 547.69 MB / 24.00 GB
    Shell: 5.9 - /opt/homebrew/bin/zsh
  Binaries:
    Node: 22.13.1 - ~/.nvm/versions/node/v22.13.1/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.9.2 - ~/.nvm/versions/node/v22.13.1/bin/npm
    pnpm: 10.12.1 - ~/.nvm/versions/node/v22.13.1/bin/pnpm
    bun: 1.2.18 - ~/.bun/bin/bun
    Watchman: 2025.07.28.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 139.0.7258.127
    Safari: 18.5
  npmPackages:
    @tanstack/react-query: ^4.40.0 => 4.40.0
    @trpc/client: ^10.45.2 => 10.45.2
    @trpc/react-query: ^10.45.2 => 10.45.2
    @trpc/server: ^10.45.2 => 10.45.2
    react: ^18.3.1 => 18.3.1
    typescript: ~5.8.3 => 5.8.3
Describe the bug

TRPCClientError: ReadableStream uploading is not supported

Getting this error in a few .mutate or mutate/mutateAsync calls using useMutations in safari. It works perfectly well in Chrome and Firebox based browsers.

I initially thought it might be due to batching and changed httpBatchLink to httpLink, also tried to use splitLink while checking for Safari but getting the same issue. It also doesn't fail for all mutations but only some.

Link to reproduction

N/A

To reproduce

N/A

Additional information

No response

👨‍👧‍👦 Contributing
  • 🙋‍♂️ Yes, I'd be down to file a PR fixing this bug!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the TypeScript tRPC client path that handles ReadableStream request bodies and compare its behavior in Safari 18.5 with Chrome; the issue names no file, test, or reproduction. Done means the affected mutations no longer throw the ReadableStream uploading error in Safari, with regression coverage if the project has a suitable test entry point.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.