IndexedDb "TimeoutError: Transaction timed out due to inactivity." error after laptop recovers from sleep |
|||||
Issue descriptionChrome Version : 67.0.3396.87 OS Version: OS X 10.13.4 What steps will reproduce the problem? See https://github.com/firebase/firebase-js-sdk/issues/939 for the external report against the Google Cloud Firestore SDK for web (which uses IndexedDb for persistence). Per the reporter: this happen when laptop go to sleep and back again; NOT EVERY TIME. according to screen-shot after laptop wakeup firestore will display error; TimeoutError: Transaction timed out due to inactivity. What is the expected result? IndexedDb transaction timeouts should somehow coordinate with laptop sleep and avoid expiring without the browser / app having a chance to continue using the transaction. What happens instead of that? My hypothesis is that the laptop goes to sleep while the transaction is in-progress and the 30 second timer doesn't take into account that the laptop went to sleep and so the timer expires immediately after wake-up and the JS engine doesn't get a chance to use the transaction again. Alternatively it's possible that the laptop is just "super slow" (swapping in memory, etc.) after wake-up that transactions are timing out. UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36
,
Jun 24 2018
,
Jun 26 2018
Thanks for filling the issue... @Reporter: Could you please provide the URL/Test file to reproduce the issue from TE end. Thanks..!
,
Jul 30
Mac triage: marking assigned directly to dmurph@ for IndexedDB.
,
Oct 8
,
Oct 30
Thanks for the report - it would be nice to solve this. We will have to do some research on how to detect sleep & have our time calculations exclude this. Will probably be investigating this more next year
,
Today
(14 hours ago)
Not sure if this will be helpful, but a customer noted (https://github.com/firebase/firebase-js-sdk/issues/939#issuecomment-455820296) that he can reproduce the same error by just pausing the code in chrome dev tools. While this isn't the same case as "sleep", I wonder if there's a general solution that could be applied to detect when the JS runtime / main event loop has been paused. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by jsb...@chromium.org
, Jun 22 2018Owner: dmu...@chromium.org