Acralyzer reports the crash
According to https://github.com/ACRA/acra/issues/801#issuecomment-668006988 - we will likely not ever get crashes from Xiaomi 10 devices in this configuration
The same linked comment above indicates that it may work to either post silently (no toast) or to show the dialog. I don't like the idea of non-transparent silent posting, so perhaps for Xiaomi it should show the dialog all the time, if testing indicates this is a problem
Do we have any recruits for testing that have Xiaomi devices?
Specific request: we need someone with a Xioami Android 10 device that can perform test crashes
This can be done by anyone that checks the code out locally and runs a local - unaltered - build on their physically-connected Xiaomi device, the test crash button is in advanced preferences, though for debug builds you have to enable crash reporting manually in preferences on each restart before hitting the button.
Debug build crash reports may be seen on a dedicated debug-crash server via instructions here https://github.com/ankidroid/Anki-Android/wiki/Crash-Reports#developing--testing-acra-functionality
So -
adb logcat)Using Xiaomi Mi 8 running Android 10.
Here is the debug console results when I test the crash:
2020-08-04 16:40:10.288 23888-23888/com.ichi2.anki E/ACRA: ACRA caught a RuntimeException for com.ichi2.anki
java.lang.RuntimeException: This is a test crash
at com.ichi2.anki.Preferences.lambda$initSubscreen$7(Preferences.java:340)
at com.ichi2.anki.-$$Lambda$Preferences$fwDFvlTcNhpAcEMN_bOWEVP90Y4.onPreferenceClick(Unknown Source:0)
at android.preference.Preference.performClick(Preference.java:1185)
at android.preference.PreferenceScreen.onItemClick(PreferenceScreen.java:260)
at android.widget.AdapterView.performItemClick(AdapterView.java:330)
at android.widget.AbsListView.performItemClick(AbsListView.java:1219)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3230)
at android.widget.AbsListView$3.run(AbsListView.java:4186)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7520)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
2020-08-04 16:40:10.312 23888-24249/com.ichi2.anki D/OkHttpClientImpl: postBatch() response code/success: 200 / true
2020-08-04 16:40:10.366 23888-24280/com.ichi2.anki W/VideoCapabilities: Unsupported mime image/vnd.android.heic
2020-08-04 16:40:10.370 23888-24280/com.ichi2.anki W/VideoCapabilities: Unsupported mime video/divx
2020-08-04 16:40:10.371 23888-24280/com.ichi2.anki W/VideoCapabilities: Unsupported mime video/divx4
2020-08-04 16:40:10.377 23888-24280/com.ichi2.anki W/VideoCapabilities: Unrecognized profile/level 0/3 for video/mpeg2
2020-08-04 16:40:10.378 23888-24280/com.ichi2.anki W/VideoCapabilities: Unrecognized profile/level 0/3 for video/mpeg2
2020-08-04 16:40:10.381 23888-24280/com.ichi2.anki W/VideoCapabilities: Unsupported mime video/x-ms-wmv
2020-08-04 16:40:10.443 23888-24286/com.ichi2.anki I/Timeline: Timeline: Activity_launch_request time:8115536
2020-08-04 16:40:10.444 23888-24285/com.ichi2.anki E/AcraAnalyticsInteraction: ACRA handling crash, sending analytics exception report
2020-08-04 16:40:10.446 23888-24285/com.ichi2.anki D/UsageAnalytics: sendAnalyticsEvent() category/action/value/label: ACRA Crash Handler/UUID 0bc552b1-c605-4f1c-aed0-ee1168540e5a/-2147483648/null
2020-08-04 16:40:10.447 23888-24285/com.ichi2.anki D/UsageAnalytics: getOptIn() status: true
2020-08-04 16:40:10.448 23888-24285/com.ichi2.anki D/GoogleAnalyticsImpl: Submitting a batch of 1 requests to GA
2020-08-04 16:40:10.453 23888-24285/com.ichi2.anki D/OkHttpClientImpl: HttpClient.postBatch() url/body: https://www.google-analytics.com/batch / aid=com.ichi2.anki&aip=true&an=AnkiDroid&av=21300110&cd1=10&cd2=Xiaomi&cd3=MI%208&cd4=sdm845&cid=0bc552b1-c605-4f1c-aed0-ee1168540e5a&de=UTF-8&ea=UUID%200bc552b1-c605-4f1c-aed0-ee1168540e5a&ec=ACRA%20Crash%20Handler&sr=1080x2029&t=event&tid=UA-125800786-1&ua=Mozilla%2F5.0%20%28Linux%3B%20Android%2010%3B%20MI%208%20Build%2FQKQ1.190828.002%3B%20wv%29%20AppleWebKit%2F537.36%20%28KHTML%2C%20like%20Gecko%29%20Version%2F4.0%20Chrome%2F84.0.4147.111%20Mobile%20Safari%2F537.36&ul=en-US&v=1
2020-08-04 16:40:10.475 23888-24249/com.ichi2.anki D/OkHttpClientImpl: postBatch() response code/success: 200 / true
2020-08-04 16:40:10.482 23888-24287/com.ichi2.anki I/Toast: Show toast from OpPackageName:com.ichi2.anki, PackageName:com.ichi2.anki
2020-08-04 16:40:12.466 23888-23888/com.ichi2.anki I/Process: Sending signal. PID: 23888 SIG: 9
@TKGZ you are the hero we needed! :trophy: - seriously, thanks for testing that.
It appears to post just fine, I can see the result of the crash: https://918f7f55-f238-436c-b34f-c8b5f1331fe5-bluemix.cloudant.com/acralyzer/_design/acralyzer/index.html#/reports-browser/ankidroid/bug/be69e86b091089f2803ae12e4bc0673b
So, I'm not sure what it is going on in our configuration that is different from the reported upstream bug, but the testing seems to show we do not have a problem, which is great.
I'm going to close this for now but will follow up with the crash reporting library folks
Let me know if need any other tests! I use this app every day it's the least I can do :)
@mikehardy Don't we need two crashes - the first will be sent via the dialog, the second will be sent via the toast?
I jumped the gun - looks like it was sent via toast. @TKGZ Thanks so much!!
@david-allison-1 the logcat showed it toasted, and if you enable "always report" in prefs straight away, it goes to toast only mode, if I understand correctly
Most helpful comment
Let me know if need any other tests! I use this app every day it's the least I can do :)