CrashlyticsCore:发送报告com.crashlytics.android.core.SessionReport @时发生错误

时间:2018-10-16 06:51:18

标签: android firebase crashlytics firebase-crash-reporting

我最近从firebase迁移到了crashlytics。
我可以通过创建虚拟崩溃进行测试,并将其放入崩溃报告控制台。
但是目前,我在运行应用程序时收到此异常。

io.fabric.sdk.android.services.network.HttpRequest$HttpRequestException: java.io.IOException: Hostname 'reports.crashlytics.com' was not verified
        at io.fabric.sdk.android.services.network.HttpRequest.part(HttpRequest.java:2546)
        at io.fabric.sdk.android.services.network.HttpRequest.part(HttpRequest.java:2526)
        at io.fabric.sdk.android.services.network.HttpRequest.part(HttpRequest.java:2512)
        at com.crashlytics.android.core.DefaultCreateReportSpiCall.applyMultipartDataTo(DefaultCreateReportSpiCall.java:89)
        at com.crashlytics.android.core.DefaultCreateReportSpiCall.invoke(DefaultCreateReportSpiCall.java:61)
        at com.crashlytics.android.core.CompositeCreateReportSpiCall.invoke(CompositeCreateReportSpiCall.java:18)
        at com.crashlytics.android.core.ReportUploader.forceUpload(ReportUploader.java:104)
        at com.crashlytics.android.core.ReportUploader$Worker.attemptUploadWithRetry(ReportUploader.java:242)
        at com.crashlytics.android.core.ReportUploader$Worker.onRun(ReportUploader.java:185)
        at io.fabric.sdk.android.services.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:30)
        at java.lang.Thread.run(Thread.java:818)



它表明这是由

Caused by: java.io.IOException: Hostname 'reports.crashlytics.com' was not verified
        at com.android.okhttp.Connection.upgradeToTls(Connection.java:205)
        at com.android.okhttp.Connection.connect(Connection.java:155)
        at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:276)
        at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
        at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:382)
        at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:106)
        at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:217)
        at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)
        at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:25)
        at io.fabric.sdk.android.services.network.HttpRequest.openOutput(HttpRequest.java:2450)
        at io.fabric.sdk.android.services.network.HttpRequest.startPart(HttpRequest.java:2463)
        at io.fabric.sdk.android.services.network.HttpRequest.part(HttpRequest.java:2542)
        at io.fabric.sdk.android.services.network.HttpRequest.part(HttpRequest.java:2526) 
        at io.fabric.sdk.android.services.network.HttpRequest.part(HttpRequest.java:2512) 
        at com.crashlytics.android.core.DefaultCreateReportSpiCall.applyMultipartDataTo(DefaultCreateReportSpiCall.java:89) 
        at com.crashlytics.android.core.DefaultCreateReportSpiCall.invoke(DefaultCreateReportSpiCall.java:61) 
        at com.crashlytics.android.core.CompositeCreateReportSpiCall.invoke(CompositeCreateReportSpiCall.java:18) 
        at com.crashlytics.android.core.ReportUploader.forceUpload(ReportUploader.java:104) 
        at com.crashlytics.android.core.ReportUploader$Worker.attemptUploadWithRetry(ReportUploader.java:242) 
        at com.crashlytics.android.core.ReportUploader$Worker.onRun(ReportUploader.java:185) 
        at io.fabric.sdk.android.services.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:30) 
        at java.lang.Thread.run(Thread.java:818) 



我该如何解决??
motoE4 plus上会发生此错误。 Android版本7.1.1

compileSdkVersion 27


E/Fabric: Error performing auto configuration.<br/>


io.fabric.sdk.android.services.network.HttpRequest$HttpRequestException: javax.net.ssl.SSLPeerUnverifiedException: Hostname api.crashlytics.com not verified:
        certificate: sha1/UARkLWC3ztcio6pO5twiuKzT5hQ=
        DN: CN=*.crashlytics.com,OU=COMODO SSL Wildcard,OU=Domain Control Validated
        subjectAltNames: [*.crashlytics.com, crashlytics.com]
        at io.fabric.sdk.android.services.network.HttpRequest.part(HttpRequest.java:2546)
        at io.fabric.sdk.android.services.network.HttpRequest.part(HttpRequest.java:2526)
        at io.fabric.sdk.android.services.network.HttpRequest.part(HttpRequest.java:2512)
        at io.fabric.sdk.android.services.settings.AbstractAppSpiCall.applyMultipartDataTo(AbstractAppSpiCall.java:108)
        at io.fabric.sdk.android.services.settings.AbstractAppSpiCall.invoke(AbstractAppSpiCall.java:76)
        at io.fabric.sdk.android.services.settings.UpdateAppSpiCall.invoke(UpdateAppSpiCall.java:29)
        at io.fabric.sdk.android.Onboarding.performUpdateApp(Onboarding.java:204)
        at io.fabric.sdk.android.Onboarding.performUpdateApp(Onboarding.java:194)
        at io.fabric.sdk.android.Onboarding.performAutoConfigure(Onboarding.java:175)
        at io.fabric.sdk.android.Onboarding.doInBackground(Onboarding.java:112)
        at io.fabric.sdk.android.Onboarding.doInBackground(Onboarding.java:45)
        at io.fabric.sdk.android.InitializationTask.doInBackground(InitializationTask.java:63)
        at io.fabric.sdk.android.InitializationTask.doInBackground(InitializationTask.java:28)
        at io.fabric.sdk.android.services.concurrency.AsyncTask$2.call(AsyncTask.java:311)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:761)
     Caused by: javax.net.ssl.SSLPeerUnverifiedException: Hostname api.crashlytics.com not verified:
        certificate: sha1/UARkLWC3ztcio6pO5twiuKzT5hQ=
        DN: CN=*.crashlytics.com,OU=COMODO SSL Wildcard,OU=Domain Control Validated
        subjectAltNames: [*.crashlytics.com, crashlytics.com]
        at com.android.okhttp.Connection.connectTls(Connection.java:266)
        at com.android.okhttp.Connection.connectSocket(Connection.java:224)
        at com.android.okhttp.Connection.connect(Connection.java:197)
        at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:392)
        at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:130)
        at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:356)
        at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:273)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:474)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:126)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:257)
        at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)
        at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java)
        at io.fabric.sdk.android.services.network.HttpRequest.openOutput(HttpRequest.java:2450)
        at io.fabric.sdk.android.services.network.HttpRequest.startPart(HttpRequest.java:2463)
        at io.fabric.sdk.android.services.network.HttpRequest.part(HttpRequest.java:2542)


目标SDK版本也为27。

1 个答案:

答案 0 :(得分:0)

我不知道这可能对谁有帮助,但就我而言,由于我的emulatoroffline(与@Mike Bonnell的{ {3}}。)


检查您的deviceemulator是否已连接到互联网(WiFi或数据-您使用的是哪个)。谁知道可能是什么问题? ??‍♂️