I integrate react-native-code-push to my RN project. But when I installed the update, the APP was crashed. Here is the source code.
2018-10-30 11:26:52.274 14122-14122/com.example.jason.rnandroid E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.jason.rnandroid, PID: 14122
java.lang.AssertionError: recreateReactContextInBackground should only be called after the initial createReactContextInBackground call.
at com.facebook.infer.annotation.Assertions.assertCondition(Assertions.java:72)
at com.facebook.react.ReactInstanceManager.recreateReactContextInBackground(ReactInstanceManager.java:339)
at com.microsoft.codepush.react.CodePushNativeModule$2.run(CodePushNativeModule.java:151)
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 don't know how to solve this problem, can anyone help?
Related
I released my app to Google Play and I can see a lot of fatal exceptions being logged to crashlytics, the stack trace is:
Fatal Exception: java.lang.NullPointerException
at androidx.compose.ui.node.DelegatableNodeKt.requireCoordinator-64DMado(DelegatableNodeKt.java:295)
at androidx.compose.ui.semantics.SemanticsNode.findCoordinatorToGetBounds$ui_release(SemanticsNode.kt:356)
at androidx.compose.ui.semantics.SemanticsNode.getSize-YbymL2g(SemanticsNode.java:115)
at androidx.compose.ui.platform.AndroidComposeViewAccessibilityDelegateCompat.performActionHelper(AndroidComposeViewAccessibilityDelegateCompat.java:1358)
at androidx.compose.ui.platform.AndroidComposeViewAccessibilityDelegateCompat.access$performActionHelper(AndroidComposeViewAccessibilityDelegateCompat.java:117)
at androidx.compose.ui.platform.AndroidComposeViewAccessibilityDelegateCompat$MyNodeProvider.performAction(AndroidComposeViewAccessibilityDelegateCompat.android.kt:2451)
at android.view.AccessibilityInteractionController.performAccessibilityActionUiThread(AccessibilityInteractionController.java:612)
at android.view.AccessibilityInteractionController.-wrap6(AccessibilityInteractionController.java)
at android.view.AccessibilityInteractionController$PrivateHandler.handleMessage(AccessibilityInteractionController.java:1228)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6942)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
or
Fatal Exception: java.lang.NullPointerException
at androidx.compose.ui.node.DelegatableNodeKt.requireCoordinator-64DMado(DelegatableNodeKt.java:295)
at androidx.compose.ui.semantics.SemanticsNode.findCoordinatorToGetBounds$ui_release(SemanticsNode.kt:356)
at androidx.compose.ui.semantics.SemanticsNode.getSize-YbymL2g(SemanticsNode.java:115)
at androidx.compose.ui.platform.AndroidComposeViewAccessibilityDelegateCompat.performActionHelper(AndroidComposeViewAccessibilityDelegateCompat.java:1358)
at androidx.compose.ui.platform.AndroidComposeViewAccessibilityDelegateCompat.access$performActionHelper(AndroidComposeViewAccessibilityDelegateCompat.java:117)
at androidx.compose.ui.platform.AndroidComposeViewAccessibilityDelegateCompat$MyNodeProvider.performAction(AndroidComposeViewAccessibilityDelegateCompat.android.kt:2451)
at android.view.AccessibilityInteractionController.performAccessibilityActionUiThread(AccessibilityInteractionController.java:708)
at android.view.AccessibilityInteractionController.access$500(AccessibilityInteractionController.java:67)
at android.view.AccessibilityInteractionController$PrivateHandler.handleMessage(AccessibilityInteractionController.java:1327)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6704)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:916)
that's all I can see in the logs.. As you can see, the stacktrace does not have any code that belongs to my app, so there's no place where I can put a try/catch for example and I can't even reproduce this.
Any idea on how to fix this or at least reproduce the issue?
This app release was built with compose v1.3, but I could see logs from 1.3-beta as well...
Any help would be appreciated.
The following release(s) address this bug.
androidx.compose.ui:ui:1.4.0-alpha05
Source: https://issuetracker.google.com/issues/258907850
I'm trying to submit an update to an existing app to production, but I seem to be failing in the prelaunch for one specific device on on android sdk 26. I can reproduce this on emulation of sdk 26. The testing video seemed to just show the automated testing opening and closing the app and clicking around for about 5 minutes. I didn't seem to see any errors in the app itself.
I'm received several errors and all seem to be related to items related to com.google.android.apps.mtaas .
My app doesn't use any DeviceAdmin features so I'm not sure where these are coming from. Also, after looking at the full logcat file none of these process ID's match with the process ID's of my running app, and some of these seem to occur in the logs before I see much activity from the testing opening/closing my app.
Does anyone have any clue where to begin? I can't seem to recreate it, and without any hint to how they might relate to my code(if they do at all) I can't properly attempt to implement any fix.
I've seen numerous threads about false positives related to the prelaunch reports generating false positivies, but I'm not sure if that's the case here or not.
FATAL EXCEPTION: Instr: com.google.android.apps.mtaas.deviceadmin.HideApps
Process: com.google.android.apps.mtaas.deviceadmin, PID: 14692
java.lang.SecurityException: No active admin ComponentInfo
{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.DeviceAdminReceiver}
at android.os.Parcel.readException(Parcel.java:1958)
at android.os.Parcel.readException(Parcel.java:1904)
at android.app.admin.IDevicePolicyManager$Stub$Proxy.isApplicationHidden(IDevicePolicyManager.java:8952)
at android.app.admin.DevicePolicyManager.isApplicationHidden(DevicePolicyManager.java:7466)
at com.google.android.apps.mtaas.deviceadmin.HideApps.onStart(HideApps.java:63)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2106)
FATAL EXCEPTION: main
Process: com.google.android.apps.mtaas.deviceadmin, PID: 14836
java.lang.RuntimeException: Exception thrown in onCreate() of ComponentInfo
{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.ToggleUserRestriction}
: java.lang.SecurityException: No active admin ComponentInfo
{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.DeviceAdminReceiver}
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6050)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: java.lang.SecurityException: No active admin ComponentInfo{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.DeviceAdminReceiver}
at android.os.Parcel.readException(Parcel.java:1958)
at android.os.Parcel.readException(Parcel.java:1904)
at android.app.admin.IDevicePolicyManager$Stub$Proxy.setUserRestriction(IDevicePolicyManager.java:8542)
at android.app.admin.DevicePolicyManager.addUserRestriction(DevicePolicyManager.java:7339)
at com.google.android.apps.mtaas.deviceadmin.ToggleUserRestriction.start(ToggleUserRestriction.java:49)
at com.google.android.apps.mtaas.deviceadmin.ToggleUserRestriction.onCreate(ToggleUserRestriction.java:22)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6047)
... 8 more
FATAL EXCEPTION: main
Process: com.google.android.apps.mtaas.deviceadmin, PID: 14959
java.lang.RuntimeException: Exception thrown in onCreate() of ComponentInfo
{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.SetUpdatePolicy}
: java.lang.SecurityException: No active admin ComponentInfo
{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.DeviceAdminReceiver}
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6050)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: java.lang.SecurityException: No active admin ComponentInfo{com.google.android.apps.mtaas.deviceadmin/com.google.android.apps.mtaas.deviceadmin.DeviceAdminReceiver}
at android.os.Parcel.readException(Parcel.java:1958)
at android.os.Parcel.readException(Parcel.java:1904)
at android.app.admin.IDevicePolicyManager$Stub$Proxy.setSystemUpdatePolicy(IDevicePolicyManager.java:9956)
at android.app.admin.DevicePolicyManager.setSystemUpdatePolicy(DevicePolicyManager.java:7970)
at com.google.android.apps.mtaas.deviceadmin.SetUpdatePolicy.start(SetUpdatePolicy.java:51)
at com.google.android.apps.mtaas.deviceadmin.SetUpdatePolicy.onCreate(SetUpdatePolicy.java:34)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6047)
... 8 more
FATAL EXCEPTION: main
Process: com.google.android.apps.mtaas.tools, PID: 23437
java.lang.RuntimeException: Unable to instantiate instrumentation ComponentInfo
{com.google.android.apps.mtaas.tools/androidx.test.runner.AndroidJUnitRunner}
: java.lang.ClassNotFoundException: Didn't find class "androidx.test.runner.AndroidJUnitRunner" on path: DexPathList[[zip file "/data/app/com.google.android.apps.mtaas.tools-kyrqBrU_34KhOurU1Kfvdg==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.apps.mtaas.tools-kyrqBrU_34KhOurU1Kfvdg==/lib/arm64, /system/lib64, /vendor/lib64]]
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5995)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.test.runner.AndroidJUnitRunner" on path: DexPathList[[zip file "/data/app/com.google.android.apps.mtaas.tools-kyrqBrU_34KhOurU1Kfvdg==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.apps.mtaas.tools-kyrqBrU_34KhOurU1Kfvdg==/lib/arm64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5993)
... 8 more
I made this tutorial for get user's address and location but I got error when I changed AVD's location. When I didn't call getCityName function at getLastLocation function, I can get user's location but when I call it, it gave that error. How can I solve it?
it was give an error which was :
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.slidework3, PID: 15792
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.reflect.InvocationTargetException
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)
Caused by: java.io.IOException: grpc failed
at android.location.Geocoder.getFromLocation(Geocoder.java:136)
at com.example.slidework3.AdresPage.getCityName(AdresPage.kt:152)
at com.example.slidework3.AdresPage.access$getCityName(AdresPage.kt:20)
at com.example.slidework3.AdresPage$getLastLocation$1.onComplete(AdresPage.kt:66)
at com.google.android.gms.tasks.zzj.run(Unknown Source:4)
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)
Edit:
I tried real device, location services working well I can get city name, street name etc. But in simulator it was give error again. I tried to change AVD's location after that it was going to crash. I believe solution is simple but I don't know how can I search this situation.
Try run the operation in a new Thread, and then if I need to update some UI view I'll do it on runOnUiThread.
https://developer.android.com/training/location/display-address#java
I'm developping an app with React native and my last version in release mode crashes after 20-30 seconds with the following generated logcat:
02-19 23:52:10.777 32717-32717/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: my.app, PID: 32717
java.lang.OutOfMemoryError: std::bad_alloc
at com.facebook.react.bridge.WritableNativeArray.pushInt(Native Method)
at com.facebook.react.modules.core.Timing$TimerFrameCallback.doFrame(Timing.java:89)
at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:134)
at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:105)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:909)
at android.view.Choreographer.doCallbacks(Choreographer.java:723)
at android.view.Choreographer.doFrame(Choreographer.java:655)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
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:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
The app never crashes in dev mode.
How can I know what causes this? Is there a leak somewhere? What steps are to be followed to know more about it?
android/app/src/main/AndroidManifest.xml
<application
android:largeHeap="true"
Adding largeHeap seems fix it
Please refer this git issue
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.