这两天 window.JPush.setAlias一直反应很慢

jpush
标签: #<Tag:0x00007fb8462cc148>

(Laijuncheng) #1

环境 :
JPush Version:3.3.2
iPhone7





情况是这样,一切都是正常的,生产环境和开发环境都能收到推送消息,但是window.JPush.setAlias在Android 4.4版本的机子上有点BUG,我找到原因后,重新安装了jpush-phonegap-plugin插件
结果就是现在:
window.JPush.getRegistrationID 没有返回结果
window.JPush.setAlias API调用之后一直没有服务器返回结果,window.JPush.getAlias code一直返回6022


#2

这个说明你们 还没有集成成功,请获取客户端的 log 来分析问题


(Laijuncheng) #3

是这个吗?


#4

请从初始化开始,提供完整的 log 信息


(Laijuncheng) #5
默认	12:00:00.196040 +0800	悦居桂海	 | JIGUANG | D - [JIGUANGService] Action - registerDeviceToken: <4ae90cea 152d38d4 f143df8c 9dd24d62 b3d53e3b 0ddbe388 95ea8e93 c2eea0eb>

…………
默认	12:01:48.536918 +0800	悦居桂海	[com.gxgh.yuejuguihai] Getting notification settings
默认	12:01:48.537011 +0800	悦居桂海	JPushPlugin:Device ready!
默认	12:01:48.538206 +0800	悦居桂海	[com.gxgh.yuejuguihai] Got notification settings [ hasResult: 1 hasCompletionHandler: 1 ]
默认	12:01:48.543283 +0800	悦居桂海	{"badgeSetting":2,"authorizationStatus":2,"notificationCenterSetting":2,"soundSetting":2,"alertStyle":1,"lockScreenSetting":2,"alertSetting":2,"carPlaySetting":0}
默认	12:01:48.544104 +0800	悦居桂海	 | JIGUANG | D - [JIGUANGService] Action - setDebugMode
默认	12:01:48.544474 +0800	悦居桂海	[com.gxgh.yuejuguihai] Setting badge number to 0
默认	12:01:48.545974 +0800	悦居桂海	[com.gxgh.yuejuguihai] Set badge number [ hasCompletionHandler: 0 hasError: 0 ]
默认	12:01:48.643613 +0800	悦居桂海	Task <954E935A-196E-4ACC-A57B-C358FCC271AA>.<0> received response, status 200 content K
默认	12:01:48.644007 +0800	悦居桂海	Task <954E935A-196E-4ACC-A57B-C358FCC271AA>.<0> response ended
默认	12:01:48.644311 +0800	悦居桂海	Task <572195D7-C22E-44A4-968D-C666EB923E71>.<0> received response, status 200 content K
错误	12:01:48.647305 +0800	悦居桂海	NSURLConnection finished with error - code -1100
默认	12:01:48.649981 +0800	悦居桂海	Task <572195D7-C22E-44A4-968D-C666EB923E71>.<0> response ended
默认	12:01:48.657614 +0800	悦居桂海	Task <4826CFBD-9748-4B7B-B8E5-EC04A7715044>.<0> now using Connection 12
默认	12:01:48.657847 +0800	悦居桂海	Task <4826CFBD-9748-4B7B-B8E5-EC04A7715044>.<0> sent request, body N
默认	12:01:48.675160 +0800	悦居桂海	Task <4826CFBD-9748-4B7B-B8E5-EC04A7715044>.<0> received response, status 200 content K
默认	12:01:48.731114 +0800	悦居桂海	Task <4AAA851E-221C-4086-B9C5-25F3F712FB5B>.<0> received response, status 200 content K
默认	12:01:48.744632 +0800	悦居桂海	Task <4AAA851E-221C-4086-B9C5-25F3F712FB5B>.<0> response ended
默认	12:01:48.934499 +0800	assertiond	[悦居桂海:5704] Attempting to acquire assertion for 悦居桂海:5704: <BKProcessAssertion: 0x147e76ef0; "Called by UIKit, from <redacted>" (finishTask:180s); id:…F65F906C8411>
默认	12:01:48.934902 +0800	assertiond	[悦居桂海:5704] Add assertion: <BKProcessAssertion: 0x147e76ef0; id: 5704-885E8FB4-C86D-4213-A43C-F65F906C8411; name: "Called by UIKit, from <redacted>"; state: active; reason: finishTask; duration: 180.0s> {
    owner = <BSProcessHandle: 0x147d49da0; 悦居桂海:5704; valid: YES>;
    flags = preventSuspend, preventIdleSleep, preventSuspendOnSleep;
}
默认	12:01:48.934981 +0800	assertiond	[悦居桂海:5704] Activate assertion: <BKProcessAssertion: 0x147e76ef0; "Called by UIKit, from <redacted>" (finishTask:180s); id:…F65F906C8411>
默认	12:01:48.935070 +0800	assertiond	[悦居桂海:5704] New process assertion state; preventSuspend, preventThrottleDownUI, preventThrottleDownCPU, preventIdleSleep, preventSuspendOnSleep (assertion 0x147e76ef0 added: preventIdleSleep; removed: (none))
默认	12:01:48.935138 +0800	assertiond	[悦居桂海:5704] Setting jetsam priority to 10 [0x10108]
默认	12:01:48.935366 +0800	assertiond	[悦居桂海:5704] dump all assertions HWM:3 (CPUMON check): {
    <BKProcessAssertion: 0x147d51bf0; "Resume" (activation:inf); id:…739C1D6B4251> [active]
    <BKProcessAssertion: 0x147e76ef0; "Called by UIKit, from <redacted>" (finishTask:180s); id:…F65F906C8411> [active]
}
默认	12:01:48.936058 +0800	assertiond	Creating PowerAssertion on 悦居桂海:5704
默认	12:01:48.936666 +0800	assertiond	Created PowerAssertion on 悦居桂海:5704, sleep reverted
默认	12:01:48.938263 +0800	powerd	Process assertiond.66 Created SystemIsActive "悦居桂海:5704:5704-885E8FB4-C86D-4213-A43C-F65F906C8411 [Called by UIKit, from <redacted>] [0x147e76ef0]" age:00:00:00  id:51539648137 [System: SysAct]
默认	12:01:49.621793 +0800	悦居桂海	[com.gxgh.yuejuguihai] Getting allows remote notifications
默认	12:01:49.622470 +0800	悦居桂海	[com.gxgh.yuejuguihai] Got token for remote notifications [ isAllowed: 1 hasCompletionHandler: 1 ]
默认	12:01:49.629952 +0800	悦居桂海	 | JIGUANG | D - [JIGUANGService] Action - registrationID
默认	12:01:49.650983 +0800	悦居桂海	已经开启
默认	12:01:49.651131 +0800	悦居桂海	JPushPlugin:registrationID is
默认	12:01:49.669140 +0800	悦居桂海	{"code":6022,"sequence":1}
错误	12:01:49.812563 +0800	悦居桂海	[0x105a7a800] Decoding failed with error code -1
错误	12:01:49.812946 +0800	悦居桂海	[0x105a7a800] Decoding: C0 0x186A0A94 0x030E354A 0x11111100 0x00000000 1510375
错误	12:01:49.813215 +0800	悦居桂海	[0x105a7a800] Options: 8x-1 [FFFFFFFF,FFFFFFFF] 0001C060
默认	12:01:50.651216 +0800	悦居桂海	[com.gxgh.yuejuguihai] Getting allows remote notifications
默认	12:01:50.655218 +0800	悦居桂海	[com.gxgh.yuejuguihai] Got token for remote notifications [ isAllowed: 1 hasCompletionHandler: 1 ]
默认	12:01:50.663025 +0800	悦居桂海	 | JIGUANG | D - [JIGUANGService] Action - registrationID
默认	12:01:50.682515 +0800	悦居桂海	已经开启
默认	12:01:50.683361 +0800	悦居桂海	JPushPlugin:registrationID is
默认	12:01:50.690109 +0800	悦居桂海	{"code":6022,"sequence":1}
默认	12:01:50.943986 +0800	assertiond	[悦居桂海:5704] Deactivate assertion: <BKProcessAssertion: 0x147e76ef0; "Called by UIKit, from <redacted>" (finishTask:180s); id:…F65F906C8411>
默认	12:01:50.945315 +0800	assertiond	[悦居桂海:5704] dump all assertions HWM:3 (deactivateAssertion): {
    <BKProcessAssertion: 0x147d51bf0; "Resume" (activation:inf); id:…739C1D6B4251> [active]
}
默认	12:01:50.945784 +0800	assertiond	[悦居桂海:5704] New process assertion state; preventSuspend, preventThrottleDownUI, preventThrottleDownCPU, preventSuspendOnSleep (assertion 0x147e76ef0 added: (none); removed: preventIdleSleep)
默认	12:01:50.946407 +0800	assertiond	[悦居桂海:5704] Setting jetsam priority to 10 [0x10100]
默认	12:01:50.946870 +0800	assertiond	[悦居桂海:5704] dump all assertions HWM:3 (CPUMON check): {
    <BKProcessAssertion: 0x147d51bf0; "Resume" (activation:inf); id:…739C1D6B4251> [active]
}
默认	12:01:50.948191 +0800	assertiond	Releasing PowerAssertion on 悦居桂海:5704 from update
默认	12:01:50.948798 +0800	powerd	Process assertiond.66 Released SystemIsActive "悦居桂海:5704:5704-885E8FB4-C86D-4213-A43C-F65F906C8411 [Called by UIKit, from <redacted>] [0x147e76ef0]" age:00:00:02  id:51539648137 [System: SysAct]
默认	12:01:50.949571 +0800	assertiond	[悦居桂海:5704] Remove assertion: <BKProcessAssertion: 0x147e76ef0; "Called by UIKit, from <redacted>" (finishTask:180s); id:…F65F906C8411>
默认	12:01:50.952531 +0800	assertiond	[悦居桂海:5704] dump all assertions HWM:3 (CPUMON check): {
    <BKProcessAssertion: 0x147d51bf0; "Resume" (activation:inf); id:…739C1D6B4251> [active]
}
默认	12:01:51.173182 +0800	悦居桂海	Task <4826CFBD-9748-4B7B-B8E5-EC04A7715044>.<0> response ended
默认	12:01:51.699471 +0800	悦居桂海	[com.gxgh.yuejuguihai] Getting allows remote notifications
默认	12:01:51.701532 +0800	悦居桂海	[com.gxgh.yuejuguihai] Got token for remote notifications [ isAllowed: 1 hasCompletionHandler: 1 ]
默认	12:01:51.705993 +0800	悦居桂海	 | JIGUANG | D - [JIGUANGService] Action - registrationID
默认	12:01:51.731347 +0800	悦居桂海	已经开启
默认	12:01:51.731468 +0800	悦居桂海	JPushPlugin:registrationID is
默认	12:01:51.744455 +0800	悦居桂海	{"code":6022,"sequence":1}
默认	12:01:52.725639 +0800	悦居桂海	[com.gxgh.yuejuguihai] Getting allows remote notifications
默认	12:01:52.729205 +0800	悦居桂海	[com.gxgh.yuejuguihai] Got token for remote notifications [ isAllowed: 1 hasCompletionHandler: 1 ]
默认	12:01:52.734810 +0800	悦居桂海	 | JIGUANG | D - [JIGUANGService] Action - registrationID
默认	12:01:52.744379 +0800	悦居桂海	已经开启
默认	12:01:52.745232 +0800	悦居桂海	JPushPlugin:registrationID is
默认	12:01:52.755335 +0800	悦居桂海	{"code":6022,"sequence":1}

#6

1、根据日志来看,你们没有成功的渠道 registrationID值。

2、设置别名和标签如果没有获取到回调,请等待20 秒后再调 API 重设,如果获取到了回调可以不用等待

3、请优先阅读本帖排查: