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

Crash on sending report #541

Closed
Ajtak opened this issue Jan 23, 2017 · 8 comments
Closed

Crash on sending report #541

Ajtak opened this issue Jan 23, 2017 · 8 comments
Assignees

Comments

@Ajtak
Copy link

Ajtak commented Jan 23, 2017

I want reporting crash in new version of Acra

 Failed to send crash reports for /data/data/[...]/app_ACRA-approved/2017-01-23T22:41:28.770+01:00-IS_SILENT.stacktrace
                                                                        java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String[] org.acra.model.Element.flatten()' on a null object reference
                                                                            at org.acra.sender.HttpSender.remap(HttpSender.java:254)
                                                                            at org.acra.sender.HttpSender.send(HttpSender.java:221)
                                                                            at org.acra.sender.ReportDistributor.sendCrashReport(ReportDistributor.java:107)
                                                                            at org.acra.sender.ReportDistributor.distribute(ReportDistributor.java:74)
                                                                            at org.acra.sender.SenderService.onHandleIntent(SenderService.java:74)
                                                                            at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
                                                                            at android.os.Handler.dispatchMessage(Handler.java:111)
                                                                            at android.os.Looper.loop(Looper.java:194)
                                                                            at android.os.HandlerThread.run(HandlerThread.java:61)

My Application header is:

@ReportsCrashes(formUri = "http://[...]/post.php",
        mode = ReportingInteractionMode.TOAST,
        httpMethod = HttpSender.Method.POST,
        resToastText = R.string.crash_toast_text)

and onCreate method is:

    @Override
    public void onCreate() {

        ACRA.init(this);
        super.onCreate();
    }

Version:

compile 'ch.acra:acra:4.9.2'

Please fix it

@F43nd1r
Copy link
Member

F43nd1r commented Jan 23, 2017

You can access a compiled version with the fix under

compile 'com.faendir:acra:4.9.3-SNAPSHOT'

repository:

maven {url = "https://oss.jfrog.org/libs-snapshot/" }

Note that this is my working directory and may not always contain a working version, but its a nice temporary solution until a new release is made.

@DenisZhadan
Copy link
Contributor

I think wrong code:

    public void onCreate() {
        ACRA.init(this);
        super.onCreate();
    }

must be:

    public void onCreate() {
        super.onCreate();
        ACRA.init(this);     
    }

@StanislavChumarin
Copy link

This does not help. Still getting ACRA crashes trying to send report.

@F43nd1r
Copy link
Member

F43nd1r commented Feb 22, 2017

The ordering of the super call and the init call do not matter. In fact we recommend to load ACRA even earlier, in attachBaseContext, see https://github.com/ACRA/acra/wiki/BasicSetup#configuring-acra---declaratively

@DorianScholz
Copy link

Ran into this bug as well.
Tried to work around it by using the 4.9.3 SNAPSHOT, but it does not seem to be available anymore.
Are there any other workarounds?
Or will 4.9.3 with the fix be released soon?

@F43nd1r
Copy link
Member

F43nd1r commented May 6, 2017

The snapshot is still up. There is currently no schedule for a release.

@DorianScholz
Copy link

You're right, my mistake!
The snapshot is working fine, thanks!

@czjvic
Copy link

czjvic commented Jun 10, 2017

For me the snapshot doesn't work too. So I use an older version. This is bug only in version 4.9.2. So I include version 4.9.1 and it works well.

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

6 participants