You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 30, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 30, 2025. It is now read-only.
IMO I'd be surprised if you've filled 5MB of storage. If so, it's likely you're trying to store too much in there - in the case of Elm, this could be a naive toString of a model or JSON. It's also possible that you're not clearing out enough localstorage. Unlike cookies, localstorage lives forever. An example might be if you are storing things site-wide in localstorage on multiple instances of the same page, under a different namespace, then you'll quickly fill up.
E.g
/about/me adds something with the key about_me /about/you adds something wtih the key about_you /about/them adds something with the key about_them
The tactic to manage this is to 1) minify everything you store 2) manage all localstorage updates in a single place (e.g so that each time duplicate data doesn't get added) or 3) ignore it and treat localstorage as a cache only.
FWIW, it's possible the error you got is actually just from user extensions, but hard to say without more info.
Hey Noah! I appreciate the advice, but I think it's a little beside the point. If I'm understanding the situation correctly, the line I reference above in the native implementation needs to be in a try block. We are getting a runtime exception when we should be getting an Elm error.
I'm skeptical that is the line that is problematic - there doesn't seem to be anything that I can find that would suggest that would be the case. If that is the case, you should be able to reproduce the exact error by visiting this page on the version of IE you're running into the problem on, by filling up localstorage then trying to get an item (it has some tests at the bottom).
Feel free to add a try..catch, but I think it's worth confirming that's the actual problem first
I can't reproduce that error by filling local cache with the problematic browser / os combination. However, it occurs to me the error is not "quota exceeded" but "There is not enough space on the disk."
It may be that these users have full hard drives...
Is it happening to multiple agents, or just one or two? I would say if you can track it down to a single user, then don't worry about it (it's unlikely to be a problem here). But if it's multiple users, that's a bit concerning. Can you give me an idea of which browser/OS version it is?
The closest thing I could come across was this, which isn't the same error as what you got. However, the symptoms might be similiar - if you're loading a lot from localstorage, and somehow that manages to fill up the RAM + push more things into Window's paging, then that could give you weird errors. I'm surprised that there doesn't seem to anything on StackOverflow about this error you're getting at all
Do you think it's possible that you're filling up localstorage with too much? I.e do you think the warning is trying to say "localstorage is full", or is it a warning on something else?
Considering that this error occurs to such a small percentage of users, I would be very surprised if we were filling up local storage so inconsistently - all we're doing is cacheing the state of the page.
Activity
eeue56 commentedon Mar 13, 2017
http://diveintohtml5.info/storage.html#limitations
IMO I'd be surprised if you've filled 5MB of storage. If so, it's likely you're trying to store too much in there - in the case of Elm, this could be a naive toString of a model or JSON. It's also possible that you're not clearing out enough localstorage. Unlike cookies, localstorage lives forever. An example might be if you are storing things site-wide in localstorage on multiple instances of the same page, under a different namespace, then you'll quickly fill up.
E.g
/about/meadds something with the keyabout_me/about/youadds something wtih the keyabout_you/about/themadds something with the keyabout_themThe tactic to manage this is to 1) minify everything you store 2) manage all localstorage updates in a single place (e.g so that each time duplicate data doesn't get added) or 3) ignore it and treat localstorage as a cache only.
FWIW, it's possible the error you got is actually just from user extensions, but hard to say without more info.
Hope that helps!
jleven commentedon Mar 13, 2017
Hey Noah! I appreciate the advice, but I think it's a little beside the point. If I'm understanding the situation correctly, the line I reference above in the native implementation needs to be in a try block. We are getting a runtime exception when we should be getting an Elm error.
eeue56 commentedon Mar 13, 2017
I'm skeptical that is the line that is problematic - there doesn't seem to be anything that I can find that would suggest that would be the case. If that is the case, you should be able to reproduce the exact error by visiting this page on the version of IE you're running into the problem on, by filling up localstorage then trying to get an item (it has some tests at the bottom).
Feel free to add a try..catch, but I think it's worth confirming that's the actual problem first
jleven commentedon Mar 14, 2017
I can't reproduce that error by filling local cache with the problematic browser / os combination. However, it occurs to me the error is not "quota exceeded" but "There is not enough space on the disk."
It may be that these users have full hard drives...
eeue56 commentedon Mar 14, 2017
Is it happening to multiple agents, or just one or two? I would say if you can track it down to a single user, then don't worry about it (it's unlikely to be a problem here). But if it's multiple users, that's a bit concerning. Can you give me an idea of which browser/OS version it is?
The closest thing I could come across was this, which isn't the same error as what you got. However, the symptoms might be similiar - if you're loading a lot from localstorage, and somehow that manages to fill up the RAM + push more things into Window's paging, then that could give you weird errors. I'm surprised that there doesn't seem to anything on StackOverflow about this error you're getting at all
jleven commentedon Mar 14, 2017
Believe it or not, it's happened to 35 different users: all IE11, and either Windows 7, 8.1, or 10
jleven commentedon Mar 14, 2017
All the backtraces point to the same code:
var value = localStorage.getItem(key);eeue56 commentedon Mar 14, 2017
Do you think it's possible that you're filling up localstorage with too much? I.e do you think the warning is trying to say "localstorage is full", or is it a warning on something else?
jleven commentedon Mar 15, 2017
Considering that this error occurs to such a small percentage of users, I would be very surprised if we were filling up local storage so inconsistently - all we're doing is cacheing the state of the page.