Reputation: 596
I have a cordova app for android. On 30th April 2015 Google pushed an update to the webview and since then things are going haywire. The localstorage is getting cleared automatically when the app starts.
This is unexpected behaviour. If someone has had this problem before, it would be really kind if you could guide me through this. The problem here is since the localstorage is vanishing, I cannot keep a track of the db version for the websql.
Upvotes: 0
Views: 815
Reputation: 248
Experiencing the same issues with many of our cordova app's. Many Android 5.0 users reporting this crazy behavior which was actually really hard to diagnose.
Android 5.0 - localStorage not being persisted
It's already fixed in WebView 42.0.2311.138 which is released to the beta channel and hopefully will be rolling out to stable soon.
However only viable solution for now seems to be 'uninstalling the updates for android system webview'.
Upvotes: 2
Reputation: 5402
Sounds like a pretty big deal for some. This link makes me think that the problem cannot be solved easily. You'd have to NOT use the function/feature of WebView until Google releases update. Crazy. There's a manual fix that works well, but you'd have to do that on every phone.
So what’s the fix? Uninstall the most recent update of Webview. On most phones, that means jumping into Settings>Applications (Manager)> and then finding Android System Webview, tapping on, and then uninstalling the latest update. You can see a picture of this screen at the top of this post. While that’s not exactly the greatest fix, because this latest update did introduces “stability and security fixes,” it might save your phone in the interim.
http://www.droid-life.com/2015/04/27/apps-crashing-android-system-webview/
Upvotes: 0