funkensturm / ember-local-storage

The addon provides a storageFor computed property that returns a proxy and persists the changes to localStorage or sessionStorage. It ships with an ember-data adapter.
https://www.funkensturm.com/ember-local-storage/
MIT License
218 stars 76 forks source link

Stats become undefined or throws error in new window - IE Edge only #264

Open Jalil-Irfan opened 7 years ago

Jalil-Irfan commented 7 years ago

Hi We are using stats to store almost every value of our application There are some scenario like we need to open a new window and display some contents or have some click functions which again checks or stores/updates stats values. But in IE edge (Windows 10) alone we are not able to fetch values from stats Mostly it throws this.get('stats.user') is undefined or errors like such But it works well in IE 11 and and chrome

fsmanuel commented 7 years ago

@Jalil-Irfan thanks for reporting. Do you have a stack trace or something? I don't have IE edge to test it.

fsmanuel commented 7 years ago

@Jalil-Irfan any news?

Jalil-Irfan commented 7 years ago

I am sorry not able to send stack trace

I can tell you the scenario as what's happening

On Jul 28, 2017 7:43 PM, "Manuel Wiedenmann" notifications@github.com wrote:

@Jalil-Irfan https://github.com/jalil-irfan any news?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/funkensturm/ember-local-storage/issues/264#issuecomment-318662785, or mute the thread https://github.com/notifications/unsubscribe-auth/AGDfmfG7krRPhf7N6noH-aHNdjH0Ev6Tks5sSeyHgaJpZM4OfpCK .

fsmanuel commented 7 years ago

@Jalil-Irfan I googled a bit and it seems IE edge has/had problems with localStorage. So any information will be valuable to figure out what is going wrong.

Jalil-Irfan commented 7 years ago

Its like Edge handles new window as a new service in desktop and so the session or local storage is loaded fresh

Our problem is when we use code like window.open() it opens the new tab But after opening the tab if we do any action like save,fetch data from local storage or mainly session it throws error as "stats" is undefined Or if we use this.get('stats.username') it says cannot read username of undefined

We are using ember project 2.4 version

On Jul 28, 2017 8:05 PM, "Manuel Wiedenmann" notifications@github.com wrote:

@Jalil-Irfan https://github.com/jalil-irfan I googled a bit and it seems IE edge has/had problems with localStorage. So any information will be valuable to figure out what is going wrong.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/funkensturm/ember-local-storage/issues/264#issuecomment-318668693, or mute the thread https://github.com/notifications/unsubscribe-auth/AGDfmY9-0RsKfrD7ER_kT_KICQWXZNCqks5sSfHMgaJpZM4OfpCK .

fsmanuel commented 7 years ago

Sounds like this: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7871403/ or https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/110656/

Jalil-Irfan commented 7 years ago

So we have to wait for the fix to be released right?

On Jul 28, 2017 8:27 PM, "Manuel Wiedenmann" notifications@github.com wrote:

Sounds like this: https://developer.microsoft.com/en-us/microsoft-edge/ platform/issues/7871403/

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/funkensturm/ember-local-storage/issues/264#issuecomment-318674711, or mute the thread https://github.com/notifications/unsubscribe-auth/AGDfmU73auOrhS6aB6iyCLCZQ7GX-dS6ks5sSfbLgaJpZM4OfpCK .

fsmanuel commented 6 years ago

We might fix/prevent this error depending on how we solve #276