Fatal Exception at AnroidRuntime after releasing new update - android

After updating for a new release of my app I'm getting this error crash repeatedly on the opening of the app and nothing else. This crash happening after few seconds of the opening of the app.
Error Log:
E/AndroidRuntime: FATAL EXCEPTION: Thread-3
Process: com.company.app, PID: 13304
java.lang.NoSuchMethodError: No direct method <init>(Lorg/apache/http/c/c;Lorg/apache/http/conn/scheme/SchemeRegistry;)V in class Lorg/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager; or its super classes (declaration of 'org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager' appears in /system/framework/org.apache.http.legacy.boot.jar)
at com.a.g.c.c(Unknown Source:54)
at com.a.g.c.a(Unknown Source:4)
at com.a.e.b.a(Unknown Source:0)
at com.a.e.b.b(Unknown Source:23000)
at com.a.d.b.c(Unknown Source:5000)
at com.a.d.b.b(Unknown Source:0)
at com.a.d.b.a(Unknown Source:4000)
at com.a.c.f.a(Unknown Source:12000)
at com.a.c.f$1.run(Unknown Source:4)
at com.a.a.b.b.a(Unknown Source:8)
at com.a.e.a(Unknown Source:51031)
at com.a.e.a(Unknown Source:0)
at com.a.e$4.run(Unknown Source:1000)
at com.a.e.o(Unknown Source:31)
at com.a.e.a(Unknown Source:45000)
at com.a.c.a(Unknown Source:20)
at com.a.c.b(Unknown Source:27000)
at com.a.c$1.run(Unknown Source:7)
at com.a.a.b.c.run(Unknown Source:8)
at com.a.a.b.d.run(Unknown Source:2000)
This error is showing in Logcat not getting on Crashlytics.
What are the main causes of this happening and how to solve this problem?

What are the main causes of this happening and how to solve this problem?
This is due to your apache classes are stripped by your proguard obfuscation step. Try to add -keep options for those apache classes. E.g.
-keep class org.apache.http.** { *; }

Related

Android : Proguard build is failing for joda time

I am getting the following error when I build the app with proguard. This failure is new. I updated some of the libraries used in the app to latest (including the target and compile sdk version to 30)but the joda library version is not changed. It is implementation 'net.danlew:android.joda:2.8.2'
Any idea why this error is coming now and how it can be resolved.
I already have the rule -keep class org.joda.** { *; } in my progurad rules.
java.lang.RuntimeException: Unable to create application com.xxx.xxx.xxx: java.lang.RuntimeException: Could not read ZoneInfoMap
at android.app.ActivityThread.handleMakeApplication(ActivityThread.java:7506)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7440)
at android.app.ActivityThread.access$1500(ActivityThread.java:301)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2148)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8506)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Caused by: java.lang.RuntimeException: Could not read ZoneInfoMap
at net.a.a.a.a.a(SourceFile:42)
at com.xxx.xxx.xxx.onCreate(SourceFile:116)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
EDIT
Updating joda version to the latest 2.10.9.1 fixes the issue.
I am not adding this as answer as I wanted to know why this error appeared all of a sudden? Can any other version update can lead to this.

Android ION post request failing

I've tried to make a POST request using ION as showcased here but I'm getting the following errors.
2020-11-30 14:08:37.353 8610-8651/com.example.test_app E/AndroidRuntime: FATAL EXCEPTION: ion-ion
Process: com.example.test_app, PID: 8610
java.lang.AssertionError
at com.koushikdutta.async.AsyncSSLSocketWrapper.write(AsyncSSLSocketWrapper.java:492)
at com.koushikdutta.async.AsyncSSLSocketWrapper.handleHandshakeStatus(AsyncSSLSocketWrapper.java:378)
at com.koushikdutta.async.AsyncSSLSocketWrapper.handshake(AsyncSSLSocketWrapper.java:182)
at com.koushikdutta.async.http.AsyncSSLSocketMiddleware.tryHandshake(AsyncSSLSocketMiddleware.java:89)
at com.koushikdutta.async.http.AsyncSSLSocketMiddleware$2.onConnectCompleted(AsyncSSLSocketMiddleware.java:106)
at com.koushikdutta.async.http.AsyncSocketMiddleware.lambda$getSocket$3$AsyncSocketMiddleware(AsyncSocketMiddleware.java:217)
at com.koushikdutta.async.http.-$$Lambda$AsyncSocketMiddleware$glazjOxu-iNIRY4N890Wl1ngyGo.onCompleted(Unknown Source:12)
at com.koushikdutta.async.future.SimpleFuture.lambda$setCallback$0(SimpleFuture.java:212)
at com.koushikdutta.async.future.-$$Lambda$SimpleFuture$h_gK5Y1XHZI1H8JTE2xOg4dXbp8.onCompleted(Unknown Source:2)
at com.koushikdutta.async.future.SimpleFuture$FutureCallsite.loop(SimpleFuture.java:130)
at com.koushikdutta.async.future.SimpleFuture.handleCallbackUnlocked(SimpleFuture.java:153)
at com.koushikdutta.async.future.SimpleFuture.setComplete(SimpleFuture.java:191)
at com.koushikdutta.async.future.SimpleFuture.setComplete(SimpleFuture.java:174)
at com.koushikdutta.async.future.-$$Lambda$VNAuWcttAhMr3VsWCERbmWE6yR0.success(Unknown Source:2)
at com.koushikdutta.async.future.SimpleFuture.lambda$success$4(SimpleFuture.java:279)
at com.koushikdutta.async.future.-$$Lambda$SimpleFuture$DxIsaj7NQi76eWgOKS4iviWPLV0.onCompleted(Unknown Source:4)
at com.koushikdutta.async.future.SimpleFuture$FutureCallsite.loop(SimpleFuture.java:130)
at com.koushikdutta.async.future.SimpleFuture.handleCallbackUnlocked(SimpleFuture.java:153)
at com.koushikdutta.async.future.SimpleFuture.setComplete(SimpleFuture.java:191)
at com.koushikdutta.async.future.SimpleFuture.setComplete(SimpleFuture.java:178)
at com.koushikdutta.async.http.-$$Lambda$cBC5du-82c5EcL72rP5wNK7Y2Y4.onConnectCompleted(Unknown Source:2)
at com.koushikdutta.async.AsyncServer.runLoop(AsyncServer.java:896)
at com.koushikdutta.async.AsyncServer.run(AsyncServer.java:717)
at com.koushikdutta.async.AsyncServer.access$800(AsyncServer.java:46)
at com.koushikdutta.async.AsyncServer$11.run(AsyncServer.java:671)
Any idea? Thanks.
I found the solution, the problem was that this library doesn't seem to work with Gradle versions newer than 4.0.1.

Why android studio not showing line where code error?

i'm debuging a running app and see logcat in android studio, when the app have a error usually android studio will showing some error detail in logcat with the line where the error happened. but i just get some error detail like this
2019-09-04 08:50:46.894 11148-11148/id.co.hallo.hallo
E/AndroidRuntime: FATAL EXCEPTION: main
Process: id.co.hallo.hallo, PID: 11148
java.lang.ClassCastException: java.lang.String cannot be cast to id.co.hallo.hallo.support.ap
at id.co.hallo.hallo.ui.view.residence.setting.SettingResidence$c.run(Unknown
Source)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6238)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:933)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
what should i do to get the detail error with line code where the error happened?
First, you need to make sure the code in build.gradle proguard is set to false.
Second, the code you called maybe in a SDK/plugin, so it reminded "unKnown"
Hope it helps.
Most of the times the LogCat shows the line of code where the exception is raised, i recommend to you look in the LogCat for the message starting with:
Caused by
but in this case the exception is pretty obvious, an incorrect cast:
java.lang.ClassCastException: java.lang.String cannot be cast to
id.co.hallo.hallo.support.ap
and this error occur in the class:
id.co.hallo.hallo.ui.view.residence.setting.SettingResidence

Appsflyer Crash : Fatal Exception: java.lang.NoSuchMethodError for MultipleInstallBroadcastReceiver.java line 43

I am getting a Crash which is reported in Crashlytics for com.appsflyer.MultipleInstallBroadcastReceiver.onReceive in MultipleInstallBroadcastReceiver.java class
This Crash is been reported for few users in all the android verisons
Fatal Exception: java.lang.NoSuchMethodError: No virtual method 藡(Landroid/content/Context;Landroid/content/Intent;)V in class Lcom/appsflyer/AppsFlyerLib; or its super classes (declaration of 'com.appsflyer.AppsFlyerLib' appears in /data/app/com.rapido.passenger-1/base.apk)
at com.appsflyer.MultipleInstallBroadcastReceiver.onReceive(MultipleInstallBroadcastReceiver.java:43)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3112)
at android.app.ActivityThread.-wrap18(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1627)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:165)
at android.app.ActivityThread.main(ActivityThread.java:6375)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
From the stack trace it seems to be an obfuscation issue (looking at the method name 藡)
What is the SDK version being used? Are there any proGuard (or other tool) rules configured for AppsFlyer?
If not I would suggest adding a -keep class com.appsflyer.** { *; } rule.
If you do not wish to share any additional information publicly, you can open a ticket with support#appsflyer.com, with the SDK version, any obfuscation related information and a link to this thread.

FATAL EXCEPTION: GoogleApiHandler

In my project i'm using the monetization service(Vungle/AppLovin).
When I'm trying to load an ad, i get this exception
E/AndroidRuntime: FATAL EXCEPTION: GoogleApiHandler
Process: kz.ikar, PID: 3673
java.lang.NoSuchMethodError: No virtual method setChannelId(Ljava/lang/String;)Landroid/support/v4/app/NotificationCompat$Builder; in class Landroid/support/v4/app/NotificationCompat$Builder; or its super classes (declaration of 'android.support.v4.app.NotificationCompat$Builder' appears in /data/app/kz.ikar-2oCl4DY4J8w7wP-jirbYvA==/split_lib_dependencies_apk.apk)
at com.google.android.gms.common.GoogleApiAvailability.zza(Unknown Source:225)
at com.google.android.gms.common.GoogleApiAvailability.zza(Unknown Source:15)
at com.google.android.gms.common.api.internal.zzbm.zzc(Unknown Source:4)
at com.google.android.gms.common.api.internal.zzbo.onConnectionFailed(Unknown Source:104)
at com.google.android.gms.common.api.internal.zzbo.connect(Unknown Source:83)
at com.google.android.gms.common.api.internal.zzbo.zza(Unknown Source:47)
at com.google.android.gms.common.api.internal.zzbm.handleMessage(Unknown Source:283)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)
In my project I have two fragments in one activity. The user gets an ad in the second one. If I load an ad from the activity, it works well. What can be the cause of this issue?
By the way both ad networks(Vungle and AppLovin) return this exception
I had the same problem and I fixed it downgrading to firebase Google Play services 11.6.0
One reason you could be getting this error is if your buildToolsVersion in your app-level Gradle is less than 26. Either that or your v4 support is less than 26.0.0 seeing as NotificationCompat.Builder was added in API 26.

Categories

Resources