Closed
Bug 1448249
Opened 8 years ago
Closed 4 years ago
local storage goes completely empty when I switch off the Internet connection
Categories
(Core :: Storage: localStorage & sessionStorage, defect, P3)
Tracking
()
RESOLVED
INVALID
People
(Reporter: igor, Unassigned)
Details
(Keywords: regression)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180315233128
Steps to reproduce:
I have a site, e.g. https://qm.quickblox.com/
It stores some data related to user session in local storage.
I have an active user session on this site.
Then I switched off the Internet connection
Actual results:
When I switch off the Internet connection then local storage goes completely empty and all the user session data is flushed, so a user has to login again and again.
Here is a video demo of the issue
https://www.dropbox.com/s/znru29by4fydkmx/qm_ff_issue_empty_localstorage.mp4?dl=0
It started reproducing when FF Quantum was released. Before Quantum there was not such issue.
Expected results:
Firefox browser should not clean local storage when switch off the Internet connection
Updated•8 years ago
|
Product: Firefox → Core
Updated•8 years ago
|
Keywords: regression
Updated•8 years ago
|
Component: Untriaged → DOM
Updated•8 years ago
|
Priority: -- → P3
Any updates so far? It's already 25 days left and status is still UNCONFIRMED
what else do you need from me? let me know please
thanks
Comment 3•8 years ago
|
||
We are currently working on a new local storage implementation. It should be available in FF 61.
You can re-check once that's available.
Flags: needinfo?(jvarga)
Comment 5•8 years ago
|
||
It looks very probable the page is doing this itself. Here's a pretty printed excerpt of a logout() function:
b.logoutUser(function () {
localStorage.removeItem('QM.user'),
a.contact = null,
a._valid = !1,
localStorage.clear(),
window.location.reload()
})
And there's a method like (approximating from the pretty-print) `c.chat.connect(args, callbackFunc(err) { if (err) { logout() })`.
Looking at the video, we see either a navigation or a page reload happening when the wipe happens. Given that the above code block explicitly clears localStorage and triggers a reload, it seems quite possible that in Quantum we changed the behavior of XHR or fetch() when offline so that they produced an error or were properly canceled where previously they would do something different. So now that chat.connect() method goes into the error-handling path which would run the `(e.log(a), j.logout(), r(a.detail)` branch.
Reporter, can you look into this? It seems like there should already be something in the console output about the error, but if not, it would be interesting to instrument your code and/or set some breakpoints and find out what error is now being generated that was not previously being generated.
Flags: needinfo?(igor)
Updated•7 years ago
|
Component: DOM → DOM: Web Storage
Comment 7•4 years ago
|
||
I believe my analysis in comment 5 showed the page's error-handling was clearing LocalStorage itself and we haven't seen any other reports similar to this at all. Reporter, if you've seen evidence that the behavior happens without explicit action by the page, do let us know here on the bug and we can reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•