Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Malformed exception in fabric library

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) 
like image 643
Zach Bublil Avatar asked Jun 19 '18 06:06

Zach Bublil


2 Answers

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

}
like image 158
Fab Avatar answered Sep 17 '22 01:09

Fab


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

like image 32
Zach Bublil Avatar answered Sep 20 '22 01:09

Zach Bublil