Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeException: Unable to resume activity #778

Closed
yberstad opened this issue Oct 9, 2022 · 2 comments
Closed

RuntimeException: Unable to resume activity #778

yberstad opened this issue Oct 9, 2022 · 2 comments

Comments

@yberstad
Copy link

yberstad commented Oct 9, 2022

RuntimeException after upgrading from RN 0.66.3 to RN 0.69

We get this exception for some of our customers, after upgrading from RN 0.66.3 to RN 0.69, and from react-native-app-auth 6.4.0 to 6.4.3.

java.lang.RuntimeException: Unable to resume activity {com.xxxx/com.xxxx.MainActivity}: java.lang.RuntimeException: 
Failure delivering result ResultInfo{who=null, request=52, result=-1, data=Intent { dat=xxxx://signin-oidc?code=AAAF2D7B161D71F058EC2A3AEAA85D2911D2A41192F1697E5826418E1352462F-1&scope=openid appdevice applogin&state=DHmrd7olZbgy6GffaFPCKg&session_state=IkG7D0Bxqf4K-CJefCGRK4Cjcnq_MBVhZ7gpUpv-nXA.B984D9D6AE50D56E29EED8B1A9C5FE2D&iss=https://identity.xxxx.de (has extras) }} to activity {com.xxxx/com.xxxx.MainActivity}: 
java.lang.NullPointerException: 
Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5312)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5351)
        at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:54)
        at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:226)
        at android.os.Looper.loop(Looper.java:313)
        at android.app.ActivityThread.main(ActivityThread.java:8751)
        at java.lang.reflect.Method.invoke(Method.java:-2)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=52, result=-1,
 data=Intent { dat=xxxx://signin-oidc?code=AAAF2D7B161D71F058EC2A3AEAA85D2911D2A41192F1697E5826418E1352462F-1&scope=openid appdevice applogin&state=DHmrd7olZbgy6GffaFPCKg&session_state=IkG7D0Bxqf4K-CJefCGRK4Cjcnq_MBVhZ7gpUpv-nXA.B984D9D6AE50D56E29EED8B1A9C5FE2D&iss=https://identity.xxxx.de (has extras) }} 
to activity {com.xxxx/com.xxxx.MainActivity}: java.lang.NullPointerException: 
Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
        at android.app.ActivityThread.deliverResults(ActivityThread.java:5946)
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5279)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5351)
        at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:54)
        at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:226)
        at android.os.Looper.loop(Looper.java:313)
        at android.app.ActivityThread.main(ActivityThread.java:8751)
        at java.lang.reflect.Method.invoke(Method.java:-2)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

Caused by: java.lang.NullPointerException: 
Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
        at com.rnappauth.RNAppAuthModule.onActivityResult(RNAppAuthModule.java:492)
        at com.facebook.react.bridge.ReactContext.onActivityResult(ReactContext.java:339)
        at com.facebook.react.ReactInstanceManager.onActivityResult(ReactInstanceManager.java:824)
        at com.facebook.react.ReactDelegate.onActivityResult(ReactDelegate.java:90)
        at com.facebook.react.ReactActivityDelegate.onActivityResult(ReactActivityDelegate.java:133)
        at com.facebook.react.ReactActivity.onActivityResult(ReactActivity.java:70)
        at android.app.Activity.dispatchActivityResult(Activity.java:8659)
        at android.app.ActivityThread.deliverResults(ActivityThread.java:5939)
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5279)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5351)
        at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:54)
        at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:226)
        at android.os.Looper.loop(Looper.java:313)
        at android.app.ActivityThread.main(ActivityThread.java:8751)
        at java.lang.reflect.Method.invoke(Method.java:-2)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

These are the events happening before the crash:
Screenshot 2022-10-09 at 20 01 51

We have this in my MainActivity, as stated here:
https://github.com/software-mansion/react-native-screens#android

@Override
protected void onCreate(Bundle savedInstanceState) {
    // as suggested at https://github.com/software-mansion/react-native-screens#android
    super.onCreate(null);
    .....
}

I'm not sure if it this has anything to do with the issue, but it mentions "Activity restarts"...

I'm unable to reproduce the error on any of my devices.

Does anyone have a similar issue?


Environment

RN 0.69
react-native-app-auth 6.4.3

  • Identity Provider: IdentityServer 6
  • Platform: Android
  • Are you using Expo? No
@justin-tay
Copy link

I think this relates to #743

@carbonrobot
Copy link
Contributor

Details captured in #773

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants