REST request failed: Error -1005, The network connection was lost. #177
Replies: 2 comments
-
Are you using the firestore listener? I don't have currenrly an active IOS App which addresses the firestore. I recommend to stop the listener when the app goes inactive and restart again when reactivating the app, because the listener uses a long running HTTP connection. Pls inform about the solution. |
Beta Was this translation helpful? Give feedback.
-
Hi Christoph, I was not using a listener As expected the error was mine. Even though the app woke from sleep fine and the user interface was responsive. The app itself was still in the background according to iOS. I just created a callback waiting for iOS to make the app active and then send the requests. Many thanks Alan |
Beta Was this translation helpful? Give feedback.
-
Hi
I have an issue I cant get to the bottom of.
I don't think its a FB4D error but I was hoping you might have some insights!
When I use my app on Android no problems.
But, when it runs on iOS I get:
"REST request failed: Error -1005
accessing to https://firestore.googleapis.com/v1beta1/projects/XXXXXX/databases/(default)/documents/Users/XX@XXXX.com?
updateMask.fieldPaths=Last_Timer:
The network connection was lost."
This only happens if I allow the app to go to background.
If I set SharedApplication.setIdleTimerDisabled(True); Then the app doesn't sleep and everything is fine.
Obviously, when the app comes out of sleep, I check to ensure the phone is connected and it says it is, but I still get this error.
I also check and refresh the token if needed.
Do you have any ideas or suggestion where I might look?
Thank you
Alan
Beta Was this translation helpful? Give feedback.
All reactions