MM2 does not remember sites / credentials on my device

MM2 does not remember sites / credentials on my device

by Ewout ter Haar -
Number of replies: 5
MM2, downloaded from the Play Store, on a GT-I9192 android device (Samsung mini S4). Whenever I quit the app I must enter both the site and the credentials again. I can connect correctly to 2 Moodles (see screencap).

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


Attachment Screenshot_2015-08-17-15-50-24.png
Average of ratings: -
In reply to Ewout ter Haar

Re: MM2 does not remember sites / credentials on my device

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

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:

  1. Uninstall the version installed from Play Store.
  2. Go to phone Settings > Security and enable "Unknown sources". This allows installing apps from sources other than Play Store.
  3. Download in your phone the APK file attached to this post.
  4. Run the downloaded file. You should see a window showing the app permissions, like you do when you install an app via Play Store.
  5. 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

In reply to Dani Palou

Re: MM2 does not remember sites / credentials on my device

by Ewout ter Haar -

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

In reply to Ewout ter Haar

Re: MM2 does not remember sites / credentials on my device

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

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

In reply to Dani Palou

Re: MM2 does not remember sites / credentials on my device

by Ewout ter Haar -

Sorry for the delay, I have trouble with my email notifications. But I have good news: with the new APK the problem is solved!

Thanks for the hard work and responsiveness!

In reply to Ewout ter Haar

Re: MM2 does not remember sites / credentials on my device

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Glad to hear! We'll integrate these changes to the main repo so they're included in the next release.

Thanks!