WebChannelConnection RPC 'Listen' stream 0x17d185b2 transport errored
Operating System
MacOS 14.6.1
Environment (if applicable)
ionic
Firebase SDK Version
11.4.0
Firebase SDK Product(s)
Firestore
Project Tooling
ionic angular
Detailed Problem Description
running app on android fails to connect to firestore. on ios the same code works just fine. below is the log and package.json
2025-04-01 22:53:34.516 29524-29524 Capacitor/Console it.moblize.baniya W File: https://localhost/main.d388d25aeb71f83b.js - Line 1 - Msg: [2025-04-02T03:53:34.516Z] @firebase/firestore: Firestore (11.4.0): WebChannelConnection RPC 'Write' stream 0x84a843af transport errored: [object Object]
2025-04-01 22:53:34.521 29524-29524 Capacitor/Console it.moblize.baniya D File: - Line 526 - Msg: CapacitorHttp fetch 1743566014267 [object Request]: 251.22412109375 ms
2025-04-01 22:53:34.522 29524-29524 Capacitor/Console it.moblize.baniya W File: https://localhost/main.d388d25aeb71f83b.js - Line 1 - Msg: [2025-04-02T03:53:34.520Z] @firebase/firestore: Firestore (11.4.0): WebChannelConnection RPC 'Listen' stream 0x84a843ae transport errored: [object Object]
2025-04-01 22:53:34.522 29524-29524 Capacitor/Console it.moblize.baniya E File: https://localhost/main.d388d25aeb71f83b.js - Line 1 - Msg: [2025-04-02T03:53:34.520Z] @firebase/firestore: Firestore (11.4.0): Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: [code=unavailable]: The operation could not be completed
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.
2025-04-01 22:53:34.523 29524-29524 Capacitor/Console it.moblize.baniya I File: https://localhost/main.d388d25aeb71f83b.js - Line 1 - Msg: error in loadCountryConfig in data.service.ts: FirebaseError: [code=unavailable]: Failed to get document because the client is offline.
2025-04-01 22:53:34.524 29524-29524 Capacitor/Console it.moblize.baniya I File: https://localhost/7758.70ac04d6f4c667a2.js - Line 1 - Msg: Country config is: undefined
2025-04-01 22:53:34.527 29524-29588 Capacitor it.moblize.baniya D Handling local request: https://localhost/7372.41508e720f337a55.js
2025-04-01 22:53:34.528 29524-29524 Capacitor/Console it.moblize.baniya E File: https://localhost/main.d388d25aeb71f83b.js - Line 1 - Msg: ERROR FirebaseError: [code=unavailable]: Failed to get document because the client is offline.
2025-04-01 22:53:34.530 29524-29524 Capacitor/Plugin it.moblize.baniya V To native (Capacitor plugin): callbackId: 134029103, pluginId: CapacitorHttp, methodName: request
2025-04-01 22:53:34.530 29524-29524 Capacitor it.moblize.baniya V callback: 134029103, pluginId: CapacitorHttp, methodName: request, methodData: {"url":"https:\/\/firestore.googleapis.com\/google.firestore.v1.Firestore\/Write\/channel?VER=8&database=projects%2Fbaniya-38d78%2Fdatabases%2F(default)&RID=11343&CVER=22&X-HTTP-Session-Id=gsessionid&zx=9tstp351wfrr&t=1","method":"POST","data":"headers=X-Goog-Api-Client%3Agl-js%2F%20fire%2F11.4.0%0D%0AContent-Type%3Atext%2Fplain%0D%0AX-Firebase-GMPID%3A1%3A329500481487%3Aweb%3A7157d20dc5123abd4ea4ba%0D%0A&count=1&ofs=0&req0___data__=%7B%22database%22%3A%22projects%2Fbaniya-38d78%2Fdatabases%2F(default)%22%7D","dataType":"text","headers":{"Content-Type":"application\/x-www-form-urlencoded","content-type":"application\/x-www-form-urlencoded"}}
2025-04-01 22:53:34.532 29524-29681 CapacitorCookies it.moblize.baniya I Getting cookies at: 'https://firestore.googleapis.com/google.firestore.v1.Firestore/Write/channel?VER=8&database=projects%2Fbaniya-38d78%2Fdatabases%2F(default)&RID=11343&CVER=22&X-HTTP-Session-Id=gsessionid&zx=9tstp351wfrr&t=1'
2025-04-01 22:53:34.536 29524-29588 Capacitor it.moblize.baniya D Handling local request: https://localhost/7240.cf85a73451ebfadb.js
2025-04-01 22:53:34.536 29524-29588 Capacitor it.moblize.baniya D Handling local request: https://localhost/8805.43397451a063ed4d.js
2025-04-01 22:53:34.543 29524-295
2025-04-01 22:54:34.024 29524-29681 CapacitorCookies it.moblize.baniya I Getting cookies at: 'https://firestore.googleapis.com/google.firestore.v1.Firestore/Write/channel?VER=8&database=projects%2Fbaniya-38d78%2Fdatabases%2F(default)&RID=49772&CVER=22&X-HTTP-Session-Id=gsessionid&zx=ee5bfmfusowp&t=1'
2025-04-01 22:54:34.036 29524-29681 Capacitor/Plugin it.moblize.baniya E Unable to resolve host "firestore.googleapis.com": No address associated with hostname
2025-04-01 22:54:34.037 29524-29681 Capacitor it.moblize.baniya D Sending plugin error: {"save":false,"callbackId":"134029112","pluginId":"CapacitorHttp","methodName":"request","success":false,"error":{"message":"Unable to resolve host \"firestore.googleapis.com\": No address associated with hostname","code":"UnknownHostException"}}
2025-04-01 22:54:34.043 29524-29524 Capacitor/Console it.moblize.baniya D File: - Line 530 - Msg: CapacitorHttp fetch 1743566074012 [object Request]: 29.348876953125 ms
2025-04-01 22:54:34.045 29524-29524 Capacitor/Console it.moblize.baniya E File: https://localhost/polyfills.91aae63ddd436914.js - Line 1 - Msg: Error: Unable to resolve host "firestore.googleapis.com": No address associated with hostname
2025-04-01 22:54:34.048 29524-29524 Capacitor/Console it.moblize.baniya W File: https://localhost/main.d388d25aeb71f83b.js - Line 1 - Msg: [2025-04-02T03:54:34.047Z] @firebase/firestore: Firestore (11.4.0): WebChannelConnection RPC 'Write' stream 0x84a843ba transport errored: [object Object]
2025-04-01 22:55:13.030 29524-29524 Capacitor/Plugin it.moblize.baniya V To native (Capacitor plugin): callbackId: 134029113, pluginId: CapacitorHttp, methodName: request
2025-04-01 22:55:13.033 29524-29524 Capacitor it.moblize.baniya V callback: 134029113, pluginId: CapacitorHttp, methodName: request, methodData: {"url":"https:\/\/firestore.googleapis.com\/google.firestore.v1.Firestore\/Write\/channel?VER=8&database=projects%2Fbaniya-38d78%2Fdatabases%2F(default)&RID=9084&CVER=22&X-HTTP-Session-Id=gsessionid&zx=b1ytazxppbqz&t=1","method":"POST","data":"headers=X-Goog-Api-Client%3Agl-js%2F%20fire%2F11.4.0%0D%0AContent-Type%3Atext%2Fplain%0D%0AX-Firebase-GMPID%3A1%3A329500481487%3Aweb%3A7157d20dc5123abd4ea4ba%0D%0A&count=1&ofs=0&req0___data__=%7B%22database%22%3A%22projects%2Fbaniya-38d78%2Fdatabases%2F(default)%22%7D","dataType":"text","headers":{"Content-Type":"application\/x-www-form-urlencoded","content-type":"application\/x-www-form-urlencoded"}}
2025-04-01 22:55:13.043 29524-29681 CapacitorCookies it.moblize.baniya I Getting cookies at: 'https://firestore.googleapis.com/google.firestore.v1.Firestore/Write/channel?VER=8&database=projects%2Fbaniya-38d78%2Fdatabases%2F(default)&RID=9084&CVER=22&X-HTTP-Session-Id=gsessionid&zx=b1ytazxppbqz&t=1'
2025-04-01 22:55:13.057 29524-29681 Capacitor/Plugin it.moblize.baniya E Unable to resolve host "firestore.googleapis.com": No address associated with hostname
2025-04-01 22:55:13.058 29524-29681 Capacitor it.moblize.baniya D Sending plugin error: {"save":false,"callbackId":"134029113","pluginId":"CapacitorHttp","methodName":"request","success":false,"error":{"message":"Unable to resolve host \"firestore.googleapis.com\": No address associated with hostname","code":"UnknownHostException"}}
2025-04-01 22:55:13.066 29524-29524 Capacitor/Console it.moblize.baniya D File: - Line 530 - Msg: CapacitorHttp fetch 1743566113019 [object Request]: 45.908935546875 ms
2025-04-01 22:55:13.067 29524-29524 Capacitor/Console it.moblize.baniya E File: https://localhost/polyfills.91aae63ddd436914.js - Line 1 - Msg: Error: Unable to resolve host "firestore.googleapis.com": No address associated with hostname
2025-04-01 22:55:13.071 29524-29524 Capacitor/Console it.moblize.baniya W File: https://localhost/main.d388d25aeb71f83b.js - Line 1 - Msg: [2025-04-02T03:55:13.070Z] @firebase/firestore: Firestore (11.4.0): WebChannelConnection RPC 'Write' stream 0x84a843bb transport errored: [object Object]
2025-04-01 22:56:19.031 29524-29524 Capacitor/Plugin it.moblize.baniya V To native (Capacitor plugin): callbackId: 134029114, pluginId: CapacitorHttp, methodName: request
2025-04-01 22:56:19.034 29524-29524 Capacitor it.moblize.baniya V callback: 134029114, pluginId: CapacitorHttp, methodName: request, methodData: {"url":"https:\/\/firestore.googleapis.com\/google.firestore.v1.Firestore\/Write\/channel?VER=8&database=projects%2Fbaniya-38d78%2Fdatabases%2F(default)&RID=1430&CVER=22&X-HTTP-Session-Id=gsessionid&zx=sjjsdo2ibz0e&t=1","method":"POST","data":"headers=X-Goog-Api-Client%3Agl-js%2F%20fire%2F11.4.0%0D%0AContent-Type%3Atext%2Fplain%0D%0AX-Firebase-GMPID%3A1%3A329500481487%3Aweb%3A7157d20dc5123abd4ea4ba%0D%0A&count=1&ofs=0&req0___data__=%7B%22database%22%3A%22projects%2Fbaniya-38d78%2Fdatabases%2F(default)%22%7D","dataType":"text","headers":{"Content-Type":"application\/x-www-form-urlencoded","content-type":"application\/x-www-form-urlencoded"}}
2025-04-01 22:56:19.047 29524-29928 CapacitorCookies it.moblize.baniya I Getting cookies at: 'https://firestore.googleapis.com/google.firestore.v1.Firestore/Write/channel?VER=8&database=projects%2Fbaniya-38d78%2Fdatabases%2F(default)&RID=1430&CVER=22&X-HTTP-Session-Id=gsessionid&zx=sjjsdo2ibz0e&t=1'
2025-04-01 22:56:19.060 29524-29928 Capacitor/Plugin it.moblize.baniya E Unable to resolve host "firestore.googleapis.com": No address associated with hostname
2025-04-01 22:56:19.061 29524-29928 Capacitor it.moblize.baniya D Sending plugin error: {"save":false,"callbackId":"134029114","pluginId":"CapacitorHttp","methodName":"request","success":false,"error":{"message":"Unable to resolve host \"firestore.googleapis.com\": No address associated with hostname","code":"UnknownHostException"}}
2025-04-01 22:56:19.068 29524-29524 Capacitor/Console it.moblize.baniya D File: - Line 530 - Msg: CapacitorHttp fetch 1743566179019 [object Request]: 47.537841796875 ms
Based on suggestions here is my code looks like:
imports: [
BrowserModule,
IonicModule.forRoot(
{
mode: 'ios'
}
),
provideFirebaseApp(() => initializeApp(firebaseConfig)),
provideAuth(() => {
if (Capacitor.isNativePlatform()) {
return initializeAuth(getApp(), {
persistence: indexedDBLocalPersistence,
});
} else {
return getAuth();
}
}),
provideFirestore(() => {
return initializeFirestore(getApp(), {
experimentalForceLongPolling: true,
})
}),
AppRoutingModule,
FormsModule,
ReactiveFormsModule,
CurrencyPipe
],
My package.json looks like below:
{
"name": "baniya",
"version": "0.0.1",
"author": "Moblize.it LLC",
"homepage": "https://baniya.app/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"lint": "ng lint"
},
"private": true,
"dependencies": {
"@angular/common": "^15.0.0",
"@angular/core": "^15.0.0",
"@angular/fire": "^7.5.0",
"@angular/forms": "^15.0.0",
"@angular/platform-browser": "^15.0.0",
"@angular/platform-browser-dynamic": "^15.0.0",
"@angular/router": "^15.0.0",
"@capacitor-community/apple-sign-in": "^7.0.0",
"@capacitor/android": "7.0.1",
"@capacitor/app": "7.0.0",
"@capacitor/browser": "7.0.0",
"@capacitor/core": "^7.0.1",
"@capacitor/haptics": "7.0.0",
"@capacitor/ios": "7.0.1",
"@capacitor/keyboard": "7.0.0",
"@capacitor/network": "^7.0.0",
"@capacitor/status-bar": "7.0.0",
"@capgo/capacitor-social-login": "^1.2.6",
"@googlemaps/js-api-loader": "^1.16.8",
"@ionic/angular": "^7.0.0",
"chart.js": "^4.3.0",
"chartjs-gauge": "^0.3.0",
"chartjs-plugin-datalabels": "^2.2.0",
"firebase": "^9.22.2",
"ionicons": "^7.0.0",
"moment": "^2.29.4",
"rxjs": "~7.5.0",
"swiper": "^9.3.2",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^15.0.0",
"@angular-eslint/builder": "^15.0.0",
"@angular-eslint/eslint-plugin": "^15.0.0",
"@angular-eslint/eslint-plugin-template": "^15.0.0",
"@angular-eslint/schematics": "^15.0.0",
"@angular-eslint/template-parser": "^15.0.0",
"@angular/cli": "^15.0.0",
"@angular/compiler": "^15.0.0",
"@angular/compiler-cli": "^15.0.0",
"@angular/language-service": "^15.0.0",
"@capacitor/assets": "^2.0.4",
"@capacitor/cli": "^7.0.1",
"@ionic/angular-toolkit": "^9.0.0",
"@types/google.maps": "^3.58.1",
"@types/jasmine": "~4.0.0",
"@types/node": "^12.11.1",
"@typescript-eslint/eslint-plugin": "5.3.0",
"@typescript-eslint/parser": "5.3.0",
"eslint": "^7.6.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsdoc": "30.7.6",
"eslint-plugin-prefer-arrow": "1.2.2",
"jasmine-core": "~4.3.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"ts-node": "~8.3.0",
"typescript": "^4.8.4"
},
"description": "Baniya App by Moblize.it LLC"
}
Steps and code to reproduce issue
just trying to build the app.
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Hi @moblizeit, thank you for reporting this issue. Some quick questions:
- Is the error persistent or happening intermittently on android device?
- I noticed that you have configured
experimentalForceLongPolling, were you using a proxy? - Could you please run the diagnosis page https://debug-my.firebaseapp.com/ on your iOS and Android device separately to see if there is a need to configure
experimentalForceLongPolling. - Could you please set the log level to "debug" and share the logs.
I wonder if this could be related to capacitor configuration. A similar issue here : https://github.com/firebase/firebase-js-sdk/issues/8255
I've been facing a similar issue specifically when testing our app for iPad Air (5th generation) on iOS 18.4 which has caused our app to not pass Apple's review stage.
Initially I thought it was the Firestore configuration, it's odd for me because if I freshly install the app on the simulator device it works fine, yet say I close the app after a fresh install, or just use it normally then this error arises and causes Firestore to not connect.
For context the following does not work for me, which makes me think its deeper than my Vue 3, Ionic, Capacitor setup:
const firebaseConfig = {
apiKey: process.env.VUE_APP_FIREBASE_SECRET_KEY,
authDomain: process.env.VUE_APP_FIREBASE_AUTH_DOMAIN,
projectId: process.env.VUE_APP_FIREBASE_PROJECT_ID,
storageBucket: process.env.VUE_APP_FIREBASE_STORAGE_BUCKET,
messagingSenderId: process.env.VUE_APP_FIREBASE_MESSAGING_SENDERID,
appId: process.env.VUE_APP_FIREBASE_APP_ID,
measurementId: process.env.VUE_APP_FIREBASE_MEASUREMENT_ID,
};
// Initialize Firebase
export const app = initializeApp(firebaseConfig);
export const analytics = getAnalytics(app);
export const storage = getStorage(app);
// `FirestoreSettings` interface extends `PrivateSettings` which contains `useFetchStreams`.
const firestoreSettings: FirestoreSettings & { useFetchStreams: boolean } = {
experimentalForceLongPolling: true,
useFetchStreams: false
};
export const db = initializeFirestore(app, firestoreSettings, '(default)');
setLogLevel("debug");
// Function to determine the appropriate authentication instance
export function whichAuth() {
let auth;
if (Capacitor.isNativePlatform()) {
console.log("(firebase) FIREBASE_NATIVE_AUTH!");
auth = initializeAuth(app, {
persistence: indexedDBLocalPersistence,
});
} else {
console.log("(firebase) FIREBASE_AUTH!");
auth = getAuth(app);
}
return auth;
}
// Get the authentication instance based on the platform
export const auth = whichAuth();
I'm facing the same issue.
Nuxt3 + firebase 11.6.0 (Web)
We followed everything from the docs: https://firebase.google.com/docs/firestore/quickstart
Hi @moblizeit @khaelou @mark-redlayers , could you please set the log level to "debug" and share the logs? which sdk and mobile device versions are you using?
It would be much appreciated if anyone can provide a minimal reproduction app.
For me it was iPad Air (5th generation) iOS 18.3.2+ when testing on Xcode Simulator, it's preventing our app from passing Apple review process and we literally tried everything. I'm using "firebase" 11.6, I will be able to provide detailed logs when near workstation. I even tried to use VueFire with no luck, more specifically calls to firestore.
In further detail with setLogLevel("debug");
"firebase": "^11.6.0", "vue": "3.5.13", "vue-router": "4.5.0", "vuefire": "^3.2.1"
The internet connection of the Xcode simulator device is indeed connected to Wifi, also it only works on a fresh app install to the target device. If I were to say close the app after the fresh install and re-open this error will arrise on iPad Air (5th generation) on iOS 18.3.2+
⚡️ [log] - [2025-04-09T01:19:09.630Z] @firebase/firestore: Firestore (11.6.0): FirebaseAuthCredentialsProvider Auth detected
⚡️ [log] - [2025-04-09T01:19:09.631Z] @firebase/firestore: Firestore (11.6.0): FirestoreClient Received user= null
⚡️ [log] - [2025-04-09T01:19:09.631Z] @firebase/firestore: Firestore (11.6.0): FirestoreClient Using default OnlineComponentProvider
⚡️ [log] - [2025-04-09T01:19:09.632Z] @firebase/firestore: Firestore (11.6.0): FirestoreClient Using default OfflineComponentProvider
⚡️ [log] - [2025-04-09T01:19:09.632Z] @firebase/firestore: Firestore (11.6.0): FirestoreClient Initializing OfflineComponentProvider
⚡️ [log] - [2025-04-09T01:19:09.634Z] @firebase/firestore: Firestore (11.6.0): FirestoreClient Initializing OnlineComponentProvider
⚡️ [log] - [2025-04-09T01:19:09.638Z] @firebase/firestore: Firestore (11.6.0): MemoryPersistence Starting transaction: Allocate target
⚡️ [log] - [2025-04-09T01:19:09.639Z] @firebase/firestore: Firestore (11.6.0): MemoryPersistence Starting transaction: Execute query
⚡️ [warn] - [2025-04-09T01:19:12.689Z] @firebase/firestore: Firestore (11.6.0): WebChannelConnection RPC 'Listen' stream 0x55cff3b9 transport errored:
⚡️ [log] - [2025-04-09T01:19:12.689Z] @firebase/firestore: Firestore (11.6.0): PersistentStream close with error: FirebaseError: [code=unavailable]: The operation could not be completed
⚡️ [log] - [2025-04-09T01:19:12.689Z] @firebase/firestore: Firestore (11.6.0): OnlineStateTracker Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: [code=unavailable]: The operation could not be completed
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.
⚡️ [log] - [2025-04-09T01:19:12.689Z] @firebase/firestore: Firestore (11.6.0): ExponentialBackoff Backing off for 2161 ms (base delay: 2250 ms, delay with jitter: 2247 ms, last attempt: 86 ms ago)
⚡️ [log] - [2025-04-09T01:19:12.690Z] @firebase/firestore: Firestore (11.6.0): MemoryPersistence Starting transaction: Release target
⚡️ [log] - [2025-04-09T01:19:14.851Z] @firebase/firestore: Firestore (11.6.0): WebChannelConnection Creating RPC 'Listen' stream 0x55cff3ba: https://firestore.googleapis.com/google.firestore.v1.Firestore/Listen/channel {"httpSessionIdParam":"gsessionid","initMessageHeaders":{"X-Goog-Api-Client":"gl-js/ fire/11.6.0","Content-Type":"text/plain","X-Firebase-GMPID":"1:558298752854:web:053b4b25cce33f50d2d8f7"},"messageUrlParams":{"database":"(default)"},"sendRawJson":true,"supportsCrossDomainXhr":true,"internalChannelParams":{"forwardChannelRequestTimeoutMs":600000},"forceLongPolling":true,"detectBufferingProxy":false,"encodeInitMessageHeaders":true}
⚡️ [log] - [2025-04-09T01:19:10.664Z] @firebase/firestore: Firestore (11.6.0): ExponentialBackoff Backing off for 1939 ms (base delay: 1500 ms, delay with jitter: 2031 ms, last attempt: 92 ms ago)
⚡️ [log] - [2025-04-09T01:19:10.664Z] @firebase/firestore: Firestore (11.6.0): MemoryPersistence Starting transaction: Release target
⚡️ [log] - [2025-04-09T01:19:10.665Z] @firebase/firestore: Firestore (11.6.0): MemoryPersistence Starting transaction: Release target
⚡️ [log] - [2025-04-09T01:19:10.665Z] @firebase/firestore: Firestore (11.6.0): MemoryPersistence Starting transaction: Release target
⚡️ [log] - [2025-04-09T01:19:10.668Z] @firebase/firestore: Firestore (11.6.0): MemoryPersistence Starting transaction: Allocate target
⚡️ [log] - [2025-04-09T01:19:10.668Z] @firebase/firestore: Firestore (11.6.0): MemoryPersistence Starting transaction: Execute query
Hi @moblizeit @khaelou @mark-redlayers , could you please set the log level to "debug" and share the logs? which sdk and mobile device versions are you using?
It would be much appreciated if anyone can provide a minimal reproduction app.
Again, using Nuxt3 with latest firebase version 11.6.0 [web JavaScript]
setLogLevel("debug")
[2025-04-09T12:59:58.327Z] @firebase/firestore: Firestore (11.6.0): FirestoreClient Received user= PcwnmPqMebPfTsjht5z9FsCGh9q1
chunk-KPQ6NQGN.js?v=2c1e6975:1072 [2025-04-09T12:59:58.339Z] @firebase/firestore: Firestore (11.6.0): FirestoreClient Using default OnlineComponentProvider
chunk-KPQ6NQGN.js?v=2c1e6975:1072 [2025-04-09T12:59:58.340Z] @firebase/firestore: Firestore (11.6.0): FirestoreClient Using default OfflineComponentProvider
chunk-KPQ6NQGN.js?v=2c1e6975:1072 [2025-04-09T12:59:58.340Z] @firebase/firestore: Firestore (11.6.0): FirestoreClient Initializing OfflineComponentProvider
chunk-KPQ6NQGN.js?v=2c1e6975:1072 [2025-04-09T12:59:58.344Z] @firebase/firestore: Firestore (11.6.0): FirestoreClient Initializing OnlineComponentProvider
chunk-KPQ6NQGN.js?v=2c1e6975:1072 [2025-04-09T12:59:58.351Z] @firebase/firestore: Firestore (11.6.0): MemoryPersistence Starting transaction: Allocate target
chunk-KPQ6NQGN.js?v=2c1e6975:1072 [2025-04-09T12:59:58.356Z] @firebase/firestore: Firestore (11.6.0): MemoryPersistence Starting transaction: Execute query
chunk-KPQ6NQGN.js?v=2c1e6975:1072 [2025-04-09T12:59:58.358Z] @firebase/firestore: Firestore (11.6.0): QueryEngine Using full collection scan to execute query: Query(target=Target(muted_users/2117/users, orderBy: [__name__ (asc)]); limitType=F)
chunk-KPQ6NQGN.js?v=2c1e6975:1072 [2025-04-09T12:59:58.364Z] @firebase/firestore: Firestore (11.6.0): WebChannelConnection Creating RPC 'Listen' stream 0x88124347: https://firestore.googleapis.com/google.firestore.v1.Firestore/Listen/channel {"httpSessionIdParam":"gsessionid","initMessageHeaders":{"X-Goog-Api-Client":"gl-js/ fire/11.6.0","Content-Type":"text/plain","X-Firebase-GMPID":"1:515103117724:web:21c8c3369347a2bc793859","Authorization":"Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjcxMTE1MjM1YTZjNjE0NTRlZmRlZGM0NWE3N2U0MzUxMzY3ZWViZTAiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vZXllY2FuZHl2aWRzLTVmY2ExIiwiYXVkIjoiZXllY2FuZHl2aWRzLTVmY2ExIiwiYXV0aF90aW1lIjoxNzQzMzY4NTc3LCJ1c2VyX2lkIjoiUGN3bm1QcU1lYlBmVHNqaHQ1ejlGc0NHaDlxMSIsInN1YiI6IlBjd25tUHFNZWJQZlRzamh0NXo5RnNDR2g5cTEiLCJpYXQiOjE3NDQyMDMzMDksImV4cCI6MTc0NDIwNjkwOSwiZW1haWwiOiJtYXJrX2hhZGRhZEBvdXRsb29rLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJmaXJlYmFzZSI6eyJpZGVudGl0aWVzIjp7ImVtYWlsIjpbIm1hcmtfaGFkZGFkQG91dGxvb2suY29tIl19LCJzaWduX2luX3Byb3ZpZGVyIjoicGFzc3dvcmQifX0.qikMONJ3p5jdLUOxEKMGpG432Ro1sn7x2LZtAu1lRp4Cfl4iPM6SfVWOiEhia3KdBBIupNGG0k2uxHSbiqF53HFVHLsJlQmD57RWB-XgL1v_dJvFKAiFyc_kCEfCYLYRQ-I2521RX4xYLN0_pL-78Tzptr6dbWHKVi-m0ulmF7R0CIQJ3W2OG9pA7CBsIhJNH87yWXwN78lHYJHnC6O9ORlfJxkG5KPRREdTFPRXuBVST_sWRZTUM50wwW9ZOTtXHywI-WGfQxu-e-w1Z0nayBv2ALjDsv9zAW1QoUZ9O9UfRx4VF8MV4D7O6fJWwmXryP9ODCfu41LJzgDu-XRV2w"},"messageUrlParams":{"database":"projects/eyecandyvids-5fca1/databases/(default)"},"sendRawJson":true,"supportsCrossDomainXhr":true,"internalChannelParams":{"forwardChannelRequestTimeoutMs":600000},"forceLongPolling":false,"detectBufferingProxy":true,"useFetchStreams":true,"encodeInitMessageHeaders":true}
chunk-KPQ6NQGN.js?v=2c1e6975:1072 [2025-04-09T12:59:58.367Z] @firebase/firestore: Firestore (11.6.0): MemoryPersistence Starting transaction: Allocate target
chunk-KPQ6NQGN.js?v=2c1e6975:1072 [2025-04-09T12:59:58.368Z] @firebase/firestore: Firestore (11.6.0): MemoryPersistence Starting transaction: Execute query
chunk-KPQ6NQGN.js?v=2c1e6975:1072 [2025-04-09T12:59:58.369Z] @firebase/firestore: Firestore (11.6.0): QueryEngine Using full collection scan to execute query: Query(target=Target(live_chats/2117/chats, orderBy: [timestamp (asc), __name__ (asc)]); limitType=F)
chunk-KPQ6NQGN.js?v=2c1e6975:1072 [2025-04-09T12:59:58.457Z] @firebase/firestore: Firestore (11.6.0): FirebaseAppCheckTokenProvider AppCheck not yet detected
chunk-KPQ6NQGN.js?v=2c1e6975:1072 [2025-04-09T12:59:58.463Z] @firebase/firestore: Firestore (11.6.0): WebChannelConnection Opening RPC 'Listen' stream 0x88124347 transport.
chunk-KPQ6NQGN.js?v=2c1e6975:1072 [2025-04-09T12:59:58.467Z] @firebase/firestore: Firestore (11.6.0): WebChannelConnection RPC 'Listen' stream 0x88124347 sending: {"database":"projects/eyecandyvids-5fca1/databases/(default)","addTarget":{"query":{"structuredQuery":{"from":[{"collectionId":"users"}],"orderBy":[{"field":{"fieldPath":"__name__"},"direction":"ASCENDING"}]},"parent":"projects/eyecandyvids-5fca1/databases/(default)/documents/muted_users/2117"},"targetId":2}}
chunk-KPQ6NQGN.js?v=2c1e6975:1072 [2025-04-09T12:59:58.467Z] @firebase/firestore: Firestore (11.6.0): WebChannelConnection RPC 'Listen' stream 0x88124347 sending: {"database":"projects/eyecandyvids-5fca1/databases/(default)","addTarget":{"query":{"structuredQuery":{"from":[{"collectionId":"chats"}],"orderBy":[{"field":{"fieldPath":"timestamp"},"direction":"ASCENDING"},{"field":{"fieldPath":"__name__"},"direction":"ASCENDING"}]},"parent":"projects/eyecandyvids-5fca1/databases/(default)/documents/live_chats/2117"},"targetId":4}}
chunk-KPQ6NQGN.js?v=2c1e6975:1072 [2025-04-09T12:59:58.774Z] @firebase/firestore: Firestore (11.6.0): AsyncQueue Visibility state changed to hidden
[2025-04-09T12:59:58.808Z] @firebase/firestore: Firestore (11.6.0): WebChannelConnection RPC 'Listen' stream 0x88124347 transport opened.
chunk-KPQ6NQGN.js?v=2c1e6975:1072 [2025-04-09T12:59:58.996Z] @firebase/firestore: Firestore (11.6.0): PersistentStream close with error: FirebaseError: [code=unavailable]: The operation could not be completed
chunk-KPQ6NQGN.js?v=2c1e6975:1072 [2025-04-09T12:59:59.005Z] @firebase/firestore: Firestore (11.6.0): WebChannelConnection Creating RPC 'Listen' stream 0x88124348: https://firestore.googleapis.com/google.firestore.v1.Firestore/Listen/channel {"httpSessionIdParam":"gsessionid","initMessageHeaders":{"X-Goog-Api-Client":"gl-js/ fire/11.6.0","Content-Type":"text/plain","X-Firebase-GMPID":"1:515103117724:web:21c8c3369347a2bc793859","Authorization":"Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjcxMTE1MjM1YTZjNjE0NTRlZmRlZGM0NWE3N2U0MzUxMzY3ZWViZTAiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vZXllY2FuZHl2aWRzLTVmY2ExIiwiYXVkIjoiZXllY2FuZHl2aWRzLTVmY2ExIiwiYXV0aF90aW1lIjoxNzQzMzY4NTc3LCJ1c2VyX2lkIjoiUGN3bm1QcU1lYlBmVHNqaHQ1ejlGc0NHaDlxMSIsInN1YiI6IlBjd25tUHFNZWJQZlRzamh0NXo5RnNDR2g5cTEiLCJpYXQiOjE3NDQyMDMzMDksImV4cCI6MTc0NDIwNjkwOSwiZW1haWwiOiJtYXJrX2hhZGRhZEBvdXRsb29rLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJmaXJlYmFzZSI6eyJpZGVudGl0aWVzIjp7ImVtYWlsIjpbIm1hcmtfaGFkZGFkQG91dGxvb2suY29tIl19LCJzaWduX2luX3Byb3ZpZGVyIjoicGFzc3dvcmQifX0.qikMONJ3p5jdLUOxEKMGpG432Ro1sn7x2LZtAu1lRp4Cfl4iPM6SfVWOiEhia3KdBBIupNGG0k2uxHSbiqF53HFVHLsJlQmD57RWB-XgL1v_dJvFKAiFyc_kCEfCYLYRQ-I2521RX4xYLN0_pL-78Tzptr6dbWHKVi-m0ulmF7R0CIQJ3W2OG9pA7CBsIhJNH87yWXwN78lHYJHnC6O9ORlfJxkG5KPRREdTFPRXuBVST_sWRZTUM50wwW9ZOTtXHywI-WGfQxu-e-w1Z0nayBv2ALjDsv9zAW1QoUZ9O9UfRx4VF8MV4D7O6fJWwmXryP9ODCfu41LJzgDu-XRV2w"},"messageUrlParams":{"database":"projects/eyecandyvids-5fca1/databases/(default)"},"sendRawJson":true,"supportsCrossDomainXhr":true,"internalChannelParams":{"forwardChannelRequestTimeoutMs":600000},"forceLongPolling":false,"detectBufferingProxy":true,"useFetchStreams":true,"encodeInitMessageHeaders":true}
I'm not able at the moment to create a repo for this, have other things to do.
will try to share as much as i can. this request result always (net::ERR_ABORTED 400 (Bad Request))
/google.firestore.v1.Firestore/Listen/channel?gsessionid=Ld4K6F0NE85h8ViI9FucgGCiG37xHFrwU3zgfm8C--M&VER=8&database=projects%2Feyecandyvids-5fca1%2Fdatabases%2F(default)&RID=rpc&SID=tBWQhvwKo8FtrwUu5NcJyA&AID=0&CI=0&TYPE=xmlhttp&zx=rhba2x7tbb4l&t=1
I did debug and i saw that onSnapshot wasn't firing at all.
Note:
On our previous version project: Nuxt2 and firebase 9.8.2, this was working fine AND still works fine.
And now even if I downgrade from firebase 11.6.0 to firebase 9.8.2, the bug remains the same. [with nuxt3].
Let me know if u need more info. Or if there is anything that i've missed.
Thanks in advance
With the given logs and info, it is hard to debug what leads to the WebChannelConnection issue. There is a new update, which adds assertion ID to error messages instead of minifying them completely, expected to be released soon. Hopefully, it could provide us more info into the error logs.
I will update the thread once it is released, and please try the new SDK version to see if WebChannelConnection RPC 'Listen' stream XXX transport errored:can tell us more.
@mark-redlayers, could you please elaborate on "I did debug and i saw that onSnapshot wasn't firing at all."?
if you downgrade to Nuxt2, would it work fine?
@khaelou not sure if iOS 18.3.2+ has similar issues, but iOS 18.4 RC Simulator is having connection issues. Could you please check if other simulators on Xcode also has the same problem?
Other than that, if fresh install is working, but re-opening is problematic, maybe this could be related to persistence. Could you please try clean the cache before closing the app and see if the issue persist?
@milaGGL The connection issue for me only persists with iOS above 18.3.1 which is why I stated iOS 18.3.2+. I've even tried no persistence with zero luck. I even tried downgrading and rebuilding the app many times over yet left defeated by this issue.
This is causing Apple to reject app review process, it occurs when testing on iPad Air (5th generation) Simulator device, it connects to Firestore on a fresh install of our app only (re-opens / close to re-open would arise issue).
@milaGGL I created a barebones reproduction repo, this can be tested on Xcode Simulator and includes steps to test why Firestore won't connect on iOS 18.3.2 and beyond.
@khaelou I see, so iOS versions below 18.3.2 don't have this issue. Thanks for the repro app, I will try reproducing the error.
@milaGGL Yes exactly, yet I believe it's some restriction now placed on URLSession as a modification to such lines in @ionic-team/capacitor allow Firestore and Authentication to pass yet I still haven't gotten images to load through.
With the given logs and info, it is hard to debug what leads to the WebChannelConnection issue. There is a new update, which adds assertion ID to error messages instead of minifying them completely, expected to be released soon. Hopefully, it could provide us more info into the error logs.
I will update the thread once it is released, and please try the new SDK version to see if
WebChannelConnection RPC 'Listen' stream XXX transport errored:can tell us more.
@milaGGL Hey sorry for late reply!
each failed request gives the same warning like above.
I can't downgrade to Nuxt2, but i have another branch which already uses Nuxt2 and firebase 9.8.2 as mentioned before and works very well.
Same implementation was done, but using Nuxt3 and latest firebase version.
Hey, same here,
It works fine in production, but I’m running into issues locally.
- I tried reverting the Firebase version.
- I also rolled back recent code changes.
- Additionally, I enabled the experimentalAutoDetectLongPolling flag and set it to true.
The error still occurs..
It turned out the issue was caused by an incorrect projectId. While debugging the WebChannel request, I noticed that the projectId was set to undefined, which pointed me in the right direction:
https://firestore.googleapis.com/google.firestore.v1.Firestore/Listen/channel?VER=8&database=projects%2Fundefined%2Fdatabases%2F(default)&********
@mark-redlayers ,The new firebase version will be released end of April, in which hopefully we should be able to get more error info. If you are willing to, you can try doing custom build on the firestore now, and use that in your app to try out the feature early.
I was facing the same issue (Chrome Extension), but the reason was using the wrong db. Instead of db = getFirestore(app) I used db = getFirestore(app, "db name here") and it worked
I was facing the same issue (Chrome Extension), but the reason was using the wrong db. Instead of db = getFirestore(app) I used db = getFirestore(app, "db name here") and it worked
Hey @ouksal i tried that, and seems to work. why did it work this way? Any documentation to follow? thanks in advance
@ouksal, thank you so much for sharing this.
@ouksal, @mark-redlayers, are you using the default database or a custom (named) one? db = getFirestore(app) returns the default DB, and you should not be required to manually put in the DB name unless you want the named DB.
I was facing the same issue (Chrome Extension), but the reason was using the wrong db. Instead of db = getFirestore(app) I used db = getFirestore(app, "db name here") and it worked
Thanks a lot, this is why and how to fix it.
Specifying/changing the named DB does not fix the issue for me (only ever have been using the default/unspecified name), so I'm still seeing the same errors due to the iOS 18.4 RC Simulator bug mentioned previously
@seanblonien I was literally facing this issue preventing our App Review process yet a temporary fix for me was to adjust from using URLSession.shared in @capacitor/ios and @capacitor/android.
I then also needed to use CapacitorHttp plugin, it's a fairly hacked solution yet the only way I was able to get it working in XC Simulator considering iOS 18.3.2 and beyond.
You may need to find a workaround if not using Capacitor. My guess is after the iOS 18.3.2 update some things broke behind the scenes for libraries that have gone untested.
It seems to be a Simulator bug in XC 16.3 as mentioned here 🫡
I was facing the same issue (Chrome Extension), but the reason was using the wrong db. Instead of db = getFirestore(app) I used db = getFirestore(app, "db name here") and it worked
Tried same but it doesn't worked for me
Here is what worked for me
export const db = initializeFirestore(app, { cacheSizeBytes: CACHE_SIZE_UNLIMITED, ignoreUndefinedProperties: true })
I was running an expo project and I kept getting this same error. The problem was only coming up when I used ios Similator latest ( OS 18.4) and not on Android. So I changed to OS 18.3 and it worked. Seem the latest version had issues
Anyone still facing this issue, could you please try upgrading your SDK version to V11.6.1 or higher, and collect the error message again?
Hey @moblizeit. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!