TypeError: Cannot read property 'wzrk_dl' of undefined
Encountered this issue in production.
Error Stack trace -
Fatal Exception: com.facebook.react.common.JavascriptException: TypeError: Cannot read property 'wzrk_dl' of undefined, js engine: hermes, stack:
anonymous@1:588099
value@1:100919
value@1:93982
anonymous@1:92620
value@1:93577
value@1:92578
at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java:83)
at java.lang.reflect.Method.invoke(Method.java)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:151)
at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
at android.os.Looper.loop(Looper.java:264)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
at java.lang.Thread.run(Thread.java:923)
Device -
Android Version - 11 Device - Oppo F11
@neel132 Can you share full stack trace, we can't find origin of error in clevertap file.
@piyush-kukadiya this is happening only on production. This stack trace i got from firebase crashlytics.
@piyush-kukadiya any update on this ?
@neel132 Are you using CLEVERTAP_PUSH_NOTIFICATION_CLICKED callback in js?
@piyush-kukadiya Implementation -
CleverTap.addListener(CleverTap.CleverTapPushNotificationClicked, (e) => {
console.log(e.customExtras.wzrk_dl);
})
@neel132 Why are you using customExtras.wzrk_dl ? Where did you find it? Please check payload in console and use accordingly.
@piyush-kukadiya I found this key by logging an event once notification is clicked , also i was able to access deep link using this key.
@neel132 customExtras comes in case of iOS. For android we don't have customExtras, you can try e.wzrk_dl for Android. We will fix this in upcoming release.
@neel132 Why are you using customExtras.wzrk_dl ? Where did you find it? Please check payload in console and use accordingly.
Hi. I am facing the same issue. I am not sure this is an acceptable reply. You use typescript, so the Event should be correctly typed, we should not need to use console.log() for this. That example is what you have in the official documentation, here https://developer.clevertap.com/docs/react-native-push-notification#handle-push-notification-callback
If this is not correct, please update the documentation so that it reflects the reality.
Thanks