-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Possible to wedge logs DB if DB exists without object stores #8759
Copy link
Copy link
Open
Labels
A-StorageStorage layer of the app, including IndexedDB, local storage, etc.Storage layer of the app, including IndexedDB, local storage, etc.P2S-MajorSeverely degrades major functionality or product features, with no satisfactory workaroundSeverely degrades major functionality or product features, with no satisfactory workaroundT-Defect
Metadata
Metadata
Assignees
Labels
A-StorageStorage layer of the app, including IndexedDB, local storage, etc.Storage layer of the app, including IndexedDB, local storage, etc.P2S-MajorSeverely degrades major functionality or product features, with no satisfactory workaroundSeverely degrades major functionality or product features, with no satisfactory workaroundT-Defect
Type
Fields
Give feedbackNo fields configured for issues without a type.
If you happen to have an existing IndexedDB
logsDB but without any object stores inside, then submitting logs will not work for you. (This edge case seems to have occurred on at least @lampholder's machine in the past.)From looking at the code in rageshake.js, it looks like we open a connection to the
logsDB, and then if it's first time we've ever done that, we'll create the object stores viaonupgradeneeded.However, it seems possible to load the app just long enough for the DB itself to be created, then close the tab / refresh / etc. so that the object stores are not created. Because we only create them via
onupgradeneeded, we would never try again.Perhaps we should do something safer here to test the DB structure after open and create object stores as needed based on that, especially since we'd like debug logs to work in as many strange and unexpected environments as possible.