New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch error reporting over to ACRA @ ankidroid.org #681
Conversation
a0111c9
to
d511cf8
Compare
From a privacy standpoint, I think |
I think it makes more sense from a UX standpoint as well: toasts are easily missed in the heat of the moment, and the dialog could say something like "We're sorry / AnkiDroid has crashed. Please tell us about the crash so that we can fix it." Is it possible to rename the "OK" button to "Report"? |
I agree on the privacy point, but not so much on the UX standpoint. We have several places in the code where we report on caught exceptions -- i.e. we prevent a crash through exception handling, but still want to send info for monitoring and debugging purposes. In these cases, having a dialog pop-up everytime is going to be disruptive and a fairly negative user experience. More generally I think making users read and press OK on a dialog every time increases the frustration with a crash. How about we show a consent dialog along with the privacy policy the first time a crash is reported, and strongly suggest the user to enable auto-reporting? |
Not in ACRA 4.5.0, but it will be in 4.6 which will hopefully be coming out soon |
Also, currently the privacy policy says that we don't collect the user's email address, but now there is a possibility we collect this via the logcat, since the sync logs include the ankiweb username. Should we update the privacy policy to reflect this? Thoughts @nicolas-raoul? |
Good catch! Could we maybe avoid logging the ankiweb username? The ACRA server is probably not extremely secure, and leaking user emails would be sad. Not collecting emails in the first place would protect us. |
d511cf8
to
2f64b26
Compare
I just checked, and actually the sync logs are already set to the debug level: So probably we don't have to worry about that. Currently the "disclaimer" says:
IP address is currently getting logged actually... I looked into it, and while it's possible to prevent it from being explicitly included in the data transmitted in the crash report, at the end of the day the ip address is still available to us, and acralyzer takes note of it. I don't think anyone could really consider IP address to be private information anyway; can we just remove this part from the disclaimer? |
Yes, I guess IP address can be removed from the disclaimer. |
2d90596
to
4edacff
Compare
Done
Done. However, I plan to submit a PR to ACRA to allow adding an "Automatically send error reports" checkbox to the error reporting dialog, which will be checked by default the first time the dialog is shown.
Done |
I've sent over a PR to Acra which allows using a custom dialog. This will allow us to easily add an "Always report errors" checkbox, which I plan to have checked by default the first time the dialog is shown to the user. For now I'm going to merge this and release some new beta versions |
Switch error reporting over to ACRA @ ankidroid.org
I noticed that Travis says that this pull request broke one of the tests:
Would you mind having a look? |
Pretty sure that was because of an infinite loop in the upgrade path.
|
I took a look at the build history and that doesn't seem to have been the issue since it's still failing on subsequent commits after bumping the version: https://travis-ci.org/ankidroid/Anki-Android/builds/47482041 |
It seems that ACRA may be interfering with the test somehow, though I've checked that Media is actually added properly when the app is run for real. I've asked on the ACRA page: |
This is bizarre. Running the tests locally in debug mode works normally and everything passes. Running them in run mode gives me the same error that shows up on Travis. Seems to be failing to create an AnkiDroidApp instance so sInstance is null inside it. |
Although commenting out the Acra.init line like you mentioned makes it work again. It's kind of harder to debug when the error doesn't show up in debug mode. |
Right?! Maybe it's a threading issue...?
|
We could be sneaky and move the |
We can try that, though it seemed it was still sometimes failing for me Not sure how useful it will be but the acra guys just asked for a full
|
It really is a race condition. I can reproduce the issue by replacing Acra.init with Thread.sleep(200), so Acra isn't at fault, only the extra time it takes to initialize it. |
Interesting... I've also found that if you add Thread.sleep(10000) to the |
Yes, that's exactly what is happening. The main application and the test runner execute on separate threads. I have no idea how it makes sense for the test runner to start testing before the application has finished initializing, however. Either we are doing something wrong or this particular test framework isn't very advanced and we need some additional code to make it wait (but then we have to duplicate this code for each new test class we make). |
This thread has a similar question, though not exactly the same since they On Tue, Jan 20, 2015 at 11:03 AM, Houssam Salem notifications@github.com
|
@nicolas-raoul |
This PR switches the AnkiDroid error reporting over to ACRA / Acralyzer on ankidroid.org and makes the error reporting occur automatically in the background by default (a toast is shown so the user knows). This is not quite ready to merge as I need to finalize some details about the couchdb authentication with @agrueneberg
See the discussion on the forum for more background info