apptentive / apptentive-android

Apptentive Android SDK
http://www.apptentive.com
BSD 3-Clause "New" or "Revised" License
65 stars 64 forks source link

ApptentiveViewActivity NullPointerException #143

Closed karabaralex closed 6 years ago

karabaralex commented 6 years ago

We have a lot of NPE crashes for Apptentive 4.1.0 QA cannot reproduce this, so we don't have any repro steps.

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.smartsheet.android/com.apptentive.android.sdk.ApptentiveViewActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'com.apptentive.android.sdk.conversation.Conversation com.apptentive.android.sdk.ApptentiveInternal.getConversation()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2981) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3042) at android.app.ActivityThread.-wrap14(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1639) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6776) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410) Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'com.apptentive.android.sdk.conversation.Conversation com.apptentive.android.sdk.ApptentiveInternal.getConversation()' on a null object reference at com.apptentive.android.sdk.ApptentiveViewActivity.onCreate(ApptentiveViewActivity.java:67) at android.app.Activity.performCreate(Activity.java:6955) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2924) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3042) at android.app.ActivityThread.-wrap14(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1639) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6776) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

skykelsey commented 6 years ago

@karabaralex Thanks for reporting. We are looking into the issue.

weeeBox commented 6 years ago

Hey @karabaralex,

Sorry for the issue. How do you initialize the SDK? Do you use any wrappers (like Cordova or mParticle)?

karabaralex commented 6 years ago

Thanks for looking into that,

@weeeBox we don't use any wrappers To init we call Apptentive.register on the main thread

weeeBox commented 6 years ago

Fixed in v5.0.4