You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@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.
#8576
Open
juan-carvajal opened this issue
Oct 16, 2024
· 3 comments
Multiple operating systems, mostly iOS and Android
Environment (if applicable)
Multiple browsers, mostly mobile versions of Safari and Chrome
Firebase SDK Version
9.23.0
Firebase SDK Product(s)
Firestore
Project Tooling
Vue 3 SPA app, created with Quasar framework V2. Package using Vite.
Detailed Problem Description
Some of our users have encountered an issue where our application does not start from the corporate network. We found that the listener has a slow response time that is not within the timeout of 10 seconds, i.e. the request does not go through and the application does not receive data from firebase.
This is what my setup looks now:
import{initializeApp}from'firebase/app';import{connectFirestoreEmulator,initializeFirestore,setLogLevel,onSnapshotsInSync,}from'firebase/firestore';import{getAuth,connectAuthEmulator}from'firebase/auth';import{getPerformance}from'firebase/performance';import{getAnalytics}from'firebase/analytics';import{getStorage,connectStorageEmulator}from'firebase/storage';import{getFunctions,connectFunctionsEmulator}from'firebase/functions';import{boot}from'quasar/wrappers';import{useAuthStore}from'src/stores/auth-store';constfirebaseConfig={
...
};constfirebaseApp=initializeApp(firebaseConfig);setLogLevel('debug');constdb=initializeFirestore(firebaseApp,{experimentalForceLongPolling: true,experimentalLongPollingOptions: {timeoutSeconds: 30,},});constperformance=getPerformance(firebaseApp);constauth=getAuth(firebaseApp);constanalytics=getAnalytics(firebaseApp);conststorage=getStorage(firebaseApp);constfunctions=getFunctions(firebaseApp);// Algunas veces falla el emulator de autenticación// Cuando se encuentra dentro de la función bootif(process.env.DEV&&process.env.USE_AUTH_EMULATOR=='true'){connectAuthEmulator(auth,'http://127.0.0.1:9099',{disableWarnings: true});}exportdefaultboot(()=>{const{ handleUserChange }=useAuthStore();if(process.env.DEV){connectFirestoreEmulator(db,'localhost',8081);connectStorageEmulator(storage,'localhost',9199);connectFunctionsEmulator(functions,'localhost',5001);}auth.onAuthStateChanged(handleUserChange);onSnapshotsInSync(db,{next: (metadata)=>{console.log('Snapshots in sync',metadata);},error: (error)=>{console.error('Error in snapshots in sync',error);},complete: ()=>{console.log('Snapshots in sync complete');},});});export{auth,db,performance,analytics,storage,functions};
Setting experimentalAutoDetectLongPolling or experimentalForceLongPolling does not help.
No idea, this appears to happen intermittently and is more prevalent with certain ISP/mobile internet providers (TIGO). This is not an isolated case; most errors come from mobile devices. There should be sufficient internet speed in most cases, but the error still shows up. 99% of our users are from Colombia.
The text was updated successfully, but these errors were encountered:
juan-carvajal
changed the title
Title for @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.the bug
@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.the bug
Oct 16, 2024
juan-carvajal
changed the title
@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.the bug
@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.
Oct 16, 2024
Hey @juan-carvajal. 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!
Operating System
Multiple operating systems, mostly iOS and Android
Environment (if applicable)
Multiple browsers, mostly mobile versions of Safari and Chrome
Firebase SDK Version
9.23.0
Firebase SDK Product(s)
Firestore
Project Tooling
Vue 3 SPA app, created with Quasar framework V2. Package using Vite.
Detailed Problem Description
Some of our users have encountered an issue where our application does not start from the corporate network. We found that the listener has a slow response time that is not within the timeout of 10 seconds, i.e. the request does not go through and the application does not receive data from firebase.
This is what my setup looks now:
Setting
experimentalAutoDetectLongPolling
orexperimentalForceLongPolling
does not help.Results from https://debug-my.firebaseapp.com/ found in test.txt
Browser trace after
setLogLevel('debug')
found in log.txtSteps and code to reproduce issue
No idea, this appears to happen intermittently and is more prevalent with certain ISP/mobile internet providers (TIGO). This is not an isolated case; most errors come from mobile devices. There should be sufficient internet speed in most cases, but the error still shows up. 99% of our users are from Colombia.
The text was updated successfully, but these errors were encountered: