java.lang.RuntimeException: Unable to resume activity {com.instasquares/com.instasquares.MainActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=12345, result=0, data=null} to activity {com.instasquares/com.instasquares.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.error(java.lang.String)' on a null object reference

GitHub | rodrigograca31 | 3 months ago
  1. 0

    Plugin Crash

    GitHub | 3 months ago | rodrigograca31
    java.lang.RuntimeException: Unable to resume activity {com.instasquares/com.instasquares.MainActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=12345, result=0, data=null} to activity {com.instasquares/com.instasquares.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.error(java.lang.String)' on a null object reference
  2. 0

    GitHub comment 72#249544029

    GitHub | 2 months ago | rodrigograca31
    java.lang.RuntimeException: Unable to resume activity {com.instasquares/com.instasquares.MainActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=12345, result=0, data=null} to activity {com.instasquares/com.instasquares.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.error(java.lang.String)' on a null object reference
  3. 0

    I develop with a framework using cordova for an hybrid application. I only produce the Android version for testing the application. I'm using *cordova-plugin-camera 2.2.0* to take a picture in my application. I use getPicture method to do that. I always encounter this bug by following these steps : * Take a photo * Tap the "Retry" button * Take another photo * Then validate the photo by tapping the "Ok" button OR by cancelling with the back button * ==> App stopped I try to debug with Android Studio but even with breakpoints I don't succeed. Bellow, the stack from the Java Error when validating the photo: {code} E/AndroidRuntime: FATAL EXCEPTION: main Process: my.application.appXXX.bip.mobileClient, PID: 16960 java.lang.RuntimeException: Unable to resume activity {my.application.appXXX.bip.mobileClient/my.application.appXXX.bip.mobileClient.MainActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=34, result=-1, data=null} to activity {my.application.appXXX.bip.mobileClient/my.application.appXXX.bip.mobileClient.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.toString()' on a null object reference at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3349) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3380) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2731) at android.app.ActivityThread.access$900(ActivityThread.java:172) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5835) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183) Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=34, result=-1, data=null} to activity {my.application.appXXX.bip.mobileClient/my.application.appXXX.bip.mobileClient.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.toString()' on a null object reference at android.app.ActivityThread.deliverResults(ActivityThread.java:3977) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3335) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3380)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2731)  at android.app.ActivityThread.access$900(ActivityThread.java:172)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:145)  at android.app.ActivityThread.main(ActivityThread.java:5835)  at java.lang.reflect.Method.invoke(Native Method)  at java.lang.reflect.Method.invoke(Method.java:372)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.toString()' on a null object reference at org.apache.cordova.camera.CameraLauncher.processResultFromCamera(CameraLauncher.java:452) at org.apache.cordova.camera.CameraLauncher.onActivityResult(CameraLauncher.java:787) at org.apache.cordova.CordovaInterfaceImpl.onActivityResult(CordovaInterfaceImpl.java:120) at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:353) at android.app.Activity.dispatchActivityResult(Activity.java:6475) at android.app.ActivityThread.deliverResults(ActivityThread.java:3973) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3335)  at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3380)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2731)  at android.app.ActivityThread.access$900(ActivityThread.java:172)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:145)  at android.app.ActivityThread.main(ActivityThread.java:5835)  at java.lang.reflect.Method.invoke(Native Method)  at java.lang.reflect.Method.invoke(Method.java:372)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)  {code} Bellow, the stack from the Java Error when cancelling the application: {code} E/AndroidRuntime: FATAL EXCEPTION: main Process: my.application.appXXX.bip.mobileClient, PID: 22777 java.lang.RuntimeException: Unable to resume activity {my.application.appXXX.bip.mobileClient/my.application.appXXX.bip.mobileClient.MainActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=34, result=0, data=null} to activity {my.application.appXXX.bip.mobileClient/my.application.appXXX.bip.mobileClient.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.error(java.lang.String)' on a null object reference at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3349) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3380) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2731) at android.app.ActivityThread.access$900(ActivityThread.java:172) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5835) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183) Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=34, result=0, data=null} to activity {my.application.appXXX.bip.mobileClient/my.application.appXXX.bip.mobileClient.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.error(java.lang.String)' on a null object reference at android.app.ActivityThread.deliverResults(ActivityThread.java:3977) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3335) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3380)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2731)  at android.app.ActivityThread.access$900(ActivityThread.java:172)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:145)  at android.app.ActivityThread.main(ActivityThread.java:5835)  at java.lang.reflect.Method.invoke(Native Method)  at java.lang.reflect.Method.invoke(Method.java:372)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.error(java.lang.String)' on a null object reference at org.apache.cordova.camera.CameraLauncher.failPicture(CameraLauncher.java:1190) at org.apache.cordova.camera.CameraLauncher.onActivityResult(CameraLauncher.java:797) at org.apache.cordova.CordovaInterfaceImpl.onActivityResult(CordovaInterfaceImpl.java:120) at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:353) at android.app.Activity.dispatchActivityResult(Activity.java:6475) at android.app.ActivityThread.deliverResults(ActivityThread.java:3973) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3335)  at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3380)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2731)  at android.app.ActivityThread.access$900(ActivityThread.java:172)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:145)  at android.app.ActivityThread.main(ActivityThread.java:5835)  at java.lang.reflect.Method.invoke(Native Method)  at java.lang.reflect.Method.invoke(Method.java:372)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)  {code}

    Apache's JIRA Issue Tracker | 6 months ago | Victor Ros
    java.lang.RuntimeException: Unable to resume activity {my.application.appXXX.bip.mobileClient/my.application.appXXX.bip.mobileClient.MainActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=34, result=0, data=null} to activity {my.application.appXXX.bip.mobileClient/my.application.appXXX.bip.mobileClient.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.error(java.lang.String)' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    App crash when clicking back on App Invite dialog

    GitHub | 1 year ago | lucienartwhere
    java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=64213, result=-1, data=Intent { (has extras) }} to activity {be.xxxxxxxxxx.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.error(org.json.JSONObject)' on a null object reference
  6. 0

    appInvite crash on Android (only when triggered back-button or hit X)

    GitHub | 1 year ago | Hirbod
    java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=64213, result=-1, data=Intent { (has extras) }} to activity {net.nachbarschaft/net.nachbarschaft.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.error(org.json.JSONObject)' on a null object reference

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.error(java.lang.String)' on a null object reference

      at com.vladstirbu.cordova.CDVInstagramPlugin.onActivityResult()
    2. com.vladstirbu.cordova
      CDVInstagramPlugin.onActivityResult
      1. com.vladstirbu.cordova.CDVInstagramPlugin.onActivityResult(CDVInstagramPlugin.java:135)
      1 frame
    3. org.apache.cordova
      CordovaActivity.onActivityResult
      1. org.apache.cordova.CordovaInterfaceImpl.onActivityResult(CordovaInterfaceImpl.java:151)
      2. org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:348)
      2 frames
    4. Android Platform
      ActivityThread.main
      1. android.app.Activity.dispatchActivityResult(Activity.java:6226)
      2. android.app.ActivityThread.deliverResults(ActivityThread.java:3642)
      3. android.app.ActivityThread.performResumeActivity(ActivityThread.java:3012)
      4. android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3061)
      5. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2415)
      6. android.app.ActivityThread.access$800(ActivityThread.java:151)
      7. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1313)
      8. android.os.Handler.dispatchMessage(Handler.java:102)
      9. android.os.Looper.loop(Looper.java:135)
      10. android.app.ActivityThread.main(ActivityThread.java:5345)
      10 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:947)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:742)
      2 frames