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

Sync token should be reset if IndexedDB is unavailable #12131

Open
neilalexander opened this issue Jan 29, 2020 · 3 comments
Open

Sync token should be reset if IndexedDB is unavailable #12131

neilalexander opened this issue Jan 29, 2020 · 3 comments
Labels
A-Storage Storage layer of the app, including IndexedDB, local storage, etc. O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect

Comments

@neilalexander
Copy link

Description

Safari, in a private browsing tab, just refuses access to IDB altogether. Many tears.

The sync token, which is stored in local storage, is persisted however, therefore refreshing the tab causes a /sync to take place with the last known since= but we have no IDB data to fall back on.

Steps to reproduce

  • Open Safari private browsing tab
  • Log into Riot
  • Refresh the page
  • Incremental sync takes place but IDB is gone!

We should reset the sync token back to 0 if we fail to open IDB.

Version information

  • Platform: web in-browser

For the web app:

  • Browser: Safari 13.0.4 in private browsing tab
  • OS: macOS
  • URL: All the Riots
@jryans jryans added defect P1 A-Storage Storage layer of the app, including IndexedDB, local storage, etc. labels Jan 29, 2020
@turt2live
Copy link
Member

in general we should probably prevent the app from even loading

@jryans jryans removed the defect label Mar 4, 2021
@MadLittleMods MadLittleMods added S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Occasional Affects or can be seen by some users regularly or most users rarely and removed P1 labels Oct 14, 2022
@MadLittleMods
Copy link
Contributor

MadLittleMods commented Oct 14, 2022

in general we should probably prevent the app from even loading

Seems like the app should work without IndexedDB. If it's necessary, maybe a memory store for that session although the semantics around IndexedDB would be annoying to emulate. @neilalexander's suggestion for the sync loop sounds good.

Just seems reasonable to have Element work in a private Safari browsing tab.

And seems like the same path we have to go down or in the same vein to deal with IndexedDB storage limits, #20931

@t3chguy
Copy link
Member

t3chguy commented Oct 17, 2022

We have a fallback for the IDB store which is just a MemoryStore, the issue being one of storing related data in different stores. We should move the sync tokens to the same store so if one datum dies they both die

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Storage Storage layer of the app, including IndexedDB, local storage, etc. O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect
Projects
None yet
Development

No branches or pull requests

5 participants