Skip to content

Firestore encounters "TimeoutError: Transaction timed out due to inactivity." after laptop recovers from sleep. #2136

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

Closed
mikelehen opened this issue Sep 3, 2019 · 2 comments

Comments

@mikelehen
Copy link
Contributor

[Forking this from https://github.com//issues/1642 which is currently conflating several issues.]

We have gotten reports that when using Firestore in a web app in Chrome, if the computer goes to sleep (e.g. you close the lid on your laptop), when it wakes back up, sometimes you encounter an error like:

Uncaught (in promise) Error: FIRESTORE (5.11.0) INTERNAL ASSERTION FAILED: AsyncQueue is already failed: Transaction timed out due to inactivity.

We are currently considering this a bug in Chrome which is being tracked here: https://bugs.chromium.org/p/chromium/issues/detail?id=855624

If you are encountering this, please add details to that Chrome bug, especially if you can help reproduce it. Thanks.

@markterrill
Copy link

markterrill commented Oct 24, 2019

Hi, I have been regularly experiencing this issue on ios when an ionic 4 app is backgrounded and then resumed.

So not just chrome.

FIRESTORE (7.0.0) INTERNAL ASSERTION FAILED: AsyncQueue is already failed: Attempt to delete range from database without an in-progress transaction.

"Ionic info":

Ionic:

   Ionic CLI          : 5.0.1 (/Users/markterrill/.nvm/versions/node/v8.11.2/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.8
   @ionic/app-scripts : 3.2.1

Cordova:

   Cordova CLI       : 9.0.0 ([email protected])
   Cordova Platforms : android 8.1.0, ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 20 other plugins)

Utility:

   cordova-res : 0.3.0
   native-run  : 0.2.6

System:

   Android SDK Tools : 26.1.1 (/Users/markterrill/Library/Android/sdk/)
   ios-deploy        : 1.9.4
   ios-sim           : 8.0.2
   NodeJS            : v8.11.2 (/Users/markterrill/.nvm/versions/node/v8.11.2/bin/node)
   npm               : 6.1.0
   OS                : macOS Mojave
   Xcode             : Xcode 11.1 Build version 11A1027

Relevant grep -i fire entries in package.json:

"@angular/fire": "^5.2.1",
    "@ionic-native/firebase-x": "^5.14.0",
    "cordova-android-firebase-gradle-release": "^4.0.0",
    "cordova-plugin-firebasex": "^6.0.2",
    "firebase": "^7.0.0",

@mikelehen
Copy link
Contributor Author

@schmidt-sebastian has added some retry logic to the client which may not 100% resolve this but should significantly reduce the frequency of it occurring. I would encourage folks to upgrade to JS SDK v7.2.3 or newer and comment here if they still experience the issue. I'm optimistically closing this issue, but will re-open based on additional feedback. Thanks!

@firebase firebase locked and limited conversation to collaborators Dec 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants