向极光注册token ,上报 token 失败

ios
标签: #<Tag:0x00007fb8346a9408>

(甘小腾) #1


这个地方有时不会打印这个upload device token success 这个时候就不会收到推送
可以取到 token 值并上报 token 给极光失败 怎么办


(甘小腾) #2

这个地方有时不会打印这个upload device token success 这个时候就不会收到推送


#3

upload device token success

是一个正常的日志,代表上传 token 成功,没有什么问题。

收不到消息排查与信息提供


(甘小腾) #4

这个是正常的 有时候没有这个打印 这个时候推送就不成功


#5

提供你复现到问题的完整的客户端日志信息。


(甘小腾) #6
2018-09-28 10:17:49.882907+0800 driver[1063:142338] A location manager (0x101f66a30) was created on a dispatch queue executing on a thread other than the main thread.  It is the developer's responsibility to ensure that there is a run loop running on the thread on which the location manager object is allocated.  In particular, creating location managers in arbitrary dispatch queues (not attached to the main queue) is not supported and will result in callbacks not being received.
2018-09-28 10:17:49.991647+0800 driver[1063:141639] <EHIURLResponse: 0x174057d30>
2018-09-28 10:17:50.016094+0800 driver[1063:142334] 轨迹服务开启成功
2018-09-28 10:17:50.017498+0800 driver[1063:141702] A location manager (0x101f82140) was created on a dispatch queue executing on a thread other than the main thread.  It is the developer's responsibility to ensure that there is a run loop running on the thread on which the location manager object is allocated.  In particular, creating location managers in arbitrary dispatch queues (not attached to the main queue) is not supported and will result in callbacks not being received.
2018-09-28 10:17:50.020270+0800 driver[1063:141702] 开始采集成功
2018-09-28 10:17:50.098330+0800 driver[1063:141639] <068c9216 8f13499b 3438aa47 007405cd beb7e2bb 22fc6bf3 073a93ed 11a8b6c7>
2018-09-28 10:17:50.115816+0800 driver[1063:142341]  | JIGUANG | I - [JIGUANGDeviceTokenReport] try to upload device token:4bfee63bcc8b1e6b4b1dff0d1c357f8d243d1e28845b6675c98607a01487e196
2018-09-28 10:17:50.184620+0800 driver[1063:141639]  别名号 😀 : 7979302D766D1AEC8F3697EF54906887

(甘小腾) #7

没什么异常 就是没有成功日志打印


#8

开启 debug ,从初始化开始提供日志。

出现问题时所连的网络是什么,4G?


(甘小腾) #9

公司的wifi


(甘小腾) #10
2018-09-28 10:23:21.064831+0800 driver[1075:143977] A location manager (0x102195c50) was created on a dispatch queue executing on a thread other than the main thread.  It is the developer's responsibility to ensure that there is a run loop running on the thread on which the location manager object is allocated.  In particular, creating location managers in arbitrary dispatch queues (not attached to the main queue) is not supported and will result in callbacks not being received.
2018-09-28 10:23:21.168895+0800 driver[1075:143887] <EHIURLResponse: 0x17025ca70>
2018-09-28 10:23:21.169436+0800 driver[1075:143981] 轨迹服务开启成功
2018-09-28 10:23:21.170627+0800 driver[1075:143981] A location manager (0x102153e70) was created on a dispatch queue executing on a thread other than the main thread.  It is the developer's responsibility to ensure that there is a run loop running on the thread on which the location manager object is allocated.  In particular, creating location managers in arbitrary dispatch queues (not attached to the main queue) is not supported and will result in callbacks not being received.
2018-09-28 10:23:21.173554+0800 driver[1075:143981] 开始采集成功
2018-09-28 10:23:21.266327+0800 driver[1075:143887] <20d4c42c 021c8984 f0ec620a dfeb0e30 3e475b21 1ff508a8 068a16e7 e3972997>
2018-09-28 10:23:21.266561+0800 driver[1075:144064]  | JIGUANG | D - [JIGUANGService] Action - registerDeviceToken: <8eafbb4c 77087dfe aa615bfe c4a0622e dc067b25 e5b609b2 d8106a9a 60dd87f9>
2018-09-28 10:23:21.267305+0800 driver[1075:144064]  | JIGUANG | D - [JIGUANGUserDefaultsController] Action - setCurrentDeviceToken - 8eafbb4c77087dfeaa615bfec4a0622edc067b25e5b609b2d8106a9a60dd87f9
2018-09-28 10:23:21.285705+0800 driver[1075:144064]  | JIGUANG | D - [JIGUANGSessionController] Action - doSendTcpRequest
2018-09-28 10:23:21.286070+0800 driver[1075:144064]  | JIGUANG | I - [JIGUANGDeviceTokenReport] try to upload device token:8eafbb4c77087dfeaa615bfec4a0622edc067b25e5b609b2d8106a9a60dd87f9
2018-09-28 10:23:21.820156+0800 driver[1075:143887]  别名号 😀 : 7979302D766D1AEC8F3697EF54906887
2018-09-28 10:23:21.820915+0800 driver[1075:143939]  | JIGUANG | D - [JIGUANGTcpSocket] Got tcp command

#11

切换为 4 G 测试一下。如果 token 没上报成功,应该在下一次登陆会自动重新上报


(甘小腾) #12

好的
我试一下


(甘小腾) #13
2018-09-28 11:42:39.482908+0800 driver[1128:156994]  | JIGUANG | I - [JIGUANGLogin] 
----- login result -----
uid:12483480057 
registrationID:171976fa8abcf6d65e2 
idc:1
2018-09-28 11:42:39.483050+0800 driver[1128:156994]  | JIGUANG | D - [JIGUANGTcpSocket] Got tcp command
2018-09-28 11:42:39.483108+0800 driver[1128:156994]  | JIGUANG | D - [JIGUANGSessionController] Action - onAckOrRespReceived:
2018-09-28 11:42:39.483321+0800 driver[1128:156994]  | JIGUANG | D - [JIGUANGSessionController] Event - onLoginRespond
2018-09-28 11:42:39.485072+0800 driver[1128:156992]  | JIGUANG | D - [JIGUANGUtilities] JCOREPostNotificationWithUserInfo name: kJPUSHNetworkDidLoginNotification (null)
2018-09-28 11:42:39.485959+0800 driver[1128:156992]  | JIGUANG | D - [JIGUANGSessionController] Action - doSendTcpRequest
2018-09-28 11:42:39.486148+0800 driver[1128:156992]  | JIGUANG | I - [JIGUANGDeviceTokenReport] try to upload device token:f445835aa0e91ec0c748f29afbe375b96a5b8c55dfcd4f5d09d2d43b04e58a3b
2018-09-28 11:42:39.486778+0800 driver[1128:156992]  | JIGUANG | D - [JIGUANGSessionController] Action - doSendTcpRequest
2018-09-28 11:42:39.488936+0800 driver[1128:156994]  | JIGUANG | D - [JIGUANGSessionController] Action - doSendTcpRequest
2018-09-28 11:42:39.489062+0800 driver[1128:156994]  | JIGUANG | I - [JIGUANGDeviceTokenReport] try to upload device token:f445835aa0e91ec0c748f29afbe375b96a5b8c55dfcd4f5d09d2d43b04e58a3b
2018-09-28 11:42:39.572240+0800 driver[1128:156992]  | JIGUANG | D - [JIGUANGReport] send report:(
        {
        date = "2018-09-28";
        itime = 1538106158;
        "session_id" = bbb81bd79588084384ca3707134c66db;
        time = "11:42:38";
        timezone = "+8";
        type = "active_launch";
    }
) log succed
2018-09-28 11:42:39.574680+0800 driver[1128:156994]  | JIGUANG | D - [JIGUANGTcpSocket] Got tcp command
2018-09-28 11:42:39.575616+0800 driver[1128:156994]  | JIGUANG | D - [JIGUANGSessionController] Action - onAckOrRespReceived:
2018-09-28 11:42:39.684996+0800 driver[1128:156994]  | JIGUANG | D - [JIGUANGDeviceTokenReport] upload device token success, current token is : f445835aa0e91ec0c748f29afbe375b96a5b8c55dfcd4f5d09d2d43b04e58a3b
2018-09-28 11:42:40.490288+0800 driver[1128:156951]  别名号 😀 : 267EB3281384A8C96197CC123D6E1CDC
2018-09-28 11:42:40.491164+0800 driver[1128:156994]  | JIGUANG | D - [JIGUANGTcpSocket] Got tcp command

开的热点测试的 还是会出现这种情况


(甘小腾) #14

我这个有办法解决吗 大佬


#15

你关闭应用重新打开看看是否可以上报成功


(甘小腾) #16

这个问题就是不定时出现 有时候成功的 有时候就失败


(甘小腾) #17

2018-09-28 14:08:35.820083+0800 driver[1142:170020] <EHIURLResponse: 0x170253c20>
2018-09-28 14:08:35.858551+0800 driver[1142:174328] | JIGUANG | D - [JIGUANGService] Action - registerDeviceToken: <fa8623a3 c2c90331 6455ba3e 346110be c74daa07 2158436a dcf5d042 51a25888>
2018-09-28 14:08:35.861881+0800 driver[1142:174328] | JIGUANG | D - [JIGUANGUserDefaultsController] Action - setCurrentDeviceToken - fa8623a3c2c903316455ba3e346110bec74daa072158436adcf5d04251a25888
2018-09-28 14:08:35.892634+0800 driver[1142:174328] | JIGUANG | D - [JIGUANGSessionController] Action - doSendTcpRequest
2018-09-28 14:08:35.893398+0800 driver[1142:174328] | JIGUANG | I - [JIGUANGDeviceTokenReport] try to upload device token:fa8623a3c2c903316455ba3e346110bec74daa072158436adcf5d04251a25888
2018-09-28 14:08:35.912175+0800 driver[1142:170020] 别名号 :grinning: : 267EB3281384A8C96197CC123D6E1CDC
2018-09-28 14:08:35.912508+0800 driver[1142:174328] | JIGUANG | D - [JIGUANGTcpSocket] Got tcp command
2018-09-28 14:08:35.977603+0800 driver[1142:174328] | JIGUANG | D - [JIGUANGTcpSocket] Got tcp command
2018-09-28 14:08:35.978951+0800 driver[1142:174328] | JIGUANG | D - [JIGUANGSessionController] Action - onAckOrRespReceived:
2018-09-28 14:08:36.116969+0800 driver[1142:174328] | JIGUANG | D - [JIGUANGDeviceTokenReport] upload device token success, current token is : fa8623a3c2c903316455ba3e346110bec74daa072158436adcf5d04251a25888

这是成功的情况


#18

token 确实有上报失败的情况,在关闭应用重新打开后会重新上报,SDK 方会针对这个问题进行优化


(甘小腾) #19

好的 非常谢谢


#20

升级到最新版本,对此有优化
https://docs.jiguang.cn/jpush/updates/#jpush-ios-sdk-v311