Rifluxyss / acra

Automatically exported from code.google.com/p/acra
0 stars 0 forks source link

Failure on the first error report sender, causes the other report sender be ignored #92

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Init ACRA with a Google spreadsheet which doesn't exist
2. Add a report sender of your own by using 
ErrorReporter.getInstance().addReportSender()
3. Simulate an exception. 

What is the expected output? What do you see instead?
I was expecting to see the report sent at least to my own report sender

What version of the product are you using? On what operating system?
4.2.3

Please provide any additional information below.

I've looked into the code of the ErrorReporter.sendCrashReport(), and I saw 
that if one of the reports has been sent before the failed report sender - it's 
considered to be OK and won't be sent again. But, if the order is reversed, and 
the failed report sender is first, then the next ones will be ignored. 
The way it should be - is to try to use ALL the report senders, and if one of 
them is successful the reporting will be considered as OK, and won't be sent 
again.

In my case, I wanted to make my own sender as the first one on the list, and 
after that use the Google Spreadsheet sender (which caused a problem after a 
while). The only way to achieve that was to call the 
ErrorReporter.getInstance().addReportSender() with my report sender before the 
ACRA.init() call, and it works fine.

Original issue reported on code.google.com by u...@any.do on 18 Nov 2011 at 12:36