New issue
Advanced search Search tips

Issue 855624 link

Starred by 4 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

IndexedDb "TimeoutError: Transaction timed out due to inactivity." error after laptop recovers from sleep

Project Member Reported by mikelehen@google.com, Jun 22 2018

Issue description

Chrome 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



 

Comment 1 by jsb...@chromium.org, Jun 22 2018

Components: Blink>Storage>IndexedDB
Owner: dmu...@chromium.org
We need to investigate the behavior of our timers w/r/t sleep/hibernation. I wasn't able to answer the question by reading the headers for TickTimer etc.
Labels: Needs-Triage-M67
Cc: phanindra.mandapaka@chromium.org
Labels: Needs-Feedback Triaged-ET
Thanks for filling the issue...

@Reporter: Could you please provide the URL/Test file to reproduce the issue from TE end.

Thanks..!
Status: Assigned (was: Unconfirmed)
Mac triage: marking assigned directly to dmurph@ for IndexedDB.
Cc: c...@chromium.org pwnall@chromium.org
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

Comment 7 by mikelehen@google.com, 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.

Comment 8 Deleted

Sign in to add a comment