Skip to content
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

Storage consistency checks fail #12410

Closed
turt2live opened this issue Feb 18, 2020 · 14 comments
Closed

Storage consistency checks fail #12410

turt2live opened this issue Feb 18, 2020 · 14 comments
Labels
T-Defect Z-Platform-Specific Z-Rageshake Has attached rageshake (not for log submission process)

Comments

@turt2live
Copy link
Member

2020-02-18T08:47:43.640Z I StorageManager: Checking storage consistency
2020-02-18T08:47:43.640Z I StorageManager: Local storage supported? true
2020-02-18T08:47:43.641Z I StorageManager: IndexedDB supported? true
2020-02-18T08:47:43.641Z I StorageManager: Local storage contains data? true
2020-02-18T08:47:43.642Z I StorageManager: Crypto initialised? true
2020-02-18T08:47:43.776Z I StorageManager: Sync store using IndexedDB contains data? false
2020-02-18T08:47:43.952Z I StorageManager: Crypto store using IndexedDB contains data? false
2020-02-18T08:47:43.953Z E StorageManager: Data exists in local storage and crypto is marked as initialised  but no data found in crypto store. IndexedDB storage has likely been evicted by the browser!
2020-02-18T08:47:43.955Z E StorageManager: Storage consistency checks failed
@turt2live turt2live added T-Defect Z-Platform-Specific Z-Rageshake Has attached rageshake (not for log submission process) labels Feb 18, 2020
@turt2live turt2live changed the title Storage consistency checks fail on Mobile Safari Storage consistency checks fail on Mobile browsers Feb 18, 2020
@turt2live
Copy link
Member Author

apparently this might be Android despite the thing saying Safari. Just going to blanket this as "mobile browsers"

@turt2live
Copy link
Member Author

Also ChromeOS apparently.

@ara4n
Copy link
Member

ara4n commented Mar 18, 2020

just saw this first hand in https://github.com/matrix-org/riot-web-rageshakes/issues/2420 on chromeos

@bwindels
Copy link
Contributor

I guess that mobile chrome has different heuristics to decide whether to allow persistent storage or not. In all case rageshakes there was no persistent storage.

@bwindels
Copy link
Contributor

I can imagine it would be more generous in allowing persistent storage if installed as a PWA fwiw.

@bwindels
Copy link
Contributor

Well, maybe not even different heuristics, from https://developers.google.com/web/updates/2016/06/persistent-storage:

Beginning with Chrome 55, Chrome will automatically grant the persistence permission if any of the following are true:

The site is bookmarked (and the user has 5 or less bookmarks)
The site has high site engagement
The site has been added to home screen
The site has push notifications enabled

The permission is automatically denied in all other cases. The goal is to ensure that users can rely on their favorite web apps and not find they have suddenly been cleared.

@t3chguy t3chguy changed the title Storage consistency checks fail on Mobile browsers Storage consistency checks fail Jun 5, 2020
@t3chguy
Copy link
Member

t3chguy commented Jun 5, 2020

This also includes electron (Linux & Windows) at least

@jryans
Copy link
Collaborator

jryans commented Jun 18, 2020

I'm really quite puzzled about what's going wrong here... Potential suspects include:

  • the IndexedDB existence check might have bug causing it report no data present when actually there was some
  • there could be a race where we place some data in IndexedDB but it hasn't flushed to disk (though Blink claims they flush to disk by default), we then mark in local storage that crypto store is initialised which does persist, and the app is reloaded: next time we'd only have local storage and not IDB data

So far, it feels like we either need to find and fix any bugs in the above, or else stop using local storage and move exclusively to one storage technology (IDB), so we can get out of this hairy world where half the data vanishes.

@turt2live
Copy link
Member Author

One possible reason for this is a rogue riot process holding a lock on the storage, leading to the new process unable to acquire a lock. This happened to me and resulted in me having to force-kill the rogue process for it to recognize my indexeddb

@jryans
Copy link
Collaborator

jryans commented Jun 22, 2020

Hmm, interesting... I suppose we could add a startup check to see if any other processes are already running...?

@t3chguy
Copy link
Member

t3chguy commented Aug 25, 2020

#10186 has a lot of logs about this

@samuel-lucas6
Copy link

Still getting 'Missing session data' errors in v1.7.14 on Ubuntu. I have had the error on multiple operating systems.

@phaitonican
Copy link

phaitonican commented Mar 1, 2022

Also getting Missing Data on a fresh Arch install... tried deleting ~/.config/element etc still same error, which is strange because few days ago it worked

@turt2live
Copy link
Member Author

I believe this is element-hq/element-desktop#819

@turt2live turt2live closed this as not planned Won't fix, can't repro, duplicate, stale Jun 14, 2022
t3chguy pushed a commit that referenced this issue Oct 17, 2024
* Focus the thread panel when clicking on an item in the TAC

actually the 'close' button in the threads panel as it's the only
interactive element: we can improve this later when we use landmarks
& generally have better a11y.

* Undo minor refactoring

as none of it is test3ed, it's not worth it.

* add unit test

* Add matrixchat tests

* Needs awaits

* ts-ignore

* Fix test (I think...)

* Remove unnecessary value set

* Not how assignments work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect Z-Platform-Specific Z-Rageshake Has attached rageshake (not for log submission process)
Projects
None yet
Development

No branches or pull requests

7 participants