Android : R8 codeshrink issues reported in crashlytics - android

I have tried to debug this crash but couldn't get the exact cause, but this is happening across the app.
Fatal Exception: java.lang.NullPointerException
at fm.e.run(R8$$SyntheticClass:7)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:238)
at android.app.ActivityThread.main(ActivityThread.java:7829)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:512)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:986)
Fatal Exception: java.lang.NullPointerException
at oh.e.e(R8$$SyntheticClass:216)
at androidx.lifecycle.LiveData.b(LiveData.java:6)
at androidx.lifecycle.LiveData.c(LiveData.java:8)
at androidx.lifecycle.t.j(MutableLiveData.java:4)
at androidx.lifecycle.LiveData$a.run(LiveData.java:5)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:254)
at android.app.ActivityThread.main(ActivityThread.java:8243)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006)
AGP : v7.2
Thanks in advance!

Related

How to resolve rxjava exception ? Below is log from firebase crashanalytics

I am getting below log . trying to find the root cause . Could anyone help me in explaining this issue.
Fatal Exception: q2.b.a.d.a: 2 exceptions occurred.
at io.reactivex.rxjava3.internal.observers.LambdaObserver.onError(LambdaObserver.java:80)
at io.reactivex.rxjava3.internal.observers.LambdaObserver.onNext(LambdaObserver.java:67)
at io.reactivex.rxjava3.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:201)
at io.reactivex.rxjava3.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
at io.reactivex.rxjava3.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:123)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7386)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)

Android OssLicensesMenuActivity crashes on start

I have added every needed dependency and plugins. My project is also generating third_party_licences files, but my app crashes when activity OssLicensesMenuActivity starts.
Errors here:
E/GmsClient: unable to connect to service: com.google.android.gms.oss.licenses.service.START on com.google.android.gms
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.axabee.seeplaces, PID: 12102
java.lang.NullPointerException: Attempt to invoke virtual method 'long com.google.android.gms.internal.oss_licenses.zzc.zze()' on a null object reference
at com.google.android.gms.internal.oss_licenses.zze.zza(Unknown Source:19)
at com.google.android.gms.oss.licenses.zzf.onComplete(Unknown Source:28)
at com.google.android.gms.tasks.zzj.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

How I can fix such bug from Google Play Console?

I received such log at Google Play Console:
FATAL EXCEPTION: ControllerMessenger
Process: de.jobnetzwerk.jobnet, PID: 31798
kotlin.KotlinNullPointerException
at de.jobnetzwerk.jobnet.notepad.NoteData.getRemarksList(NoteData.kt:282)
at de.jobnetzwerk.jobnet.notepad.NoteData.access$getRemarksList(NoteData.kt:26)
at de.jobnetzwerk.jobnet.notepad.NoteData$updateRemark$1.onResponse(NoteData.kt:121)
at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:71)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at androidx.test.espresso.base.Interrogator.a(Interrogator.java:19)
at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:169)
at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:161)
at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:141)
at androidx.test.espresso.action.Tap$1.a(Tap.java:6)
at androidx.test.espresso.action.GeneralClickAction.perform(GeneralClickAction.java:20)
at androidx.test.espresso.ViewInteraction$SingleExecutionViewAction.perform(ViewInteraction.java:9)
at androidx.test.espresso.ViewInteraction.a(ViewInteraction.java:79)
at androidx.test.espresso.ViewInteraction.a(ViewInteraction.java:97)
at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:3)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
below problematic line (num. 282):
Singleton.apiService().getNoteRecords("Bearer " + context!!.getSharedPreferences("app_data", 0)?.getString("access_token", ""), noteID!!).enqueue(object : Callback<List<RemarkModelNotepad>> {
at this line I start getting data from server API. Which part can create a problem?
UPDATE
My problem in generall is connected with safe-types at kotlin. I think that it will be solved by adding ? or !! but I don't kno where I have to add this.

Fatal Exception: java.lang.IndexOutOfBoundsException

I used Faric to count my app crashes. In recent versions, I have a strange bug. Is this caused by the addition of a third-party webview? Has anyone encountered this situation, please help me, here is Some logs:
Fatal Exception: java.lang.IndexOutOfBoundsException: getChars (87 ... 99) ends beyond length 90
at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1018)
at android.text.SpannableStringBuilder.getChars(SpannableStringBuilder.java:915)
at android.text.TextUtils.getChars(TextUtils.java:86)
at android.text.SpannableStringBuilder.(SpannableStringBuilder.java:64)
at android.text.SpannableStringBuilder.subSequence(SpannableStringBuilder.java:907)
at org.chromium.content.browser.input.ReplicaInputConnection.setComposingRegion(Unknown Source)
at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:349)
at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:78)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5276)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:911)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:706)

FATAL EXCEPTION: ControllerMessenger

can someone help me to fix these errors. I added my app to the firebase and did test run. and I got these errors. I am new to android app development. I have no clear idea where should I start to fix these errors.
Fatal exception
android.os.FileUriExposedException: file:///storage/emulated/0/QR%20and%20Barcode/text.png exposed beyond app through ClipData.Item.getUri()
FATAL EXCEPTION: ControllerMessenger
Process: one.teqtoapps.barqr, PID: 9659
android.os.FileUriExposedException: file:///storage/emulated/0/QR%20and%20Barcode/text.png exposed beyond app through ClipData.Item.getUri()
at android.os.StrictMode.onFileUriExposed(StrictMode.java:1958)
at android.net.Uri.checkFileUriExposed(Uri.java:2348)
at android.content.ClipData.prepareToLeaveProcess(ClipData.java:941)
at android.content.Intent.prepareToLeaveProcess(Intent.java:9735)
at android.content.Intent.prepareToLeaveProcess(Intent.java:9741)
at android.content.Intent.prepareToLeaveProcess(Intent.java:9720)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1609)
at androidx.test.runner.MonitoringInstrumentation.execStartActivity(MonitoringInstrumentation.java:152)
at android.app.Activity.startActivityForResult(Activity.java:4472)
at android.support.v4.app.BaseFragmentActivityApi16.startActivityForResult(BaseFragmentActivityApi16.java:54)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:68)
at android.app.Activity.startActivityForResult(Activity.java:4430)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:751)
at android.app.Activity.startActivity(Activity.java:4791)
at android.app.Activity.startActivity(Activity.java:4759)
at one.teqtoapps.barqr.utility.AppUtils.share(AppUtils.java:83)
at one.teqtoapps.barqr.fragment.GenerateFragment$6.onSaved(GenerateFragment.java:183)
at one.teqtoapps.barqr.utility.SaveImage.onPostExecute(SaveImage.java:41)
at one.teqtoapps.barqr.utility.SaveImage.onPostExecute(SaveImage.java:16)
at android.os.AsyncTask.finish(AsyncTask.java:695)
at android.os.AsyncTask.-wrap1(Unknown Source:0)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
at android.os.Handler.dispatchMessage(Handler.java:105)
at androidx.test.espresso.base.Interrogator.a(Interrogator.java:19)
at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:142)
at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:96)
at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:37)
at androidx.test.espresso.action.MotionEvents.a(MotionEvents.java:74)
at androidx.test.espresso.action.MotionEvents.a(MotionEvents.java:52)
at androidx.test.espresso.action.Tap.c(Tap.java:9)
at androidx.test.espresso.action.Tap.a(Tap.java:19)
at androidx.test.espresso.action.Tap$1.b(Tap.java:2)
at androidx.test.espresso.action.GeneralClickAction.perform(GeneralClickAction.java:22)
at androidx.test.espresso.ViewInteraction$SingleExecutionViewAction.perform(ViewInteraction.java:9)
at androidx.test.espresso.ViewInteraction.a(ViewInteraction.java:78)
at androidx.test.espresso.ViewInteraction.a(ViewInteraction.java:94)
at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:3)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
I got the same Crashes on some devices during Google Play test
I thought this will help you :
https://issuetracker.google.com/issues/113164874
In my case, it show in log
Failed to take screenshot: takeScreenshot returned null
copied 4 bytes
01-29 06:27:43.544: I/Robo(11035): --------- beginning of crash
01-29 06:27:43.545: E/AndroidRuntime(11035): FATAL EXCEPTION: ControllerMessenger
01-29 06:27:43.545: E/AndroidRuntime(11035): Process: PID: 11035
01-29 06:27:43.545: E/AndroidRuntime(11035): java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.Bitmap.recycle()' on a null object reference
because my screen has secure flag to take screen-shot and testing framework trying to take screen-shot that will return null and throwing NullPointerException on recycle.
For more help you can reply me here.

Categories

Resources