I am following the quick start guide and I am getting an error for
private void parseServerTest(){
ParseObject testObject = new ParseObject("TestObject");
testObject.put("foo","bar");
testObject.saveInBackground(new SaveCallback() {
#Override
public void done(ParseException e) {
if(null != e){
e.printStackTrace();
}else{
Log.d(TAG,"no parse error.")
}
}
});
}
Unless the instructions is missing something, I think I have done everything to the letter
In case it matters, my app is in development, and does not exist on the playstore yet: not even as a draft
Here is the error trace:
com.parse.ParseRequest$ParseRequestException: i/o failure
at com.parse.ParseRequest.newTemporaryException(ParseRequest.java:368)
at com.parse.ParseRequest$2.then(ParseRequest.java:206)
at com.parse.ParseRequest$2.then(ParseRequest.java:198)
at bolts.Task$14.run(Task.java:796)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:324)
at android.net.SSLCertificateSocketFactory.verifyHostname(SSLCertificateSocketFactory.java:235)
at android.net.SSLCertificateSocketFactory.createSocket(SSLCertificateSocketFactory.java:486)
at com.android.okhttp.Connection.upgradeToTls(Connection.java:1259)
at com.android.okhttp.Connection.connect(Connection.java:1197)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:392)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:295)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:106)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:208)
at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)
at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:25)
at com.parse.ParseURLConnectionHttpClient.executeInternal(ParseURLConnectionHttpClient.java:42)
at com.parse.ParseHttpClient$ParseNetworkInterceptorChain.proceed(ParseHttpClient.java:155)
at com.parse.ParsePlugins$1.intercept(ParsePlugins.java:111)
at com.parse.ParseHttpClient$ParseNetworkInterceptorChain.proceed(ParseHttpClient.java:144)
at com.parse.ParseHttpClient.execute(ParseHttpClient.java:119)
at com.parse.ParseRequest$3.then(ParseRequest.java:195)
at com.parse.ParseRequest$3.then(ParseRequest.java:192)
at bolts.Task$14.run(Task.java:796)
at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
at bolts.Task.completeAfterTask(Task.java:787)
at bolts.Task.continueWithTask(Task.java:599)
at bolts.Task.continueWithTask(Task.java:610)
at bolts.Task$12.then(Task.java:702)
at bolts.Task$12.then(Task.java:690)
... 4 more
Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:318)
at com.android.org.conscrypt.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:219)
at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:113)
at com.android.org.conscrypt.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:574)
at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:320)
... 29 more
Caused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
... 35 more
There seems to be a time delay. I moved on to something else. And now four hours later, I run the very sam code and it works. I changed nothing. So there must be some sort of time delay for newly opened parse accounts.
Related
One of our android app is using MSAL library (com.microsoft.identity.client:msal:0.2.+) to validate the user with Microsoft AD. When we run the app in Android 12 - Google pixel device, I am getting an exception.
E/AdalMigrationAdapter:loadCloudDiscoveryMetadata: [2021-11-28 12:03:12 - thread_name : pool-45-thread-1, correlation_id : UNSET] Failed to load instance discovery metadata Android 31
javax.net.ssl.SSLHandshakeException: Chain validation failed
at com.android.org.conscrypt.SSLUtils.toSSLHandshakeException(SSLUtils.java:363)
at com.android.org.conscrypt.ConscryptEngine.convertException(ConscryptEngine.java:1134)
at com.android.org.conscrypt.ConscryptEngine.readPlaintextData(ConscryptEngine.java:1089)
at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:876)
at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:747)
at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:712)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:858)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.access$100(ConscryptEngineSocket.java:731)
at com.android.org.conscrypt.ConscryptEngineSocket.doHandshake(ConscryptEngineSocket.java:241)
at com.android.org.conscrypt.ConscryptEngineSocket.startHandshake(ConscryptEngineSocket.java:220)
at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:196)
at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:153)
at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116)
at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186)
at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:411)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:542)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:106)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:30)
at com.google.firebase.perf.network.InstrURLConnectionBase.getInputStream(InstrURLConnectionBase.java:137)
at com.google.firebase.perf.network.InstrHttpsURLConnection.getInputStream(InstrHttpsURLConnection.java:79)
at com.microsoft.identity.common.internal.net.UrlConnectionHttpClient.executeHttpSend(UrlConnectionHttpClient.java:263)
at com.microsoft.identity.common.internal.net.UrlConnectionHttpClient.access$100(UrlConnectionHttpClient.java:73)
at com.microsoft.identity.common.internal.net.UrlConnectionHttpClient$2.call(UrlConnectionHttpClient.java:176)
at com.microsoft.identity.common.internal.net.UrlConnectionHttpClient$2.call(UrlConnectionHttpClient.java:174)
at com.microsoft.identity.common.internal.net.NoRetryPolicy.attempt(NoRetryPolicy.java:42)
at com.microsoft.identity.common.internal.net.NoRetryPolicy.attempt(NoRetryPolicy.java:36)
at com.microsoft.identity.common.internal.net.UrlConnectionHttpClient.method(UrlConnectionHttpClient.java:174)
at com.microsoft.identity.common.internal.net.AbstractHttpClient.get(AbstractHttpClient.java:47)
at com.microsoft.identity.common.internal.providers.microsoft.azureactivedirectory.AzureActiveDirectory.performCloudDiscovery(AzureActiveDirectory.java:188)
at com.microsoft.identity.common.internal.migration.AdalMigrationAdapter.loadCloudDiscoveryMetadata(AdalMigrationAdapter.java:238)
at com.microsoft.identity.common.internal.migration.AdalMigrationAdapter.adapt(AdalMigrationAdapter.java:119)
at com.microsoft.identity.common.internal.migration.TokenMigrationUtility$1.run(TokenMigrationUtility.java:67)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:920)
Caused by: java.security.cert.CertificateException: Chain validation failed
at com.android.org.conscrypt.TrustManagerImpl.verifyChain(TrustManagerImpl.java:719)
at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:549)
at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:570)
at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:615)
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:505)
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:425)
at com.android.org.conscrypt.TrustManagerImpl.getTrustedChainForServer(TrustManagerImpl.java:353)
at android.security.net.config.NetworkSecurityTrustManager.checkServerTrusted(NetworkSecurityTrustManager.java:94)
at android.security.net.config.RootTrustManager.checkServerTrusted(RootTrustManager.java:90)
at com.android.org.conscrypt.ConscryptEngineSocket$2.checkServerTrusted(ConscryptEngineSocket.java:163)
at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:255)
at com.android.org.conscrypt.ConscryptEngine.verifyCertificateChain(ConscryptEngine.java:1638)
at com.android.org.conscrypt.NativeCrypto.ENGINE_SSL_read_direct(Native Method)
at com.android.org.conscrypt.NativeSsl.readDirectByteBuffer(NativeSsl.java:569)
at com.android.org.conscrypt.ConscryptEngine.readPlaintextDataDirect(ConscryptEngine.java:1095)
at com.android.org.conscrypt.ConscryptEngine.readPlaintextData(ConscryptEngine.java:1079)
... 37 more
Caused by: java.security.cert.CertPathValidatorException: Response is unreliable: its validity interval is out-of-date
at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:135)
at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:222)
at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:140)
at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:79)
at java.security.cert.CertPathValidator.validate(CertPathValidator.java:301)
at com.android.org.conscrypt.TrustManagerImpl.verifyChain(TrustManagerImpl.java:715)
... 52 more
Caused by: java.security.cert.CertPathValidatorException: Response is unreliable: its validity interval is out-of-date
at sun.security.provider.certpath.OCSPResponse.verify(OCSPResponse.java:619)
at sun.security.provider.certpath.RevocationChecker.checkOCSP(RevocationChecker.java:709)
at sun.security.provider.certpath.RevocationChecker.check(RevocationChecker.java:363)
at sun.security.provider.certpath.RevocationChecker.check(RevocationChecker.java:337)
at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:125)
... 57 more
Suppressed: java.security.cert.CertPathValidatorException: Could not determine revocation status
at sun.security.provider.certpath.RevocationChecker.buildToNewKey(RevocationChecker.java:1092)
Another error is showing is "Unable to perform cloud discovery"
I am facing this issue only in Android 12.
Below is my code:
database = Utils.inializeDb(HomeActivity.this, "company-3");
URL url = null;
try {
url = new URL("https://*********/db_name");
} catch (IOException e) {
e.printStackTrace();
}
Replication push = database.createPushReplication(url);
Replication pull = database.createPullReplication(url);
Authenticator auth = AuthenticatorFactory.createBasicAuthenticator("admin", "1m2p3k4n");
pull.setAuthenticator(auth);
push.setContinuous(true);
pull.setContinuous(true);
pull.start();
I want to add ssl Certificate in this code..
Below is error code;
javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:366)
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.kt:351)
at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.kt:310)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:178)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:236)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:109)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:77)
at okhttp3.internal.connection.Transmitter.newExchange$okhttp(Transmitter.kt:162)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:35)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:82)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:84)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:71)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.kt:184)
at okhttp3.RealCall.execute(RealCall.kt:66)
at com.couchbase.lite.replicator.RemoteRequest.executeRequest(RemoteRequest.java:262)
at com.couchbase.lite.replicator.RemoteRequest.execute(RemoteRequest.java:166)
at com.couchbase.lite.replicator.RemoteRequest.run(RemoteRequest.java:106)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
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: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:549)
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:401)
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:375)
at com.android.org.conscrypt.TrustManagerImpl.getTrustedChainForServer(TrustManagerImpl.java:304)
at android.security.net.config.NetworkSecurityTrustManager.checkServerTrusted(NetworkSecurityTrustManager.java:94)
at android.security.net.config.RootTrustManager.checkServerTrusted(RootTrustManager.java:88)
at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:178)
at com.android.org.conscrypt.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:611)
at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:362)
From errors, it looks like the Sync Gateway cert from a well-known trusted CA or it was perhaps self-signed. How was the cert issued? Follow the steps here to configure your system to accept the cert.
Any reason you are starting with 1.x version of Couchbase Lite? Version 1.x is EoL for almost a year. You should switch to 2.x.
My goal is to get latitude & longitude every 5 seconds.
I have already archived that in my app by adding ACCESS_FINE_LOCATION permission in manifest and by creating a LocationManager instance and then implementing LocationListener to get the coordinates.
Now for no obvious reason I stopped getting results from onLocationChanged function and I get this CancellationException error:
E/RequestManagerImpl: Producing location failed
java.util.concurrent.ExecutionException: java.util.concurrent.CancellationException: Task was cancelled.
at dagger.producers.Produced$Failed.get(SourceFile:3)
at com.google.android.apps.gsa.staticplugins.cy.j.ac.a(SourceFile:98)
at com.google.android.apps.gsa.staticplugins.cy.j.am.aH(SourceFile:11)
at dagger.producers.internal.AbstractProducesMethodProducer.aD(SourceFile:11)
at com.google.common.util.concurrent.r.av(SourceFile:5)
at com.google.common.util.concurrent.q.run(SourceFile:17)
at com.google.common.util.concurrent.bx.run(SourceFile:3)
at com.google.android.apps.gsa.taskgraph.d.a.r.run(SourceFile:7)
at com.google.android.apps.gsa.shared.util.concurrent.b.g.run(Unknown Source)
at com.google.android.apps.gsa.shared.util.concurrent.b.bk.run(SourceFile:3)
at com.google.android.apps.gsa.shared.util.concurrent.b.bk.run(SourceFile:3)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
at com.google.android.apps.gsa.shared.util.concurrent.b.m.run(SourceFile:6)
Caused by: java.util.concurrent.CancellationException: Task was cancelled.
at com.google.common.util.concurrent.d.fi(SourceFile:78)
at com.google.common.util.concurrent.d.get(SourceFile:60)
at com.google.common.util.concurrent.cv.n(SourceFile:1)
at com.google.common.util.concurrent.bc.p(SourceFile:33)
at com.google.common.util.concurrent.a.run(SourceFile:14)
at com.google.common.util.concurrent.ar.execute(SourceFile:3)
at com.google.common.util.concurrent.d.a(SourceFile:216)
at com.google.common.util.concurrent.d.a(SourceFile:184)
at com.google.common.util.concurrent.d.M(SourceFile:130)
at com.google.common.util.concurrent.q.run(SourceFile:15)
at com.google.common.util.concurrent.ar.execute(SourceFile:3)
at com.google.common.util.concurrent.d.a(SourceFile:216)
at com.google.common.util.concurrent.d.a(SourceFile:184)
at com.google.common.util.concurrent.d.cancel(SourceFile:95)
at com.google.android.apps.gsa.taskgraph.d.a.w.run(SourceFile:3)
at com.google.android.apps.gsa.taskgraph.d.a.m.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at com.google.android.apps.gsa.taskgraph.d.a.e.run(SourceFile:17)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at com.google.android.apps.gsa.shared.util.concurrent.b.g.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
at com.google.android.apps.gsa.shared.util.concurrent.b.m.run(SourceFile:6)
While searching for this in the internet I have found someone saying that it has something to do with the new Google Maps pricing changes that went into effect on July 16, 2018.
I'm not using any routes or map services. I just need to get latitude & longitude every 5 seconds. Should I create an API key and put it somewhere in my code to make my code work again?
Thanks in advance!
Recently I see an exception in my log that fabric (Beta) tries to check for updates and this is the error:
E/Beta: Error while checking for updates from null
io.fabric.sdk.android.services.network.HttpRequest$HttpRequestException: java.net.MalformedURLException: Protocol not found: null?instance=
I don't know why fabric tries to check for updates with a null URL, but I really want to remove that error.
Verbose stack trace:
E/Beta: Error while checking for updates from null
io.fabric.sdk.android.services.network.HttpRequest$HttpRequestException: java.net.MalformedURLException: Protocol not found: null?instance=7f856ab5-12f8-4723-9e84-569dab8e9760&build_version=1030300&display_version=1.3.3&source=3
at io.fabric.sdk.android.services.network.HttpRequest.encode(HttpRequest.java:722)
at io.fabric.sdk.android.services.network.HttpRequest.get(HttpRequest.java:865)
at io.fabric.sdk.android.services.network.DefaultHttpRequestFactory.buildHttpRequest(DefaultHttpRequestFactory.java:85)
at io.fabric.sdk.android.services.common.AbstractSpiCall.getHttpRequest(AbstractSpiCall.java:137)
at com.crashlytics.android.beta.CheckForUpdatesRequest.invoke(CheckForUpdatesRequest.java:48)
at com.crashlytics.android.beta.AbstractCheckForUpdatesController.performUpdateCheck(AbstractCheckForUpdatesController.java:166)
at com.crashlytics.android.beta.AbstractCheckForUpdatesController.checkForUpdates(AbstractCheckForUpdatesController.java:139)
at com.crashlytics.android.beta.AbstractCheckForUpdatesController.initialize(AbstractCheckForUpdatesController.java:91)
at com.crashlytics.android.beta.Beta.doInBackground(Beta.java:78)
at com.crashlytics.android.beta.Beta.doInBackground(Beta.java:30)
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:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.net.MalformedURLException: Protocol not found: null?instance=7f856ab5-12f8-4723-9e84-569dab8e9760&build_version=1030300&display_version=1.3.3&source=3
at java.net.URL.<init>(URL.java:176)
at java.net.URL.<init>(URL.java:125)
at io.fabric.sdk.android.services.network.HttpRequest.encode(HttpRequest.java:720)
at io.fabric.sdk.android.services.network.HttpRequest.get(HttpRequest.java:865)
at io.fabric.sdk.android.services.network.DefaultHttpRequestFactory.buildHttpRequest(DefaultHttpRequestFactory.java:85)
at io.fabric.sdk.android.services.common.AbstractSpiCall.getHttpRequest(AbstractSpiCall.java:137)
at com.crashlytics.android.beta.CheckForUpdatesRequest.invoke(CheckForUpdatesRequest.java:48)
at com.crashlytics.android.beta.AbstractCheckForUpdatesController.performUpdateCheck(AbstractCheckForUpdatesController.java:166)
at com.crashlytics.android.beta.AbstractCheckForUpdatesController.checkForUpdates(AbstractCheckForUpdatesController.java:139)
at com.crashlytics.android.beta.AbstractCheckForUpdatesController.initialize(AbstractCheckForUpdatesController.java:91)
at com.crashlytics.android.beta.Beta.doInBackground(Beta.java:78)
at com.crashlytics.android.beta.Beta.doInBackground(Beta.java:30)
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:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
I solved a lot of errors logs and the exception above by updating the crashlytics library version.
I also have solved this issue updating Crashlytics version in /app/build.gradle file.
I leave here the code of the fix for convenienece:
dependencies {
compile('com.crashlytics.sdk.android:crashlytics:2.9.4#aar') {
transitive = true;
}
}
I have an Android app that works fine on most popular devices (Galaxy S3, S4, S5, Note 2, Note 3, HTC Desire, Sony Experia Z2), but crashes when running on an HTC One. Strangely, it runs when fine when run on a virtual HTC One in the Genymotion emulator.
I have Bugsense-Splunk Mint baked inside of the app, and I see some Bugsense stuff inside of the error log cat.
Here is the crash report:
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:864)
Caused by: com.splunk.mint.network.util.DelegationException: java.net.ConnectException: failed to connect to 162.243.163.162/162.243.163.162 (port 80): connect failed: EHOSTUNREACH (No route to host)
at com.splunk.mint.network.util.Delegator.invoke0(Delegator.java:62)
at com.splunk.mint.network.util.Delegator.invoke(Delegator.java:45)
at com.splunk.mint.network.socket.MonitoringSocketImpl.connect(MonitoringSocketImpl.java:118)
at java.net.Socket.connect(Socket.java:873)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:125)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:144)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:367)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:519)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:497)
at utilities.RSSParserPosts.getXmlFromUrl(RSSParserPosts.java:216)
at utilities.RSSParserPosts.getRSSFeedItems(RSSParserPosts.java:66)
at com.siliconSarl.CardApp.SearchListFragment$LoadThePostsFromInternet.doInBackground(SearchListFragment.java:131)
at com.siliconSarl.CardApp.SearchListFragment$LoadThePostsFromInternet.doInBackground(SearchListFragment.java:1)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
... 4 more
Caused by: java.net.ConnectException: failed to connect to 162.243.163.162/162.243.163.162 (port 80): connect failed: EHOSTUNREACH (No route to host)
at libcore.io.IoBridge.connect(IoBridge.java:114)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.splunk.mint.network.util.Delegator.invoke0(Delegator.java:56)
... 21 more
Caused by: libcore.io.ErrnoException: connect failed: EHOSTUNREACH (No route to host)
at libcore.io.Posix.connect(Native Method)
at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:85)
at libcore.io.IoBridge.connectErrno(IoBridge.java:127)
at libcore.io.IoBridge.connect(IoBridge.java:112)
... 26 more
Can someone tell me what the problem is? What is causing the app to crash only on the HTC One?
That is an issue in Splunk Mint. This is from their website:
Note: Currently, there are known compatibility issues with network monitoring and certain external libraries such as OkHttp, resulting in crashes. Splunk is currently working on this issue, but until it is resolved, disable network monitoring entirely if you experience this issue.
To disable network monitoring, use the disableNetworkMonitoring() method before the initAndStartSession(). (I am not sure it will work or not, because I didn't try this solution...)