Forum Xamarin.Forms

Android app crashes with android.os.RemoteException

The app is crashed with the following app center log, I have tried many ways to reproduce it, but I can't reproduce it. Could you please share your input if you have already experienced with this kind of crash?

at android.os.RemoteException: Remote stack trace:
at com.android.server.am.ActivityManagerService.isTopOfTask(ActivityManagerService.java:18132)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2058)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:4144)
at android.os.Binder.execTransact(Binder.java:739)

Few observations.
1. It happens only on the Android 9 devices.
2. It happens when the app is launched or resumed from background.

Thanks,

Answers

  • PrabakaranRamasamyPrabakaranRamasamy USMember ✭✭✭

    Additional logs:

    Xamarin Exception Stack:
    Java.Lang.IllegalArgumentException: Exception of type 'Java.Lang.IllegalArgumentException' was thrown.
    at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x0008e] in :0
    at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0005d] in :0
    at Android.App.Activity.OnResume () [0x0000a] in :0
    at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.OnResume () [0x0000f] in <9e919e3d32554840a213a0a951bd96a0>:0
    at mydomain.myapp.Application.Droid.MainActivity.OnResume () [0x00000] in <29ba84487fe34fd68de38b51a01b567d>:0
    at Android.App.Activity.n_OnResume (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in :0
    at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.21(intptr,intptr)
    at java.lang.IllegalArgumentException
    at android.os.Parcel.createException(Parcel.java:1970)
    at android.os.Parcel.readException(Parcel.java:1934)
    at android.os.Parcel.readException(Parcel.java:1884)
    at android.app.IActivityManager$Stub$Proxy.isTopOfTask(IActivityManager.java:7846)
    at android.app.Activity.isTopOfTask(Activity.java:6544)
    at android.app.Activity.onResume(Activity.java:1404)
    at androidx.fragment.app.FragmentActivity.ǔǖ(Unknown Source:1112)
    at androidx.fragment.app.FragmentActivity.onResume(Unknown Source:6)'

  • YelinzhYelinzh Member, Xamarin Team Xamurai

    Java.Lang.IllegalArgumentException: Exception of type 'Java.Lang.IllegalArgumentException' was thrown.

    An IllegalArgumentException is thrown in order to indicate that a method has been passed an illegal argument. According to the log info, the issue occurs in the OnResume method. Did you call the code in this method? Try using the try-catch block to wrap the code to get the details about the exception.


    Xamarin forums are migrating to a new home on Microsoft Q&A!
    We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A!
    For more information, please refer to this sticky post.

  • PrabakaranRamasamyPrabakaranRamasamy USMember ✭✭✭

    Thanks for your update. It is crashed at Android.App.Activity.OnResume() and not in my derived class code. Moreover, I don't have any code in OnResume method other than just calling the base.OnResume().

  • YelinzhYelinzh Member, Xamarin Team Xamurai

    I have tried many ways to reproduce it, but I can't reproduce it ... It happens only on the Android 9 devices

    Will this issue only occur on the Android 9? And will it occur on all the Android devices or a specific device? Please test to check that.


    Xamarin forums are migrating to a new home on Microsoft Q&A!
    We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A!
    For more information, please refer to this sticky post.

Sign In or Register to comment.