Got NULL notification. Give up to show


(Lvzhihao100) #1

自动配置,自定义消息可以接受到信息,但是通知就是收不到,也不显示


#2

你推送通知时所传的参数是怎样的。提供下这个设备的 registrationID 和消息的 MessageID 值


(Lvzhihao100) #3

msgId:58546800675475526 registrationID 1fb4d091b133771446afaa5f
就是直接在网页上面发推送,推送所有Android设备


(Lvzhihao100) #4

重新建一个应用,相同的配置就可以接受到通知,我这个应用就是不行,对比了一下日志,收不到通知的应用会打印[NotificationHelper] Got NULL notification. Give up to show.


(Lvzhihao100) #5

想知道什么情况下打印这条语句


(Lvzhihao100) #6

发错了,registrationID 是120c83f7606e139a562


#7

稍等一下,你提供下你的手机机型和系统,极光 SDK 版本号,我提交下这个问题。


(Lvzhihao100) #8

感觉和手机机型系统以及版本号都没关系,可能是我项目里有什么和通知冲突,让其失效了吧,我换了手机和SDK版本都是一样的问题


#9

额,你的意思是用极光的 demo 跑是没有问题的,但集成到你的项目里面就会显示这个日志并且通知不会展示是这样吗?

那你提供下 debug 的完整的客户端日志信息吧。


(Lvzhihao100) #10
com.sskj.cv3 D/JIGUANG-JPush: [JPushInterface] action:init - sdkVersion:3.2.0, buildId:445
com.sskj.cv3 D/JIGUANG-JPush: [AndroidUtil] action:checkValidManifest
com.sskj.cv3 D/JIGUANG-JCore: [JCoreGlobal] action:init - sdkVersion:1.2.7, buildId:207
com.sskj.cv3 D/JIGUANG-JCore: [JCoreGlobal] manifest:channel - developer-default
com.sskj.cv3 D/JIGUANG-JCore: [JCoreGlobal] metadata: appKey - 1fb4d091b133771446afaa5f
com.sskj.cv3 D/JIGUANG-JCore: [AndroidUtil] action:checkValidManifest
com.sskj.cv3 D/JIGUANG-JCore: [JCoreServiceUtils] set Push/Alarm Receiver enabled
com.sskj.cv3:pushcore D/JIGUANG-JPush: [JPushInterface] action:init - sdkVersion:3.2.0, buildId:445
com.sskj.cv3:pushcore D/JIGUANG-JPush: [AndroidUtil] action:checkValidManifest
com.sskj.cv3:pushcore D/JIGUANG-JCore: [JCoreGlobal] action:init - sdkVersion:1.2.7, buildId:207
com.sskj.cv3:pushcore D/JIGUANG-JCore: [JCoreGlobal] manifest:channel - developer-default
com.sskj.cv3:pushcore D/JIGUANG-JCore: [JCoreGlobal] metadata: appKey - 1fb4d091b133771446afaa5f
com.sskj.cv3:pushcore D/JIGUANG-JCore: [AndroidUtil] action:checkValidManifest
com.sskj.cv3:pushcore D/JIGUANG-JCore: [JCoreServiceUtils] set Push/Alarm Receiver enabled
com.sskj.cv3:pushcore D/JIGUANG-JCore: [PushService] onStartCommand - intent:Intent { act=com.sskj.cv3.intent.INIT cmp=com.sskj.cv3/cn.jpush.android.service.PushService (has extras) }, pkg:com.sskj.cv3, connection:0
com.sskj.cv3:pushcore D/JIGUANG-JCore: [PushService] onStartCommand - intent:Intent { act=com.sskj.cv3.run.action cmp=com.sskj.cv3/cn.jpush.android.service.PushService (has extras) }, pkg:com.sskj.cv3, connection:0
com.sskj.cv3:pushcore D/JIGUANG-JCore: [PushService] onStartCommand - intent:Intent { act=com.sskj.cv3.run.action cmp=com.sskj.cv3/cn.jpush.android.service.PushService (has extras) }, pkg:com.sskj.cv3, connection:0
com.sskj.cv3:pushcore D/JIGUANG-JCore: [PushService] onStartCommand - intent:Intent { act=com.sskj.cv3.intent.PERIOD_RESUME cmp=com.sskj.cv3/cn.jpush.android.service.PushService (has extras) }, pkg:com.sskj.cv3, connection:0
com.sskj.cv3:pushcore D/JIGUANG-JCore: [PushService] onStartCommand - intent:Intent { act=com.sskj.cv3.intent.RTC cmp=com.sskj.cv3/cn.jpush.android.service.PushService (has extras) }, pkg:com.sskj.cv3, connection:0
com.sskj.cv3:pushcore D/JIGUANG-JCore: [PushService] onStartCommand - intent:Intent { act=com.sskj.cv3.cn.jpush.android.intent.check.notification.state cmp=com.sskj.cv3/cn.jpush.android.service.PushService (has extras) }, pkg:com.sskj.cv3, connection:0
com.sskj.cv3:pushcore D/JIGUANG-JCore: [PushService] onStartCommand - intent:Intent { act=com.sskj.cv3.intent.INIT cmp=com.sskj.cv3/cn.jpush.android.service.PushService (has extras) }, pkg:com.sskj.cv3, connection:0
com.sskj.cv3:pushcore D/JIGUANG-JCore: [PushService] onStartCommand - intent:Intent { act=com.sskj.cv3.run.action cmp=com.sskj.cv3/cn.jpush.android.service.PushService (has extras) }, pkg:com.sskj.cv3, connection:0
com.sskj.cv3:pushcore D/JIGUANG-JCore: [JiguangTcpManager] Action - restartNetworkingClient, pid:22201
com.sskj.cv3:pushcore I/JIGUANG-JCore: [NetworkingClient] Begin to run in ConnectingThread - id:2402
com.sskj.cv3:pushcore D/JIGUANG-JCore: [PushReceiver] onReceive - android.net.conn.CONNECTIVITY_CHANGE
com.sskj.cv3:pushcore D/JIGUANG-JCore: [JiguangTcpManager] Action - restartNetworkingClient, pid:22201
com.sskj.cv3:pushcore D/JIGUANG-JCore: [JiguangTcpManager] isRunning:true
com.sskj.cv3:pushcore D/JIGUANG-JPush: [JPushDataAction] Action - onActionRun
com.sskj.cv3:pushcore D/JIGUANG-JPush: [PushServiceCore] bundle:Bundle[{action=com.sskj.cv3.intent.START_GEOFENCE, sdktype=JPUSH}]
com.sskj.cv3:pushcore D/JIGUANG-JPush: [PushServiceCore] Action - handleServiceAction - action:com.sskj.cv3.intent.START_GEOFENCE
com.sskj.cv3:pushcore D/JIGUANG-JPush: [GeofenceAction] Recover geofence size:0
com.sskj.cv3:pushcore D/JIGUANG-JPush: [PushReceiverCore] onReceive - android.net.conn.CONNECTIVITY_CHANGE
com.sskj.cv3:pushcore D/JIGUANG-JPush: [CustomGeofenAction] start listen geofence
com.sskj.cv3:pushcore D/JIGUANG-JPush: [CustomGeofenAction] No geofence,not need listen
com.sskj.cv3:pushcore D/JIGUANG-JCore: [ARunAction]  pkg:com.sskj.cv3
com.sskj.cv3:pushcore D/JIGUANG-JCore: [ARunAction] Bundle[{action=cn.jpush.android.intent.REPORT, report.extra.info=, report=crash_log, sdktype=JCORE}]
com.sskj.cv3:pushcore D/JIGUANG-JCore: [JiguangTcpManager] Action - restartNetworkingClient, pid:22201
com.sskj.cv3:pushcore D/JIGUANG-JCore: [JiguangTcpManager] isRunning:true
com.sskj.cv3:pushcore D/JIGUANG-JPush: [JPushDataAction] Action - onActionRun
com.sskj.cv3:pushcore D/JIGUANG-JPush: [PushServiceCore] bundle:Bundle[{action=com.sskj.cv3.intent.START_GEOFENCE, sdktype=JPUSH}]
com.sskj.cv3:pushcore D/JIGUANG-JPush: [PushServiceCore] Action - handleServiceAction - action:com.sskj.cv3.intent.START_GEOFENCE
com.sskj.cv3:pushcore D/JIGUANG-JPush: [CustomGeofenAction] start listen geofence
com.sskj.cv3:pushcore D/JIGUANG-JPush: [CustomGeofenAction] No geofence,not need listen
com.sskj.cv3:pushcore D/JIGUANG-JCore: [ARunAction]  pkg:com.sskj.cv3
com.sskj.cv3:pushcore D/JIGUANG-JCore: [ARunAction] Bundle[{action=cn.jpush.android.intent.REPORT, report.extra.info=, report=crash_log, sdktype=JCORE}]
com.sskj.cv3:pushcore D/JIGUANG-JCore: [SisPolicy] To get sis - host:43.247.88.107, port:19000 ,type:hardcode_domain
com.sskj.cv3:pushcore D/JIGUANG-JCore: [ConnectingHelper] SIS Receiving...
com.sskj.cv3:pushcore I/JIGUANG-JCore: [SisPolicy] Get sis info succeed with host: 43.247.88.107 type:hardcode_domain
com.sskj.cv3:pushcore D/JIGUANG-JCore: [SisPolicy] Open connection with main - ip:103.230.236.49, port:7007
com.sskj.cv3:pushcore I/JIGUANG-JCore: [SisPolicy] Succeed to open connection - ip:103.230.236.49, port:7007
com.sskj.cv3:pushcore I/JIGUANG-JCore: [ConnectingHelper] Login with - juid:23669304021, appKey:1fb4d091b133771446afaa5f, sdkVersion:66055, pushVersion:197120, analyticsVersion:0 ,shareVersion:0,sspSdkVer:0,verificationSdkVer:0, pluginPlatformType:0
com.sskj.cv3:pushcore I/JIGUANG-JCore: [ConnectingHelper] Login succeed - sid:6409, serverTime;1552368195000
com.sskj.cv3:pushcore D/JIGUANG-JCore: [ConnectingHelper] Action - sendServerTimer
com.sskj.cv3:pushcore D/JIGUANG-JCore: [JiguangTcpManager] Action - onLoggedIn - connection:2402
com.sskj.cv3:pushcore D/JIGUANG-JCore: [ConnectingHelper] Action - sendConnectionChanged
com.sskj.cv3:pushcore D/JIGUANG-JCore: [NetworkingClient] Network listening...
com.sskj.cv3:pushcore I/JIGUANG-JCore: [ReportHelper] periodTasks...
com.sskj.cv3 D/JIGUANG-JCore: [PushReceiver] onReceive - cn.jpush.android.intent.ACTION_REPORT_HISTORY
com.sskj.cv3 D/JIGUANG-JPush: [PushReceiverCore] onReceive - cn.jpush.android.intent.ACTION_REPORT_HISTORY
com.sskj.cv3:pushcore D/JIGUANG-JCore: [JiguangTcpManager] Send heart beat
com.sskj.cv3:pushcore D/JIGUANG-JCore: [JiguangTcpManager] Action - onHeartbeatSucceed - connection:2402
com.sskj.cv3:pushcore D/JIGUANG-JCore: [NetworkingClient] Received bytes - len:36, connection:2402, pkg:com.sskj.cv3
com.sskj.cv3:pushcore D/JIGUANG-JCore: [NetworkingClient] Network listening...
com.sskj.cv3:pushcore D/JIGUANG-JCore: [HttpHelper] status code:200 retry left:2
com.sskj.cv3:pushcore D/JIGUANG-JPush: [JPushDataAction] response:[MessagePush] - msgType:0, msgId:29273408196615457, msgContent:com.sskj.cv3
    1fb4d091b133771446afaa5f
    {"ad_id":"29273408196615457","m_content":{"ad_t":0,"n_alert_type":7,"n_category":"","n_content":"123","n_extras":{},"n_flag":1,"n_priority":0,"n_style":0,"n_title":""},"n_builder_id":0,"n_only":1,"show_type":4} - JResponse{code=0}
com.sskj.cv3:pushcore D/JIGUANG-JCore: [NetworkingClient] Received bytes - len:292, connection:2402, pkg:com.sskj.cv3
com.sskj.cv3:pushcore D/JIGUANG-JCore: [NetworkingClient] Network listening...
com.sskj.cv3:pushcore W/JIGUANG-JPush: [NotificationHelper] Got NULL notification. Give up to show.
com.sskj.cv3:pushcore D/JIGUANG-JCore: [HttpHelper] status code:200 retry left:2

#11

问下是我说的这个情况吗?你之前说的那个正常的应用是什么应用


(Lvzhihao100) #12

就是一个新的应用,只集成了极光推送,就可以收到通知


(Lvzhihao100) #13

Got NULL notification. Give up to show
这句话什么情况下会打印呀?


#14

请稍等下,这个问题提给研发那边了,需要等他们回复,由于工作安排的原因,需要等一等


#15

研发分析:可能是错误的使用了NotificationBuilder,导致无法创建通知,你看下你相关的代码,提供过来


(Linx) #16

有解决了吗,我也遇到这个问题了。会和用androidx有关系吗


#17

你可以先尝试这样做一下:
增加 jpush_notification_icon.png图标来避免找不到通知图标。路径如下:
res/drawable-xxxx/jpush_notification_icon