Skip to content
Mike Hardy edited this page Apr 29, 2023 · 9 revisions

Overview

AnkiDroid uses the Acra library to send crash reports to a private server which is running Acrarium.

Crash reports can be viewed on acrarium, however a password is required in order to protect the privacy of our users, since the crash reports can contain logcat and user comments where private information could potentially be revealed.

If you have access, you may access the AnkiDroid Acrarium server here.

Contributing

Non-core developers wishing to get a stacktrace or logcat for a specific issue should request this in the appropriate thread on the issue tracker, and someone from the AnkiDroid team will post the relevant information. Developers wishing to browse / search through the crash report database can request a password by emailing one of the core developers.

Developing / Testing ACRA functionality

Making changes to AnkiDroid's use of ACRA should be tested carefully since this affects our ability to help users and troubleshoot problems with the app.

Any time the library is updated or the usage is changed, the developer making those changes should take care to test what happens when the application crashes and verify that a report is posted to the crash report server and contains all the relevant details.

Steps to test:

  1. Open the Settings in the App, go to General, verify it is set to "Never" (that is the default for debug builds)
  2. Open the Settings in the App, go to Developer, trigger test crash. There should be no ACRA interaction (it is set to never!)
  3. Open the Settings in the App, go to General Settings, and change the Error Reporting Mode to something other than "Never" (otherwise since it is a debug build, ACRA reports won't be generated)
  4. Get access to an acrarium application so you can see the reports. By default debug ACRA reports will go to the main acrarium instance and you'll need to ask one of the maintainers for read access to the database. Or you may set up your own acrarium with the instructions below, and configure your debug builds to use it.
  5. Open "Developer" settings in the app, scroll all the way to the bottom, you should see a "Trigger test crash" entry in debug builds. If you touch that, the app crashes with a unique exception trace each time so you can test that crash reporting is working on the report collection server. If it wasn't a unique exception only the first exception report would go through because of the ACRALimiter configuration
  6. If you need repeated crashes remember to reset "Reporting Mode" to something other than "Never" on each restart
  7. If you change the version number of the app temporarily to one number high, you should be able to trigger a new crash again, as ACRA limiter data should be deleted on new versions

You can read about the recent experience upgrading AnkiDroid's ACRA, as well as future ACRA testing directions, in a related ACRA thread here if you are interested.

Setting up an Acrarium instance for more serious testing

If you are going to do a lot of ACRA work you may want personal control over the acrarium instance.

There were instructions here to set up ACRAlyzer but we have moved front-ends to Acrarium as noted above. You should follow the Acrarium installation instructions to get a development environment set up, then configure AnkiDroid to send crash reports to your local Acrarium reporting endpoint.

To configure debug builds to use your acrarium, you'll need to configure the URL in the debug build section of the AnkiDroid gradle file

Clone this wiki locally