-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Report Sender Exception hidden if another sender succeeds #947
Comments
Continuing the battle with HTTPS. I finally have the root cause but only after cloning all the code and stepping though debugging.
Some more feedback for the benefit of future devs. The root cause of why I saw no exception from ACRA is because I had 2 senders, my custom one that writes to file and the new HTTP one. You can see in my original post Its from: acra/acra-core/src/main/java/org/acra/sender/ReportDistributor.kt Lines 93 to 101 in 1560d82
But the caught exception is consumed and never output if you have multiple senders, where one succeeded. acra/acra-core/src/main/java/org/acra/sender/ReportDistributor.kt Lines 103 to 114 in 1560d82
failedSenders[0].exception is only output if ACRA is going to retry as per my original post: Also acra/acra-http/src/main/java/org/acra/http/BaseHttpRequest.kt Lines 75 to 77 in 152d567
I found this misleading, I thought this was telling me what is in |
After some time I found the bug I raised isn't specific to the HttpSender or needing to use allow cleartext, but because I had two report senders, one of which was succeeding.
When
ACRA.DEV_LOGGING = true
even if a sender succeeded, any ReportSenderException details for other senders should be printed to Logcat.Everything below illustrates the difficulty I encountered because I was unfortunate enough not to be brand new to ACRA and have a sender that writes to file already.
Describe the bug
This isn't so much a bug as something that would help someone else avoid the frustration I've gone through.
I'm trying to write a simple backend server for reports, the HTTPS server isn't working correctly and to simplify things I thought I'd go back to HTTP basics with a much simpler server.
With
ACRA.DEV_LOGGING = true
, The debug looked as follows:Expected behavior
If ACRA cannot connect to the server, in this case because the app wasn't allowed to use cleartext http, it should be clear in Logcat when ACRA.DEV_LOGGING = true. I assume an exception is thrown and consumed currently.
Version
Adding
android:usesCleartextTraffic="true"
to the application results in the following instead of the failureI can see the post arriving in the HTTP server so have confirmed the issue is my HTTPS server not ACRA.
The text was updated successfully, but these errors were encountered: