Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebChannelConnection RPC 'Listen' stream 0x17d185b2 transport errored #3631

Open
moblizeit opened this issue Mar 1, 2025 · 3 comments
Open

Comments

@moblizeit
Copy link

moblizeit commented Mar 1, 2025

i am trying to deploy my app from android studio to my phone and see the below error stream indicating internet issue. but that is definitely not correct. as the same code with same connection is working fine on iOS.

2025-03-01 08:18:33.297 11755-11755 Capacitor/Console it.moblize.baniya I File: https://localhost/main.7f6f6bc5bd9d23e4.js - Line 1 - Msg: [2025-03-01T14:18:33.295Z] @firebase/firestore: Firestore (9.23.0): PersistentStream close with error: FirebaseError: [code=unavailable]: The operation could not be completed
2025-03-01 08:18:33.302 11755-11755 Capacitor/Console it.moblize.baniya E File: https://localhost/main.7f6f6bc5bd9d23e4.js - Line 1 - Msg: [2025-03-01T14:18:33.299Z] @firebase/firestore: Firestore (9.23.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-03-01 08:18:33.307 11755-11755 Capacitor/Console it.moblize.baniya I File: https://localhost/main.7f6f6bc5bd9d23e4.js - Line 1 - Msg: [2025-03-01T14:18:33.305Z] @firebase/firestore: Firestore (9.23.0): MemoryPersistence Starting transaction: Release target
2025-03-01 08:18:33.314 11755-11755 Capacitor/Console it.moblize.baniya E File: https://localhost/main.7f6f6bc5bd9d23e4.js - Line 1 - Msg: ERROR Error: Uncaught (in promise): FirebaseError: [code=unavailable]: Failed to get document because the client is offline.
FirebaseError: Failed to get document because the client is offline.
2025-03-01 08:18:33.316 11755-11755 Capacitor/Console it.moblize.baniya I File: https://localhost/main.7f6f6bc5bd9d23e4.js - Line 1 - Msg: [2025-03-01T14:18:33.313Z] @firebase/firestore: Firestore (9.23.0): MemoryPersistence Starting transaction: Release target
2025-03-01 08:18:33.318 11755-11755 Capacitor/Console it.moblize.baniya E File: https://localhost/main.7f6f6bc5bd9d23e4.js - Line 1 - Msg: ERROR Error: Uncaught (in promise): FirebaseError: [code=unavailable]: Failed to get document because the client is offline.
FirebaseError: Failed to get document because the client is offline.
2025-03-01 08:18:33.320 11755-11755 Capacitor/Console it.moblize.baniya I File: https://localhost/main.7f6f6bc5bd9d23e4.js - Line 1 - Msg: [2025-03-01T14:18:33.317Z] @firebase/firestore: Firestore (9.23.0): WebChannelConnection Creating RPC 'Listen' stream 0x17d185b3: https://firestore.googleapis.com/google.firestore.v1.Firestore/Listen/channel {"httpSessionIdParam":"gsessionid","initMessageHeaders":{"X-Goog-Api-Client":"gl-js/ fire/9.23.0","Content-Type":"text/plain","X-Firebase-GMPID":"1:329500481487:web:7157d20dc5123abd4ea4ba"},"messageUrlParams":{"database":"projects/baniya-38d78/databases/(default)"},"sendRawJson":true,"supportsCrossDomainXhr":true,"internalChannelParams":{"forwardChannelRequestTimeoutMs":600000},"forceLongPolling":true,"detectBufferingProxy":false,"xmlHttpFactory":{"l":null,"j":false},"encodeInitMessageHeaders":true}
2025-03-01 08:18:37.232 11755-12003 ProfileInstaller it.moblize.baniya D Installing profile for it.moblize.baniya
202

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"
}

`

@google-oss-bot
Copy link

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@bmchunu
Copy link

bmchunu commented Mar 9, 2025

this worked for me ...
Okay so for everyone still struggling:
For me the error occurred because I created a database in Firestone trough the google console with a custom name instead of (default).

I fixed the issue by doing:

Deleting database with custom name
Deleting prebuilt (default) database because the database-mode was set to Datastore-Mode and not Native
Creating a new database with the name "(default)", and setting the mode to Native-Mode

@moblizeit
Copy link
Author

moblizeit commented Mar 9, 2025

this worked for me ... Okay so for everyone still struggling: For me the error occurred because I created a database in Firestone trough the google console with a custom name instead of (default).

I fixed the issue by doing:

Deleting database with custom name Deleting prebuilt (default) database because the database-mode was set to Datastore-Mode and not Native Creating a new database with the name "(default)", and setting the mode to Native-Mode

So, I did as you suggested. deleted existing database. created a new one and to be sure also ran the gcloud alpha firestore databases update --type=firestore-native

via google cloud shell to be sure. however, I still see the same error. So, this does not resolve the issue for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants