Skip to content

Unable to test in-app notification in the app. #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ganeshrvel opened this issue Feb 12, 2021 · 11 comments
Closed

Unable to test in-app notification in the app. #33

ganeshrvel opened this issue Feb 12, 2021 · 11 comments
Labels
under deployment Will be released in the next release

Comments

@ganeshrvel
Copy link

We have been trying to trigger an in-app notification in the app, it works on the live production version but in the staging the notification isn't appearing.
How do we trigger and debug the in-app notification in the app?

@darshanclevertap
Copy link
Contributor

@ganeshrvel Is your staging version of the app connected to the same CleverTap Account or a different one?

@ganeshrvel
Copy link
Author

@darshanclevertap the same

@darshanclevertap
Copy link
Contributor

@ganeshrvel Are you raising the same event for the InApp? Can you share the campaign links for both production and staging campaigns?

@ganeshrvel
Copy link
Author

@darshanclevertap do share your official email id to share the campaign urls.

Thanks

@ganeshrvel
Copy link
Author

@ganeshrvel Are you raising the same event for the InApp? Can you share the campaign links for both production and staging campaigns?

https://in1.dashboard.clevertap.com/8WW-K46-795Z/notification/inapp/action.html?id=1616087346#overview

@darshanclevertap
Copy link
Contributor

@ganeshrvel Sorry for the delay. Can you share the logs for the staging app? As in, what shows up in the Android Studio console logs when you try and send the InApp to the staging app?

@ganeshrvel
Copy link
Author

Nothing while trying to fire the test "in app" notifications on staging. There is no console values at all, that's exactly what made me log this issue here.

@darshanclevertap
Copy link
Contributor

You can use CleverTap.setDebugLevel(3) either in the first line of main.dart or in the Application class of Android.
You'll able to see the console logs then

@ganeshrvel
Copy link
Author

I am getting the data now. attaching the log below.

But unfortunately I am unable to use the setCleverTapInAppNotificationButtonClickedHandler method to handle the "in-app" notification button tap event.

Code:

cleverTapPlugin.setCleverTapInAppNotificationButtonClickedHandler(
      _notificationReceived,);


void _notificationReceived(Map<String, dynamic> data) {
   print(data);
}

Any reason why we arent able to use setCleverTapInAppNotificationButtonClickedHandler ?

Log:

V/ActivityThread(16756): scheduleReceiver info = ActivityInfo{b5d7272 com.google.firebase.iid.FirebaseInstanceIdReceiver} intent = Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x1080010 pkg=io.xxxxx.app cmp=io.xxxxxx.app/com.google.firebase.iid.FirebaseInstanceIdReceiver (has extras) } sync = true hasCode = 36066046
D/ColorExSystemServiceHelper(16756): checkColorExSystemService className = com.google.android.gms.gcm.PushMessagingRegistrarProxy
D/CleverTap:APP-KEY-ABC(16756): Handling notification: Bundle[{wzrk_acct_id=APP-KEY-ABC, nm=Touch this notification to open your app and view your in-app notification, nt=CleverTap, wzrk_inapp={ "type" : "half-interstitial" , "bg" : "#ffffff" , "tablet" : false , "close" : true , "message" : { "text" : "Message" , "color" : "#434761" , "replacements" : ""} , "title" : { "text" : "Join rappers adda" , "color" : "#434761" , "replacements" : "Join rappers adda" , "df" : { } , "defaultValuesSet" : { "value" : true , "strict" : true}} , "buttons" : [ { "text" : "Join Now" , "color" : "#000000" , "bg" : "#1EB858" , "border" : "#1EB858" , "radius" : "4" , "actions" : { "close" : true , "type" : "kv" , "android" : "" , "ios" : "" , "kv" : { "click_action" : "FLUTTER_NOTIFICATION_CLICK" , "view" : "challenge_screen" , "runtimeType" : "challenge_screen" , "challengeId" : "707"}}}] , "media" : { } , "isMediaSourceRecommended" : false , "recommendedText" : { } , "mediaLandscape" : { } , "isMediaSourceRecommendedLandscape" : false , "recommendedTextLandscape" : { "text" : "" , "replacements" : "" , "og" : ""} , "hasPortrait" : true , "hasLandscape" : true}, wzrk_pivot=wzrk_default, wzrk_cid=channel_miscellaneous, wzrk_rnv=true, wzrk_ttl=1616587499, wzrk_push_amp=false, wzrk_dt=FIREBASE, wzrk_id=0_0, wzrk_pn=true}]
D/CleverTap:APP-KEY-ABC(16756): Setting random notificationId: 36
D/CleverTap:APP-KEY-ABC(16756): Rendered notification: Notification(channel=channel_miscellaneous pri=0 contentView=null vibrate=null sound=null defaults=0x0 flags=0x10 color=0x00000000 vis=PRIVATE)
V/CleverTap(16756): Storing Push Notification...null - with ttl - 1616587499
D/CleverTap(16756): Recording Notification Viewed event for notification:  Bundle[{wzrk_acct_id=APP-KEY-ABC, nm=Touch this notification to open your app and view your in-app notification, nt=CleverTap, wzrk_inapp={ "type" : "half-interstitial" , "bg" : "#ffffff" , "tablet" : false , "close" : true , "message" : { "text" : "Message" , "color" : "#434761" , "replacements" : ""} , "title" : { "text" : "Join rappers adda" , "color" : "#434761" , "replacements" : "Join rappers adda" , "df" : { } , "defaultValuesSet" : { "value" : true , "strict" : true}} , "buttons" : [ { "text" : "Join Now" , "color" : "#000000" , "bg" : "#1EB858" , "border" : "#1EB858" , "radius" : "4" , "actions" : { "close" : true , "type" : "kv" , "android" : "" , "ios" : "" , "kv" : { "click_action" : "FLUTTER_NOTIFICATION_CLICK" , "view" : "challenge_screen" , "runtimeType" : "challenge_screen" , "challengeId" : "707"}}}] , "media" : { } , "isMediaSourceRecommended" : false , "recommendedText" : { } , "mediaLandscape" : { } , "isMediaSourceRecommendedLandscape" : false , "recommendedTextLandscape" : { "text" : "" , "replacements" : "" , "og" : ""} , "hasPortrait" : true , "hasLandscape" : true}, wzrk_pivot=wzrk_default, wzrk_cid=channel_miscellaneous, wzrk_rnv=true, wzrk_ttl=1616587499, wzrk_push_amp=false, wzrk_dt=FIREBASE, wzrk_id=0_0, wzrk_pn=true}]
V/CleverTap:APP-KEY-ABC(16756): Pushing Notification Viewed event onto separate queue
V/CleverTap:APP-KEY-ABC(16756): Pushing Notification Viewed event onto DB
D/CleverTap:APP-KEY-ABC(16756): Queued event: {"evtName":"Notification Viewed","evtData":{"wzrk_acct_id":"APP-KEY-ABC","wzrk_inapp":"{ \"type\" : \"half-interstitial\" , \"bg\" : \"#ffffff\" , \"tablet\" : false , \"close\" : true , \"message\" : { \"text\" : \"Message\" , \"color\" : \"#434761\" , \"replacements\" : \"\"} , \"title\" : { \"text\" : \"Join rappers adda\" , \"color\" : \"#434761\" , \"replacements\" : \"Join rappers adda\" , \"df\" : { } , \"defaultValuesSet\" : { \"value\" : true , \"strict\" : true}} , \"buttons\" : [ { \"text\" : \"Join Now\" , \"color\" : \"#000000\" , \"bg\" : \"#1EB858\" , \"border\" : \"#1EB858\" , \"radius\" : \"4\" , \"actions\" : { \"close\" : true , \"type\" : \"kv\" , \"android\" : \"\" , \"ios\" : \"\" , \"kv\" : { \"click_action\" : \"FLUTTER_NOTIFICATION_CLICK\" , \"view\" : \"challenge_screen\" , \"runtimeType\" : \"challenge_screen\" , \"challengeId\" : \"707\"}}}] , \"media\" : { } , \"isMediaSourceRecommended\" : false , \"recommendedText\" : { } , \"mediaLandscape\" : { } , \"isMediaSourceRecommendedLandscape\" : false , \"recommendedTextLandscape\" : { \"text\" : \"\" , \"replacements\" : \"\" , \"og\" : \"\"} , \"hasPortrait\" : true , \"hasLandscape\" : true}","wzrk_pivot":"wzrk_default","wzrk_cid":"channel_miscellaneous","wzrk_rnv":"true","wzrk_ttl":"1616587499","wzrk_push_amp":"false","wzrk_dt":"FIREBASE","wzrk_id":"0_0","wzrk_pn":"true"},"s":1616500041,"type":"event","ep":1616501101}
V/CleverTap:APP-KEY-ABC(16756): Queued event to DB table PUSH_NOTIFICATION_VIEWED: {"evtName":"Notification Viewed","evtData":{"wzrk_acct_id":"APP-KEY-ABC","wzrk_inapp":"{ \"type\" : \"half-interstitial\" , \"bg\" : \"#ffffff\" , \"tablet\" : false , \"close\" : true , \"message\" : { \"text\" : \"Message\" , \"color\" : \"#434761\" , \"replacements\" : \"\"} , \"title\" : { \"text\" : \"Join rappers adda\" , \"color\" : \"#434761\" , \"replacements\" : \"Join rappers adda\" , \"df\" : { } , \"defaultValuesSet\" : { \"value\" : true , \"strict\" : true}} , \"buttons\" : [ { \"text\" : \"Join Now\" , \"color\" : \"#000000\" , \"bg\" : \"#1EB858\" , \"border\" : \"#1EB858\" , \"radius\" : \"4\" , \"actions\" : { \"close\" : true , \"type\" : \"kv\" , \"android\" : \"\" , \"ios\" : \"\" , \"kv\" : { \"click_action\" : \"FLUTTER_NOTIFICATION_CLICK\" , \"view\" : \"challenge_screen\" , \"runtimeType\" : \"challenge_screen\" , \"challengeId\" : \"707\"}}}] , \"media\" : { } , \"isMediaSourceRecommended\" : false , \"recommendedText\" : { } , \"mediaLandscape\" : { } , \"isMediaSourceRecommendedLandscape\" : false , \"recommendedTextLandscape\" : { \"text\" : \"\" , \"replacements\" : \"\" , \"og\" : \"\"} , \"hasPortrait\" : true , \"hasLandscape\" : true}","wzrk_pivot":"wzrk_default","wzrk_cid":"channel_miscellaneous","wzrk_rnv":"true","wzrk_ttl":"1616587499","wzrk_push_amp":"false","wzrk_dt":"FIREBASE","wzrk_id":"0_0","wzrk_pn":"true"},"s":1616500041,"type":"event","ep":1616501101}
V/CleverTap:APP-KEY-ABC(16756): Pushing Notification Viewed event onto queue flush
V/CleverTap:APP-KEY-ABC(16756): Pushing Notification Viewed event onto queue flush async
V/CleverTap:APP-KEY-ABC(16756): Pushing Notification Viewed event onto queue flush sync
V/CleverTap:APP-KEY-ABC(16756): Pushing Notification Viewed event onto queue DB flush
V/CleverTap:APP-KEY-ABC(16756): Somebody has invoked me to send the queue to CleverTap servers
V/CleverTap:APP-KEY-ABC(16756): Returning Queued Notification Viewed events
V/CleverTap:APP-KEY-ABC(16756): New ARP Key = ARP:APP-KEY-ABC:__ba3d1735de084622871207c706956cc4
V/CleverTap:APP-KEY-ABC(16756): Fetched ARP for namespace key: ARP:APP-KEY-ABC:__ba3d1735de084622871207c706956cc4 values: {sv=30802, dh=747468994, wdt=2, d_ts=1616499795, hgt=5, av=1.7.1, v=1, e_ts=0, j_n=Zw==, i_n=ZWpgfgUFBQ==, r_ts=1616501058, id=APP-KEY-ABC, j_s={ }}
V/CleverTap(16756): Attaching InAppFC to Header
D/CleverTap:APP-KEY-ABC(16756): Send queue contains 1 items: [{"g":"__ba3d1735de084622871207c706956cc4","type":"meta","af":{"Build":"51","Version":"1.7.1","OS Version":"10","SDK Version":30802,"Make":"realme","Model":"RMX1921","Carrier":"Jio 4G","useIP":false,"OS":"Android","wdt":2.72,"hgt":5.64,"dpi":480,"lib":"Flutter","cc":"in"},"id":"APP-KEY-ABC","tk":"643-00b","l_ts":1616501057,"f_ts":1615875283,"ddnd":false,"rtl":[],"rct":0,"ait":0,"frs":false,"arp":{"sv":30802,"dh":747468994,"wdt":2,"d_ts":1616499795,"hgt":5,"av":"1.7.1","v":1,"e_ts":0,"j_n":"Zw==","i_n":"ZWpgfgUFBQ==","r_ts":1616501058,"id":"APP-KEY-ABC","j_s":"{ }"},"wzrk_ref":{"wzrk_c2a":"ClickHereTest","wzrk_id":""},"imp":0,"tlc":[]}, {"evtName":"Notification Viewed","evtData":{"wzrk_acct_id":"APP-KEY-ABC","wzrk_inapp":"{ \"type\" : \"half-interstitial\" , \"bg\" : \"#ffffff\" , \"tablet\" : false , \"close\" : true , \"message\" : { \"text\" : \"Message\" , \"color\" : \"#434761\" , \"replacements\" : \"\"} , \"title\" : { \"text\" : \"Join rappers adda\" , \"color\" : \"#434761\" , \"replacements\" : \"Join rappers adda\" , \"df\" : { } , \"defaultValuesSet\" : { \"value\" : true , \"strict\" : true}} , \"buttons\" : [ { \"text\" : \"Join Now\" , \"color\" : \"#000000\" , \"bg\" : \"#1EB858\" , \"border\" : \"#1EB858\" , \"radius\" : \"4\" , \"actions\" : { \"close\" : true , \"type\" : \"kv\" , \"android\" : \"\" , \"ios\" : \"\" , \"kv\" : { \"click_action\" : \"FLUTTER_NOTIFICATION_CLICK\" , \"view\" : \"challenge_screen\" , \"runtimeType\" : \"challenge_screen\" , \"challengeId\" : \"707\"}}}] , \"media\" : { } , \"isMediaSourceRecommended\" : false , \"recommendedText\" : { } , \"mediaLandscape\" : { } , \"isMediaSourceRecommendedLandscape\" : false , \"recommendedTextLandscape\" : { \"text\" : \"\" , \"replacements\" : \"\" , \"og\" : \"\"} , \"hasPortrait\" : true , \"hasLandscape\" : true}","wzrk_pivot":"wzrk_default","wzrk_cid":"channel_miscellaneous","wzrk_rnv":"true","wzrk_ttl":"1616587499","wzrk_push_amp":"false","wzrk_dt":"FIREBASE","wzrk_id":"0_0","wzrk_pn":"true"},"s":1616500041,"type":"event","ep":1616501101}]
D/CleverTap:APP-KEY-ABC(16756): Sending queue to: https://in1-spiky.wzrkt.com/a1?os=Android&t=30802&z=APP-KEY-ABC&ts=1616501101
V/CleverTap(16756): Getting domain from header - null
V/CleverTap:APP-KEY-ABC(16756): Trying to process response: { }
V/CleverTap:APP-KEY-ABC(16756): InApp: Processing response
V/CleverTap:APP-KEY-ABC(16756): InApp: Response JSON object doesn't contain the inapp key, bailing
V/CleverTap:APP-KEY-ABC(16756): Processing inbox messages...
V/CleverTap:APP-KEY-ABC(16756): Inbox: Processing response
V/CleverTap:APP-KEY-ABC(16756): Inbox: Response JSON object doesn't contain the inbox key
V/CleverTap:APP-KEY-ABC(16756): Processing Display Unit items...
V/CleverTap:APP-KEY-ABC(16756): DisplayUnit : JSON object doesn't contain the Display Units key
V/CleverTap:APP-KEY-ABC(16756): Processing Feature Flags response...
V/CleverTap:APP-KEY-ABC(16756): Feature Flag : JSON object doesn't contain the Feature Flags key
V/CleverTap:APP-KEY-ABC(16756): Processing Product Config response...
V/CleverTap:APP-KEY-ABC(16756): Product Config : JSON object doesn't contain the Product Config key
D/CleverTap:APP-KEY-ABC(16756): Queue sent successfully
V/CleverTap:APP-KEY-ABC(16756): Returning Queued Notification Viewed events
V/CleverTap:APP-KEY-ABC(16756): No events in the queue, bailing

@darshanclevertap
Copy link
Contributor

@ganeshrvel there was an issue with the return type in setCleverTapInAppNotificationButtonClickedHandler. This will be fixed in the upcoming version due release on Friday

@darshanclevertap darshanclevertap added the under deployment Will be released in the next release label May 19, 2021
@darshanclevertap
Copy link
Contributor

This has been fixed in CT Flutter Plugin v1.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
under deployment Will be released in the next release
Projects
None yet
Development

No branches or pull requests

2 participants