apptentive / apptentive-android

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

NPE at ViewActivity onCreate #77

Closed davidpribil closed 10 years ago

davidpribil commented 10 years ago

Hello,

I'm using the Apptentive android sdk. Current checkout is: origin/compress_images (28th Febr.) In the last commit I added the Apptentive rating dialog to my Main activity

onResume() {
...
Apptentive.showRatingFlowIfConditionsAreMet(this);
...
}

I'm also using the message centre (it was added long ago and there were no exceptions before)

And I got the following error stacktrace from a user:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lagom.runtroll/com.apptentive.android.sdk.ViewActivity}: java.lang.NullPointerException: enumType == null || name == null
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1661)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1677)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3701)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException: enumType == null || name == null
at java.lang.Enum.valueOf(Enum.java:166)
at com.apptentive.android.sdk.module.ActivityContent$Type.valueOf(ActivityContent.java:1)
at com.apptentive.android.sdk.module.ActivityContent$Type.parse(ActivityContent.java:34)
at com.apptentive.android.sdk.ViewActivity.onCreate(ViewActivity.java:38)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1073)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1625)
... 11 more

The user is on Android 2.3.4 (no device details)

skykelsey commented 10 years ago

Fixed in 1.4.2. Thanks for reporting this.