web的onSyncConversation无法接收消息

标签: #<Tag:0x00007f6587937490>

已开启漫游,但onSyncConversation不能触发回调,日志如下:

—>- event:c_init, data:{“appkey”:“925408e17f06dfd56eee5fca”,“random_str”:“97f75dgfbgbd6h9h63d5”,“signature”:“a76fc15b0821b09df8f251814b87879e”,“timestamp”:1565706087109,“flag”:true,“fromPlatForm”:“j”,“rid”:217390528}
jmessage.js?b86b:1173 —<- event:ack, data:{“rid”:217390528,“event”:“c_init”}
jmessage.js?b86b:1173 —<- event:c_init, data:{“rid”:217390528,“code”:0,“event”:“c_init”,“message”:“success”}
jmessage.js?b86b:1190 —>- event:register, data:{“username”:“13918447714”,“password”:“e10adc3949ba59abbe56e057f20f883e”,“media_id”:“20211492_1563796879100_6.jpeg”,“rid”:1455536766}
jmessage.js?b86b:1173 —<- event:ack, data:{“rid”:0,“event”:“register”}
jmessage.js?b86b:1173 —<- event:register, data:{“rid”:1455536766,“code”:882002,“event”:“register”,“message”:“user exit or not exits or password err or uid err or gid err or appkey err”}
jmessage.js?b86b:1190 —>- event:login, data:{“username”:“13918447714”,“password”:“e10adc3949ba59abbe56e057f20f883e”,“version”:“2.5.0”,“rid”:1817647212}
jmessage.js?b86b:1173 —<- event:ack, data:{“rid”:1817647212,“event”:“login”}
jmessage.js?b86b:1173 —<- event:login, data:{“code”:0,“message”:“success”,“rid”:1817647212,“event”:“login”,“online_list”:[{“platform”:“web”,“mtime”:1565706084,“isOnline”:true,“isLogin”:true,“flag”:true}],“username”:“13918447714”}
jmessage.js?b86b:1190 —>- event:sync_check, data:{“sync_key”:0,“sync_type”:0,“sync_event_key”:“0”,“msg_receipt_key”:0,“rid”:756147065}
jMessageList.vue?ce2e:298 login status : true
jmessage.js?b86b:1190 —>- event:get_conversations, data:{“rid”:918591692}
jmessage.js?b86b:1173 —<- event:ack, data:{“rid”:756147065,“event”:“sync_check”}
jmessage.js?b86b:1173 —<- event:ack, data:{“rid”:918591692,“event”:“get_conversations”}
jmessage.js?b86b:1173 —<- event:sync_check, data:{“code”:0,“sync_type”:0,“sync_key”:0,“msg_receipt_key”:0,“rid”:756147065,“message”:“success”,“event”:“sync_check”,“sync_event_key”:0}
jmessage.js?b86b:1173 —<- event:get_conversations, data:{“code”:0,“rid”:918591692,“message”:“success”,“conversations”:[{“name”:“18230892525”,“username”:“18230892525”,“appkey”:“507cdbb3f08234b074a8be5a”,“type”:3,“key”:“327574351”,“utime”:“2019-07-26 01:39:48”,“mtime”:1564103655513,“avatar”:“http://static.yfbudong.com/avater.png",“nickName”:“18230892525”},{“name”:“15865168878”,“username”:“15865168878”,“appkey”:“507cdbb3f08234b074a8be5a”,“type”:3,“key”:“327839125”,“utime”:"2019-07-26 13:18:58”,“mtime”:1564118582544,“avatar”:“http://static.yfbudong.com/avater.png",“nickName”:“15865168878”},{“name”:“13822278181”,“username”:“13822278181”,“appkey”:“507cdbb3f08234b074a8be5a”,“type”:3,“key”:“328211006”,“utime”:"2019-07-26 20:13:12”,“mtime”:1564143231475,“avatar”:"http://static.yfbudong.com/avater.png",“nickName”:“13822278181”},{“name”:“17506680887”,“username”:“17506680887”,“appkey”:“507cdbb3f08234b074a8be5a”,“type”:3,“key”:“328070017”,“utime”:"2019-07-26

看日志是没设置消息漫游
image
对应设置 flag 为 1

比较奇怪,falg初始化时1,第一次sync_check 的sync_type是1,第二次就变成了0
—>- event:c_init, data:{“appkey”:“925408e17f06dfd56eee5fca”,“random_str”:“i78da578f649g1b1adfa”,“signature”:“8566826352a796e3dd8682e858b4623f”,“timestamp”:1565753020934,“flag”:1,“fromPlatForm”:“j”,“rid”:143952291}
jmessage.js?b86b:1 —<- event:ack, data:{“rid”:143952291,“event”:“c_init”}
jmessage.js?b86b:1 —<- event:c_init, data:{“rid”:143952291,“code”:0,“event”:“c_init”,“message”:“success”}
jmessage.js?b86b:1 —>- event:login, data:{“username”:“13918447714”,“password”:“e10adc3949ba59abbe56e057f20f883e”,“version”:“2.5.0”,“rid”:29790438}
jmessage.js?b86b:1 —<- event:ack, data:{“rid”:29790438,“event”:“login”}
jmessage.js?b86b:1 —<- event:login, data:{“code”:0,“message”:“success”,“rid”:29790438,“event”:“login”,“online_list”:[],“username”:“13918447714”}
jmessage.js?b86b:1 —>- event:sync_check, data:{“sync_key”:0,“sync_type”:1,“sync_event_key”:“0”,“msg_receipt_key”:0,“rid”:1450560957}
jMessageList.vue?ce2e:205 login status : true
jmessage.js?b86b:1 —>- event:get_conversations, data:{“rid”:1332042801}
jmessage.js?b86b:1 —<- event:ack, data:{“rid”:1450560957,“event”:“sync_check”}
jmessage.js?b86b:1 —<- event:ack, data:{“rid”:1332042801,“event”:“get_conversations”}
jmessage.js?b86b:1 —<- event:sync_check, data:{“code”:0,“sync_type”:0,“sync_key”:0,“msg_receipt_key”:0,“rid”:1450560957,“message”:“success”,“event”:“sync_check”,“sync_event_key”:0}
jmessage.js?b86b:1 —<- event:get_conversations, data:{“code”:0,“rid”:1332042801,“message”:“success”,“conversations”:[{“name”:“18230892525”,“username”:“18230892525”,“appkey”:“507cdbb3f08234b074a8be5a”,“type”:3,“key”:“327574351”,“utime”:“2019-07-26 01:39:48”,“mtime”:1564103655513,“avatar”:“http://static.yfbudong.com/avater.png",“nickName”:“18230892525”},{“name”:“15865168878”,“username”:“15865168878”,“appkey”:“507cdbb3f08234b074a8be5a”,“type”:3,“key”:“327839125”,“utime”:"2019-07-26 13:18:58”,“mtime”:1564118582544,“avatar”:“http://static.yfbudong.com/avater.png",“nickName”:“15865168878”},{“name”:“13822278181”,“username”:“13822278181”,“appkey”:“507cdbb3f08234b074a8be5a”,“type”:3,“key”:“328211006”,“utime”:"2019-07-26 20:13:12”,“mtime”:1564143231475,“avatar”:"http://static.yfbudong.com/avater.png",“nickName”:“13822278181”},{“name”:“17506680887”,“username”:“17506680887”,“appkey”:“507cdbb3f08234b074a8be5a”,“type”:3,“key”:“328070017”,“utime”:"2019-07-26

你说的第二次就变成了 0 ,这个第二次是在做什么的第二次?

我就执行了一次login,别的啥都没执行,但打印出来的log就执行两次sync_check,这是底层代码的问题吧?

问题正在处理中,请稍等

这个你现在看看是否正常了