locked
Android app crashes with android.os.RemoteException RRS feed

  • Question

  • User48866 posted

    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,

    Tuesday, January 12, 2021 12:34 PM

All replies

  • User48866 posted

    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.nOnResume (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.uu(Unknown Source:1112) at androidx.fragment.app.FragmentActivity.onResume(Unknown Source:6)'

    Wednesday, January 13, 2021 4:28 AM
  • User382871 posted

    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.

    Wednesday, January 13, 2021 5:59 AM
  • User48866 posted

    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().

    Wednesday, January 13, 2021 7:08 AM
  • User382871 posted

    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.

    Thursday, January 14, 2021 7:52 AM
  • User48866 posted

    Hi @Yelinzh As I stated before in my question, I am not able to reproduce it from my local development environment. It happens on my user's phone and is captured via the crash report of the app centre. Here is the answer to your question.

    Will this issue only occur on the Android 9? Yes. And will it occur on all the Android devices or a specific device? It occurs on the Samsung devices such as Galaxy S10+, Galaxy J3 (2017), Galaxy J3 V, Galaxy A10, SM-J260A, SM-J337A.

    Please let me know if you have any question.

    Monday, February 8, 2021 3:48 PM