Malformed exception in fabric library
Asked Answered
H

2

10

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) 
Horrendous answered 19/6, 2018 at 6:56 Comment(0)
H
3

I solved a lot of errors logs and the exception above by updating the crashlytics library version.

Horrendous answered 19/6, 2018 at 10:38 Comment(1)
This worked for me also, I am still looking for anything from Fabric as to why this happened or if they even knew this was happening but nothing yet. If you find anything please post a link.Cussed
T
3

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;
    }

}
Thermostat answered 21/6, 2018 at 9:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.