-
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
ACRA.init(this) crashing when trying to convert unsent reports #551
Comments
After some additional investigation, the problem seems to be on my side, because an application state reset removed the preferences. With the correct preferences in place the app starts perfectly:
So, instead of a bug, I'll suggest an improvement to handle this strange situations in a more graceful way. |
You're right, preference reset is a situation we have to account for. |
I have stumbled over this exact same issue, and am happy that it will be fixed in 4.9.3. In my case I was also clearing all preferences and rereading them from a backup. While I was thinking about this issue, I thought, that ideally Acra would maintain its own preferences file, so that I could safely clear my own preferences, and Acra would continue to work. Is this something that already has been discussed? |
You can assign ACRA a different preference file using the |
That is good to know, thank you. Is it safe to change that option from one version to the other? Is there a mechanism that migrates values from the previous file to the new one? |
I'd expect it to behave exactly as if the preferences were cleared, which means it is unsafe pre-4.9.3
No, how should that even work? |
I understand it is not possible without any explicit help from client like providing the old file in the configuration. Is this something that could still make sense post-4.9.3? |
I don't think configuration migration is in the scope of the project. But you could easily roll your own solution by migrating all keys starting with |
I'm having an issue where my app is failing to start (repeatedly crashing) after a crash. So far, I found that the problem is during initialization, ACRA is trying to convert unsent reports to JSON, when they are already JSON. This makes the
ReportConverter#legacyLoad()
parser fail, and crash the whole app.ACRA version is last stable 4.9.2.
App installation is fresh (i.e. not an app that was using an old version of ACRA and got updated to 4.9.2).
The configuration in the Application class:
In the shared preferences:
Notice there is no
acra.legacyAlreadyConvertedToJson
preference.Stack trace (some identifiers changed for privacy):
The file which is trying to be converted is in
app_ACRA-unapproved/2017-02-21T17:16:28.598+01:00-IS_SILENT.stacktrace
, and seems a well-formed JSON file, but debugging theReportConverter#legacyLoad()
I can see the following:I think this last part is not relevant, as is trying to parse a JSON crash report as the legacy format, which from what I understand is
key=value
.Another important bit of information is, currently the files (crash reports) present in the application are as follow:
The text was updated successfully, but these errors were encountered: