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;
}
}
Related
I am using Firebase UI Auth to login into the application. The debug build is working fine but when I try to login with the release build the application crashes with an error.
2018-10-02 14:05:23.072 4827-4866/io.palette E/c.b.a.J: Creating atomic field updaters failed
java.lang.RuntimeException: java.security.PrivilegedActionException: java.lang.NoSuchFieldException: No field streamClosed in class Lc/b/a/J$c; (declaration of 'c.b.a.J$c' appears in /data/app/io.palette-1/base.apk)
at java.util.concurrent.atomic.AtomicIntegerFieldUpdater$AtomicIntegerFieldUpdaterImpl.<init>(AtomicIntegerFieldUpdater.java:380)
at java.util.concurrent.atomic.AtomicIntegerFieldUpdater.newUpdater(AtomicIntegerFieldUpdater.java:58)
at c.b.a.J.<clinit>(:77)
at c.b.a.c.c(:420)
at c.b.a.c.a(:395)
at com.google.firebase.firestore.f.zzd.<init>(:102)
at com.google.firebase.firestore.b.zzg.zza(:1217)
at com.google.firebase.firestore.b.zzi.run()
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 com.google.firebase.firestore.g.zza$zza.run(:190)
at java.lang.Thread.run(Thread.java:761)
What could be the possible reason for this?
I'm working on a React Native project that uses djinni to use cross platform native C++.
I already looked at this question, but it seems a different problem.
The project build successfully but fails almost immediately on run.
adb logcat shows the following exception:
No implementation found for com.djinnius.HelloWorld$CppProxy com.djinnius.HelloWorld.create(com.rushingvise.reactcpp.ReactBridge) (tried Java_com_djinnius_HelloWorld_create and Java_com_djinnius_HelloWorld_create__Lcom_rushingvise_reactcpp_ReactBridge_2)
I'm trying to understand what tried means in the message above. Is this because the corresponding native code is missing from the apk ? Or maybe another cause ?
Full logcat is following:
04-19 19:44:51.042 2354-2700/com.djinnius E/art: No implementation found for com.djinnius.HelloWorld$CppProxy com.djinnius.HelloWorld.create(com.rushingvise.reactcpp.ReactBridge) (tried Java_com_djinnius_HelloWorld_create and Java_com_djinnius_HelloWorld_create__Lcom_rushingvise_reactcpp_ReactBridge_2)
04-19 19:44:51.045 2354-2354/com.djinnius W/unknown:React: Caught exception after cancelling react context init
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object com.facebook.react.ReactInstanceManager$Result.get()' on a null object reference
at com.facebook.react.ReactInstanceManager$ReactContextInitAsyncTask.onCancelled(ReactInstanceManager.java:247)
at com.facebook.react.ReactInstanceManager$ReactContextInitAsyncTask.onCancelled(ReactInstanceManager.java:197)
at android.os.AsyncTask.finish(AsyncTask.java:665)
at android.os.AsyncTask.-wrap1(AsyncTask.java)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:684)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6339)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1084)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:945)
04-19 19:44:51.053 2354-2700/com.djinnius E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #3
Process: com.djinnius, PID: 2354
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:325)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
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.lang.UnsatisfiedLinkError: No implementation found for com.djinnius.HelloWorld$CppProxy com.djinnius.HelloWorld.create(com.rushingvise.reactcpp.ReactBridge) (tried Java_com_djinnius_HelloWorld_create and Java_com_djinnius_HelloWorld_create__Lcom_rushingvise_reactcpp_ReactBridge_2)
at com.djinnius.HelloWorld.create(Native Method)
at com.djinnius.HelloWorld.<init>(HelloWorld.java:27)
at com.djinnius.HelloWorldPackage.createNativeModules(HelloWorldPackage.java:18)
at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:88)
at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:950)
at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:891)
at com.facebook.react.ReactInstanceManager.access$600(ReactInstanceManager.java:104)
at com.facebook.react.ReactInstanceManager$ReactContextInitAsyncTask.doInBackground(ReactInstanceManager.java:218)
at com.facebook.react.ReactInstanceManager$ReactContextInitAsyncTask.doInBackground(ReactInstanceManager.java:197)
at android.os.AsyncTask$2.call(AsyncTask.java:305)
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)
Any help appreciated.
Found the problem.
It was indeed a missing System.LoadLibrary() Call in the Java Class extending ReactPackage.
This is working now with this class initializer
public class HelloWorldPackage implements ReactPackage {
static {
System.loadLibrary("native-lib");
}
I'm just trying to migrate Fabric Crashlytics with Firebase, so I just followed the guide https://firebase.google.com/docs/crashlytics/get-started
Everything compiles and the app can be launched. So I want to simulate a crash with Crashlytics.getInstance().crash(); as I already used before.
The app crashes as expected, but the crash is not uploaded to firebase and I have this strange stack:
E/Fabric: Error performing auto configuration.
io.fabric.sdk.android.services.network.HttpRequest$HttpRequestException: java.net.ProtocolException: Too many follow-up requests: 21
at io.fabric.sdk.android.services.network.HttpRequest.code(HttpRequest.java:1355)
at io.fabric.sdk.android.services.settings.AbstractAppSpiCall.invoke(AbstractAppSpiCall.java:86)
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:762)
Caused by: java.net.ProtocolException: Too many follow-up requests: 21
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:451)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:567)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java)
Anyone already had encountered this error?
This can happen when you strip the API key from Fabric when migrating from Fabric to Firebase Crashlytics, which is not currently supported. When migrating, keep your API key in your project.
I'm using Okhttp:3.4.1 . Using this, all the https calls were giving
java.net.protocolexception: expected ':status' header not present.
Some of blogs advised to update Okhttp. When I update from 3.4.1 to 3.10.0, I'm getting
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:318)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
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.lang.NoSuchMethodError: No virtual method setCallWebSocket(Lokhttp3/Call;)V in class Lokhttp3/internal/Internal; or its super classes (declaration of 'okhttp3.internal.Internal' appears in /data/app/com.XXXXXX.android-1/split_lib_dependencies_apk.apk:classes85.dex)
at okhttp3.ws.WebSocketCall.enqueue(WebSocketCall.java:108)
at com.facebook.react.devsupport.InspectorPackagerConnection$Connection.connect(InspectorPackagerConnection.java:243)
at com.facebook.react.devsupport.InspectorPackagerConnection.connect(InspectorPackagerConnection.java:44)
at com.facebook.react.devsupport.DevServerHelper$3.doInBackground(DevServerHelper.java:204)
at com.facebook.react.devsupport.DevServerHelper$3.doInBackground(DevServerHelper.java:200)
at android.os.AsyncTask$2.call(AsyncTask.java:304)
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)
I'm using react-native:0.45.1
React native use okhttp as a dependency, upgrade okhttp may result in some compatibility issue. Currently it's using okhttp 3.6.0 (https://github.com/facebook/react-native/blob/8466db0fd355aea778ff71cfb10c927cfd18a551/ReactAndroid/build.gradle#L288). So my advice is that just leave it be.
I am using Crashlytics version 2.6.8 for my Android app. I have configured Crashlytics in base feature following answer here. Crashlystics is initialized with Fabric using following code snippet
Fabric.with(context, crashlyticsKit);
Crashlytics Answers throws this exception on startup of Android instant apps
E/Answers: Failed to enable events
java.io.IOException: ftruncate failed: EACCES (Permission denied)
at java.io.RandomAccessFile.setLength(RandomAccessFile.java:630)
at io.fabric.sdk.android.services.common.QueueFile.initialize(QueueFile.java:213)
at io.fabric.sdk.android.services.common.QueueFile.<init>(QueueFile.java:130)
at io.fabric.sdk.android.services.events.QueueFileEventStorage.<init>(QueueFileEventStorage.java:58)
at io.fabric.sdk.android.services.events.GZIPQueueFileEventStorage.<init>(GZIPQueueFileEventStorage.java:32)
at com.crashlytics.android.answers.AnswersFilesManagerProvider.getAnalyticsFilesManager(AnswersFilesManagerProvider.java:44)
at com.crashlytics.android.answers.AnswersEventsHandler$4.run(AnswersEventsHandler.java:121)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at io.fabric.sdk.android.services.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:75)
at io.fabric.sdk.android.services.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:30)
at java.lang.Thread.run(Thread.java:818)
Caused by: android.system.ErrnoException: ftruncate failed: EACCES (Permission denied)
at libcore.io.Posix.ftruncate(Native Method)
at libcore.io.BlockGuardOs.ftruncate(BlockGuardOs.java:148)
at java.io.RandomAccessFile.setLength(RandomAccessFile.java:628)
Is it caused due to storage access? If so, Is it possible to configure Crashlytics from accessing storage in case of Instant apps?
It doesn't seem like you are initializing Answers itself, only Crashlytics?
Try something like this if you want Crashlytics and Answers from Fabric:
final Fabric fabric = new Fabric.Builder(this)
.kits(new Crashlytics(), new Answers())
.debuggable(true)
.build();
Fabric.with(fabric);