iterable-android-sdk icon indicating copy to clipboard operation
iterable-android-sdk copied to clipboard

IterableInAppMessage createdAt is null despite it is tagged as NonNull

Open allo86A opened this issue 4 years ago • 0 comments
trafficstars

We recently released an update to our app with some code to validate that an in-app message has been created after a cutoff date, before showing it to the user. That field, createdAt, is annotated as NonNull in IterableInAppMessage class, but we noticed that some of our users are getting a crash because that field is null.

The validation we have is simple: message.createdAt.after(calendar.time) where calendar.time is our cutoff date, and the error trace we see for some of our users is: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.util.Date.after(java.util.Date)' on a null object reference

Is it expected to have a null createdAt?

allo86A avatar Nov 05 '21 16:11 allo86A