Local storage: TypeError: localStorage.setItem is not a function

RESOLVED INVALID

Status

()

RESOLVED INVALID
4 years ago
4 years ago

People

(Reporter: sergiy.golub74, Unassigned)

Tracking

32 Branch
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
Created attachment 8503932 [details]
ls_1.png

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36

Steps to reproduce:

I have problem with local Storage object in my browser firefox vers.32.0.3 for windows7 I have error: TypeError: localStorage.setItem is not a function When I console.log(localStorage) I see what methods was declaration how string

If that my local problem or global? How fix that any propose.

Updated

4 years ago
Duplicate of this bug: 1081837

Updated

4 years ago
Component: General → DOM
Summary: local Storag TypeError: localStorage.setItem is not a function → Local storage: TypeError: localStorage.setItem is not a function

Comment 2

4 years ago
Can you provide a URL that reproduces this problem? If you open your Firefox preferences and look at the Privacy tab, what are your history settings? In particular, are you using non-default cookie settings?
Flags: needinfo?(sergiy.golub74)
(Reporter)

Comment 3

4 years ago
I don't use non-default cookie.
console.log(LocalStorage) get

localStorage
Storage { clear: "function () {
var e, result;
callBeforeHooks(hookSite, this, arguments);
try {
result = func.apply(this, arguments);
} catch (_error) {
e = _error;
callExceptHooks(hookSite, this, arguments, e);
throw e;
} finally {
callAfterHooks(hookSite, this, arguments, result);
}
return result;
}", test: "123123123", __amplify__Geo: "{"data":"UA","expires":null}", setItem: "function () {
var e, result;
callBeforeHooks(hookSite, this, arguments);
try {
result = func.apply(this, arguments);
} catch (_error) {
e = _error;
callExceptHooks(hookSite, this, arguments, e);
throw e;
} finally {
callAfterHooks(hookSite, this, arguments, result);
}
return result;
}", removeItem: "function () {
var e, result;
callBeforeHooks(hookSite, this, arguments);
try {
result = func.apply(this, arguments);
} catch (_error) {
e = _error;
callExceptHooks(hookSite, this, arguments, e);
throw e;
} finally {
callAfterHooks(hookSite, this, arguments, result);
}
return result;
}", length: 5 }
Flags: needinfo?(sergiy.golub74)

Comment 4

4 years ago
Again, is there a page that reproduces this behaviour? That log output you pasted suggests that the site is wrapping localStorage in its own JavaScript object.
(Reporter)

Comment 5

4 years ago
Thank you.
This is my local problem.

Updated

4 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.