Skip to content
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

Acrarium does not handle a crash report from a signed and obfuscate Android app? #121

Closed
aptly-io opened this issue Sep 4, 2020 · 2 comments

Comments

@aptly-io
Copy link

aptly-io commented Sep 4, 2020

Hello,

I tried using a signed and obfuscated android app.
These are the build.gradle settings:

        release {
            debuggable true
            jniDebuggable false
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }

The ProGuard-rules.pro is basically empty

I use the Acrarium version: Running version 1.0.0-rc1.

When I force an app crash I see a stack trace in docker logs -f .
The report did not end up in the Bugs or Report tab.
It seems the compiler with Android Studio 4.0.1 removes or obfuscates parts
that Acrarium does not handle well?
Or did I miss configure something on the Android side?
I tried to upload the ./app/build/outputs/mapping/release/mapping.txt but that does not seem to change anything.

These are the first lines of the Acrarium stack trace.

org.json.JSONException: JSONObject["VERSION_NAME"] not found.
	at org.json.JSONObject.get(JSONObject.java:573) ~[json-20190722.jar:na]
	at org.json.JSONObject.getString(JSONObject.java:836) ~[json-20190722.jar:na]
	at com.faendir.acra.service.DataService.getVersion(DataService.kt:294) ~[classes/:1.0.0-rc1]
	at com.faendir.acra.service.DataService.createNewReport(DataService.kt:273) ~[classes/:1.0.0-rc1]
	at com.faendir.acra.service.DataService$$FastClassBySpringCGLIB$$c0f33e7.invoke(<generated>) ~[classes/:1.0.0-rc1]
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771) ~[spring-aop-5.2.8.RELEASE.jar:5.2.8.RELEASE]

Thanks

@F43nd1r F43nd1r closed this as completed in 123392d Sep 5, 2020
@F43nd1r
Copy link
Owner

F43nd1r commented Sep 5, 2020

Interesting to see that this didn't come up earlier, it is quite basic. As a workaround you can specify your BuildConfig class in ACRA explicitly (recommended for obfuscated apps anyway).

@aptly-io
Copy link
Author

aptly-io commented Sep 5, 2020

As suggested, adding a pro-guard rule addresses the issue and now the crash report arrives:

-keep class <your.application.package.name>.BuildConfig {
    public <fields>;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants