CleverTap/clevertap-flutter

Null object reference when previewing Native Display

Closed this issue · 0 comments

rwrz commented

When I try to preview a Native Display campaign on Flutter, I have this "null object reference" error:

It seems an easy fix... Can you guys have a look please?
btw, it works without the preview, but setting up a campaign to preview the message is incredible annoying and time-consuming.

V/CleverTap(28923): PostAsyncSafely Task: InappController#prepareNotificationForDisplay failed to execute on...pool-28-thread-1
V/CleverTap(28923): java.lang.NullPointerException: Attempt to invoke virtual method 'int com.clevertap.android.sdk.inapp.CTInAppType.ordinal()' on a null object reference
V/CleverTap(28923): 	at com.clevertap.android.sdk.inapp.CTInAppNotification.configureWithJson(CTInAppNotification.java:535)
V/CleverTap(28923): 	at com.clevertap.android.sdk.inapp.CTInAppNotification.initWithJSON(CTInAppNotification.java:393)
V/CleverTap(28923): 	at com.clevertap.android.sdk.inapp.InAppController$NotificationPrepareRunnable.run(InAppController.java:87)
V/CleverTap(28923): 	at com.clevertap.android.sdk.inapp.InAppController$5.call(InAppController.java:597)
V/CleverTap(28923): 	at com.clevertap.android.sdk.inapp.InAppController$5.call(InAppController.java:594)
V/CleverTap(28923): 	at com.clevertap.android.sdk.task.Task$1.run(Task.java:234)
V/CleverTap(28923): 	at com.clevertap.android.sdk.task.PostAsyncSafelyExecutor.execute(PostAsyncSafelyExecutor.java:39)
V/CleverTap(28923): 	at com.clevertap.android.sdk.task.Task.execute(Task.java:107)
V/CleverTap(28923): 	at com.clevertap.android.sdk.inapp.InAppController.prepareNotificationForDisplay(InAppController.java:594)
V/CleverTap(28923): 	at com.clevertap.android.sdk.inapp.InAppController._showNotificationIfAvailable(InAppController.java:505)
V/CleverTap(28923): 	at com.clevertap.android.sdk.inapp.InAppController.access$400(InAppController.java:67)
V/CleverTap(28923): 	at com.clevertap.android.sdk.inapp.InAppController$3.call(InAppController.java:471)
V/CleverTap(28923): 	at com.clevertap.android.sdk.inapp.InAppController$3.call(InAppController.java:468)
V/CleverTap(28923): 	at com.clevertap.android.sdk.task.Task$1.run(Task.java:234)
V/CleverTap(28923): 	at com.clevertap.android.sdk.task.PostAsyncSafelyExecutor.execute(PostAsyncSafelyExecutor.java:39)
V/CleverTap(28923): 	at com.clevertap.android.sdk.task.Task.execute(Task.java:107)
V/CleverTap(28923): 	at com.clevertap.android.sdk.inapp.InAppController.showNotificationIfAvailable(InAppController.java:468)
V/CleverTap(28923): 	at com.clevertap.android.sdk.inapp.InAppController.addInAppNotificationsToQueue(InAppController.java:457)
V/CleverTap(28923): 	at com.clevertap.android.sdk.response.InAppResponse$1.call(InAppResponse.java:182)
V/CleverTap(28923): 	at com.clevertap.android.sdk.response.InAppResponse$1.call(InAppResponse.java:179)
V/CleverTap(28923): 	at com.clevertap.android.sdk.task.Task$1.run(Task.java:234)
V/CleverTap(28923): 	at com.clevertap.android.sdk.task.PostAsyncSafelyExecutor$1.run(PostAsyncSafelyExecutor.java:45)
V/CleverTap(28923): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
V/CleverTap(28923): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
V/CleverTap(28923): 	at java.lang.Thread.run(Thread.java:1012)