Acra ReportSenderException:通过Http POST发送FORM报告时出错

时间:2014-12-26 17:19:29

标签: android acra

我使用以下代码生成acra错误。

    @ReportsCrashes(
        formKey = "", // This is required for backward compatibility but not used
        formUri = "http://183.80.72.104:52126/home/acra"
    )
public class MyApplication extends Application {
    @Override
    public void onCreate() {
        // TODO Auto-generated method stub
        super.onCreate();
        try {
            ACRA.init(this);
            String androidId = Globals.GetAndroidId(this);          
            //ACRA.getErrorReporter().putCustomData("android_id", androidId);
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
}

每当Acra尝试将数据发送到我的服务器时,我都会收到此错误。我的清单中设置了互联网权限。我的服务器运行正常。

12-26 22:28:50.339: E/ACRA(10776): org.acra.sender.ReportSenderException: Error while sending FORM report via Http POST
12-26 22:28:50.339: E/ACRA(10776):  at org.acra.sender.HttpSender.send(HttpSender.java:228)
12-26 22:28:50.339: E/ACRA(10776):  at org.acra.SendWorker.sendCrashReport(SendWorker.java:179)
12-26 22:28:50.339: E/ACRA(10776):  at org.acra.SendWorker.checkAndSendReports(SendWorker.java:141)
12-26 22:28:50.339: E/ACRA(10776):  at org.acra.SendWorker.run(SendWorker.java:77)
12-26 22:28:50.339: E/ACRA(10776):  at org.acra.util.HttpRequest.send(HttpRequest.java:173)
12-26 22:28:50.339: E/ACRA(10776):  at org.acra.sender.HttpSender.send(HttpSender.java:225)
12-26 22:28:52.448: E/ACRA(10776): org.acra.sender.ReportSenderException: Error while sending FORM report via Http POST
12-26 22:28:52.448: E/ACRA(10776):  at org.acra.sender.HttpSender.send(HttpSender.java:228)
12-26 22:28:52.448: E/ACRA(10776):  at org.acra.SendWorker.sendCrashReport(SendWorker.java:179)
12-26 22:28:52.448: E/ACRA(10776):  at org.acra.SendWorker.checkAndSendReports(SendWorker.java:141)
12-26 22:28:52.448: E/ACRA(10776):  at org.acra.SendWorker.run(SendWorker.java:77)
12-26 22:28:52.448: E/ACRA(10776):  at org.acra.util.HttpRequest.send(HttpRequest.java:173)
12-26 22:28:52.448: E/ACRA(10776):  at org.acra.sender.HttpSender.send(HttpSender.java:225)

1 个答案:

答案 0 :(得分:0)

我认为这是ACRA-4.5.0?

我无法看到ACRA将记录上述输出的位置。 HttpSender:228遇到了IOException并将其重新分配为ReportSenderException。

我原本希望看到

的错误日志

Failed to send crash report for " + curFileName,e

哪个会给出ReportSenderException以及底层的IOException。 您需要显示完整的日志,它将详细说明确切的问题。