Error in migrate to LSNG in case storage value is empty string
Categories
(Core :: Storage: localStorage & sessionStorage, defect, P2)
Tracking
()
People
(Reporter: gshadrin, Unassigned)
References
Details
Attachments
(1 file)
588.53 KB,
image/png
|
Details |
Steps to reproduce:
Case 1:
- Use firefox 91
- Write in localStorage entry with value is empty string (key can be any)
- Update firefox to 98.0.2
Case 2 (without update version):
- Use firefox 98.0.2
- Set dom.storage.next_gen = false in about:config
- Write in localStorage entry with value is empty string (key can be any)
- Set dom.storage.next_gen = true in about:config
After setting dom.storage.next_gen you need restart the browser
Actual results:
Any access to storage will broke with error: NS_ERROR_STORAGE_CONSTRAINT
Expected results:
Access to storage will not broke with error: NS_ERROR_STORAGE_CONSTRAINT
Reporter | ||
Comment 1•2 years ago
|
||
Our site have entry with empty value and this entry have stored in browsers of our users.
Because of this bug our users can't be used our site. Because local storage corrupted.
We haven't workaround of this problem.
I try call method clear of localStorage, but with method fall with NS_ERROR_STORAGE_CONSTRAINT too.
The only solution to the problem: recreate user profile in firefox settings. But we can't recommend this solution for our users because it will destroy all user data in the browser.
I'd be very grateful, if you give me advice about workaround inside our site.
Comment 2•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Storage: localStorage & sessionStorage' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•2 years ago
|
Comment 3•2 years ago
|
||
Thanks for the STR! Would it be possible to get some log when the first case happens? If you do not want to share it publicly, you can send me an email. Thanks!
Updated•2 years ago
|
Reporter | ||
Comment 4•2 years ago
|
||
I can share log from synthetic reproduction the bug. It full emulate scenario of ours application.
-
I ran clear tomcat web server.
-
I went to http://localhost:8080/ in Firefox v.91
-
In the browser console executed script: localStorage.setItem("test", "test")
-
Updated Firefox to v. 98.0.2
-
In the browser console executed script: localStorage.getItem("test")
Error:
Exception { name: "NS_ERROR_STORAGE_CONSTRAINT", message: "", result: 2153971715, filename: "debugger eval code", lineNumber: 1, columnNumber: 0, data: null, stack: "@debugger eval code:1:14\n" }
columnNumber: 0
data: null
filename: "debugger eval code"
lineNumber: 1
message: ""
name: "NS_ERROR_STORAGE_CONSTRAINT"
result: 2153971715
stack: "@debugger eval code:1:14\n"
<prototype>: ExceptionPrototype { toString: toString(), name: Getter, message: Getter, … } -
Same error in case execute localStorage.length
A attached the image.
Reporter | ||
Comment 5•2 years ago
|
||
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 6•2 years ago
|
||
I made a mistake in description the 3 step: In the browser console executed script: localStorage.setItem("test", "test")
value need be empty string:
In the browser console executed script: localStorage.setItem("test", "")
Comment 7•2 years ago
|
||
Thanks for the steps! Let's see if we can reproduce it too.
Comment 8•2 years ago
|
||
This was fixed in bug 1758416. Thanks a lot for exact steps to reproduce the bug.
Description
•