Closed hschaefer123 closed 8 years ago
Hit this myself as well. As a remedy I scrapped out localStorage and started using LokiJS with IndexedDB. [(https://github.com/techfort/LokiJS/wiki/LokiJS-persistence-and-adapters)]
As a plus side, now I have a really handy MongoDB-like NOSQL client-side database. Wrote a remote persistent layer and I'm replacing OData bureaucratic-DB almost everywhere.
Just my 2c.
--R
Thanks guys for the detailed analysis, and also for the code suggestions. Would you like to create a pull request? That would actually speed up the process. Anyhow, i contacted the owner and he will get back to you soon.
Internally tracked as: 1680148290
Kind Regards, Michael
Inside the Smart Widget and Personalisation service i regognized the fallback to localstorage. The SAP guys who did this catched out the same issue (pointing out with a comment).
Maybe i would be a good idea if sap internally would create tickets too ;-)
Regards Holger
I am confused - We already have a try/catch inside the put-method: https://github.com/SAP/openui5/blob/master/src/sap.ui.core/src/jquery.sap.storage.js#L132
Could you provide a code snippet or test case?
Hi Jens, i just wrote an example and testing on iPad privat browsing is fine?!?
As time of writing the issue, our login component caused the workaround?!?
So i think you can close the issue. Sorry for that. With next update of our product i will remove my workaround and see, if it will work fine.
Do not know, if i had an older version without the try/catch
Regards Holger
Closing this for Jens,
@hschaefer123 thanks for rechecking
best regards, Tobias
OpenUI5 version: 1.38.4 (any)
Browser/version (+device/version): Safari (mac, ios)
Today i found out the hard way ;-) that safari throws an exception accessing the local storage using the private browsing mode.
Private browsing throws an QUOTA_EXCEEDED_ERR exception, when trying to set a local store property (by design).
See "Detect private browsing mode in mobile Safari on iOS5" http://m.cg/post/13095478393/detect-private-browsing-mode-in-mobile-safari-on
I think this needs to be handled/catched inside jQuery.sap.storage.put, because using the store api destory the whole UI5 app!
From my point of view, the detection should also be part of sap.ui.Device.support.localStorage to be able to easily handle this behavior inside code.
I do not know if private browsing is supported, but our B2B shop works quitre well using private browsing and with this fixes, we would have more control.
Current Workaround:
You should put an try/catch around any jQuery.sap.storage.put directive
or use the following snippet
to be able to better control the store handling.
Regards Holger