I understand this is not intended behaviour. What could I do to diagnose this further?
I understand this is not intended behaviour. What could I do to diagnose this further?

Hello Ewout,
this issue seems to happen to Samsung S4 Mini, we're not able to reproduce it with our devices.
In the following link you'll be able to download an APK file (Android application) created using ionic CLI to see if this issue also happens in this version:
https://drive.google.com/file/d/0BxNgofXs4GtDSGVhai1NbWJHRlU/view?usp=sharing
Can you please install it in your phone and check if this issue also happens with this version?
These are the steps to follow to install it in your phone:
- Uninstall the version installed from Play Store.
- Go to phone Settings > Security and enable "Unknown sources". This allows installing apps from sources other than Play Store.
- Download in your phone the APK file attached to this post.
- Run the downloaded file. You should see a window showing the app permissions, like you do when you install an app via Play Store.
- Once installed, please test if this issue still happens to you.
This test can help us narrow down the issue. If you have any doubt or problem, please tell us.
Thanks,
Dani
Cool, I just installed the dev APK and got "unexpected errors", which were send to prototype.moodle.net. The same problem happens: sites and credentials are not stored. For convenience, I pasted the link below (no private info there, I think).
http://prototype.moodle.net/mobile/feedback/mmfeedback.php?message=Uncaught%20TypeError%3A%20Object%20%23<IDBObjectStore>%20has%20no%20method%20%27count%27&file=file%3A%2F%2F%2Fandroid_asset%2Fwww%2Flib%2Fydn.db%2Fjsc%2Fydn.db-dev.js&line=204&platform=Android&model=GT-I9192&osversion=4.2.2&cordova=4.0.2&localurl=file:///android_asset/www/index.html#/mm_login/sites
Thank you so much for your test! Thanks to you now we're closer to be able to solve this bug. Looking at your error it seems that S4 Mini's WebView doesn't implement all IndexedDB functions. I applied a patch to the app to use WebSQL in that case. Can you please test if this solves the issue?
Here's the APK with the patch applied:
https://drive.google.com/file/d/0BxNgofXs4GtDS2I2dmR1MV9CSlk/view?usp=sharing
Thanks!
Dani