-
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 initialization : getting ClassCastException on application update #1233
Comments
Just a note: this appeared to pop up again though we have released acra 5.11.1 in the version of the app that we saw it in 🤔 Current untested thought (from the comment in our related issue):
|
@mikehardy kotlin ClassCastException is a typealias for java.lang, so that's not it. Do you have a stacktrace? |
I had a look at your linked issue, and it seems to be the other way around (long cast to integer) compared to this issue (int cast to long) |
Describe the bug
When I install my application with ACRA (5.11.0) on a device that had a previous version of my application with a previous version of ACRA (5.9.7), I get a crash on ACRA initialization.
The error is:
I think it was caused by a change made a month ago on the LimiterStartupProcessor in this commit:
1bf91f3#diff-0ef0f1b414770d23f2d21a88657bb270f0bc08ec80b25dd1a6caf1d9546fa72a
which replaced the prefs.getInt(...).toLong() by prefs.getLong(...), the previous value (from older ACRA version) was indeed an java.lang.Integer and cannot be casted to a java.lang.Long
The workaround I found was to change the sharedPreferencesName on the Core config so the previous value is not used.
(I'm sorry I didn't have time to enable ACRA.DEBUG. I worked around the error as my work load is high at the moment, I needed to find a quick solution)
Expected behavior
ACRA initialization without crash
Version
The text was updated successfully, but these errors were encountered: