Charles,
Sorry to hear this, this is a major problem! We definitely don't expect
phones to enter recovery mode.
Basically this happens when the app install that's currently on the phone
enters an inconsistent state that we can't correct. There are three causes
of this
- The app's storage files have been manually changed/modified
Some of CommCare's files non-userdata files are stored on the phone in an
area where external apps can delete them. This used to be a rampant problem
on Android phones which used the SD card to store certain files (this was
common before android 2.2)
- The phone's storage layer has corrupted the files stored to the device
This is a problem that we've seen on certain devices that we've been
investigating the prevalence of to identify whether it's real. It's hard
for us to differentiate between certain types of hardware failures due to
the way we encrypt data (since we write user files in an encrypted way,
minor block-level corruption of files that would be easy to spot in
un-encrypted data simply results in a pseudo-random blob looking equally
pseudo-random blob for us).
The kinds of block storage used by mobile devices have physical limitations
on the number of reads and writes they can perform. On good Flash storage
these limits are unlikely to be hit, but on certain counterfeit storage
chips it is a common problem for data reads and writes to fail silently.
We don't believe this to be a common problem outside of Counterfeit SD
cards (and most files on most phones are stored on the phone's storage, not
on an external SD card), but it has come up in the past rarely.
- There is a bug in CommCare's code that is resulting in corrupted files
It's possible that CommCare is writing an invalid app structure to the
phone's storage due to an unforseen bug in the code.
The only time this kind of bug could occur that would result in Recovery
Mode being triggered would be immediately after some sort of remote update
that resulted in the phone not having a fully installed and consistent
version of your app. This would not be expected, however, to cause any
problems in submitting unsent data to the server.
Relating to your Problem Specifically
Thanks for letting us know you've been experiencing this problem, and
please submit a bug report every time you see something occur! Some helpful
things for us to know to differentiate between these use cases
- What version of CommCare you are using - So we know whether it's
possible that you are triggering an older bug
- What devices are in use: This helps us disambiguate whether the issue
might be related to "external storage" on older android phones and also the
likelihood that there might be any hardware problems.
- Whether there was a specific circumstance that seemed to trigger the
issues. Are you frequently using remote updates for the app? Do you know
whether the issues appeared after some critical event?
- How widespread is the issue? Do certain users seem to have the problem
over and over, or is it randomly distributed between users?
- Can you replicate the problem? If so we can help work through it very
quickly.
I'll follow up on the support channel about how we can help work together
on this moving forward.
Thanks,
-Clayton
···
On Thu, Dec 18, 2014 at 7:37 AM, Charles Flèche wrote:
>
> Hi everyone,
>
> It happens quite a lot that CommCareODK crashes while the users are on the
> field. Days later when we check the phones we see that CommCare entered the
> recovery mode. Most of the time we cannot upload the forms for unknown
> reason
> (even when connecting to a working internet connection) and we end up
> clearing
> CommCare's local data from the Android app management interface and
> reinstall
> our own deployed app.
>
> I'd like to track down the reasons of these crashes. Is there some kind of
> logs I could get from the Android file system ? What protocol should I
> follow
> to sort of this issue ?
>
> Many thanks,
>
> --
> Charles Flèche
> mHealth Advisor
> Télécoms Sans Frontières http://www.tsfi.org
> Première Urgence - Aide Médicale Internationale http://www.pu-ami.org
>
> --
> You received this message because you are subscribed to the Google Groups
> "commcare-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to commcare-users+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>