-
Notifications
You must be signed in to change notification settings - Fork 985
Closed
Description
### Describe the bug
Firestore writes consistently fail on iOS (Expo Go and dev builds) with:
@firebase/firestore: Firestore (11.5.0): WebChannelConnection RPC 'Write' stream transport errored
This happens even after trying all known workarounds. I’m in **Newfoundland, Canada**, and suspect it may be regional or CDN-related.
---
### To Reproduce
Steps:
1. Using Expo SDK 50 / React Native
2. Firebase initialized with long polling:
```js
initializeFirestore(app, {
experimentalForceLongPolling: true,
useFetchStreams: false,
});
- Auth works fine. User signs in, UID retrieved.
- Write attempt:
await setDoc(doc(db, 'users', user.uid), {
username: 'test',
role: 'fan',
});- Console error:
Firestore: WebChannelConnection RPC 'Write' stream transport errored
No success message, no write saved.
Expected behavior
Data should save without RPC transport failure.
Logs
@firebase/firestore: WebChannelConnection RPC 'Write' stream transport errored
Environment
- Device: iPhone 14 and 15 (iOS)
- Expo Go and Expo Dev Build
- Firebase JS SDK: 11.5.0
- Firestore region:
nam5(multi-region US) - Location: Canada (Newfoundland)
Tried Workarounds
experimentalForceLongPolling: trueuseFetchStreams: falsesetLogLevel('debug')shows streaming endpoint timeout- Using REST API works (via
fetch) — confirms Auth + Rules are OK - Firestore rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if true;
}
}
}- Restarted with
expo start --clear - Tried both
getFirestoreandinitializeFirestoreseparately
Additional context
We're building a music profile MVP. Auth works. Profile form works. But .setDoc(...) never saves. Likely WebChannel/CDN/region issue — can Firestore fallback to REST or newer fetch-based transport in mobile?
---