E/LCChatKit: cn.leancloud.chatkit.viewholder.LCIMConversationItemHolder$4 internalDone0():139 com.avos.avoscloud.AVException: java.lang.Throwable: idList is empty! at cn.leancloud.chatkit.cache.LCIMProfileCache.getCachedUsers(LCIMProfileCache.java:92) at cn.leancloud.chatkit.utils.LCIMConversationUtils.getConversationName(LCIMConversationUtils.java:49) at cn.leancloud.chatkit.viewholder.LCIMConversationItemHolder.updateName(LCIMConversationItemHolder.java:135) at cn.leancloud.chatkit.viewholder.LCIMConversationItemHolder.access$000(LCIMConversationItemHolder.java:45) at cn.leancloud.chatkit.viewholder.LCIMConversationItemHolder$1.done(LCIMConversationItemHolder.java:82) at com.avos.avoscloud.im.v2.callback.AVIMConversationCallback.internalDone0(AVIMConversationCallback.java:21) at com.avos.avoscloud.im.v2.callback.AVIMConversationCallback.internalDone0(AVIMConversationCallback.java:10) at com.avos.avoscloud.AVCallback.internalDone(AVCallback.java:18) at com.avos.avoscloud.im.v2.AVIMConversation$17.execute(AVIMConversation.java:1446) at com.avos.avoscloud.im.v2.AVIMBaseBroadcastReceiver.onReceive(AVIMBaseBroadcastReceiver.java:29) at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:297) at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:46) at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:116) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) Caused by: java.lang.Throwable: idList is empty! at cn.leancloud.chatkit.cache.LCIMProfileCache.getCachedUsers(LCIMProfileCache.java:92) at cn.leancloud.chatkit.utils.LCIMConversationUtils.getConversationName(LCIMConversationUtils.java:49) at cn.leancloud.chatkit.viewholder.LCIMConversationItemHolder.updateName(LCIMConversationItemHolder.java:135) at cn.leancloud.chatkit.viewholder.LCIMConversationItemHolder.access$000(LCIMConversationItemHolder.java:45) at cn.leancloud.chatkit.viewholder.LCIMConversationItemHolder$1.done(LCIMConversationItemHolder.java:82) at com.avos.avoscloud.im.v2.callback.AVIMConversationCallback.internalDone0(AVIMConversationCallback.java:21) at com.avos.avoscloud.im.v2.callback.AVIMConversationCallback.internalDone0(AVIMConversationCallback.java:10) at com.avos.avoscloud.AVCallback.internalDone(AVCallback.java:18) at com.avos.avoscloud.im.v2.AVIMConversation$17.execute(AVIMConversation.java:1446) at com.avos.avoscloud.im.v2.AVIMBaseBroadcastReceiver.onReceive(AVIMBaseBroadcastReceiver.java:29) at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:297) at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:46) at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:116) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) 04-27 08:54:02.994 13557-13557/com.bibao8.bitcoin E/LCChatKit: cn.leancloud.chatkit.viewholder.LCIMConversationItemHolder$5 internalDone0():164 com.avos.avoscloud.AVException: java.lang.Throwable: cannot find icon! at cn.leancloud.chatkit.utils.LCIMConversationUtils.getConversationPeerIcon(LCIMConversationUtils.java:81) at cn.leancloud.chatkit.viewholder.LCIMConversationItemHolder.updateIcon(LCIMConversationItemHolder.java:160) at cn.leancloud.chatkit.viewholder.LCIMConversationItemHolder.access$100(LCIMConversationItemHolder.java:45) at cn.leancloud.chatkit.viewholder.LCIMConversationItemHolder$1.done(LCIMConversationItemHolder.java:83) at com.avos.avoscloud.im.v2.callback.AVIMConversationCallback.internalDone0(AVIMConversationCallback.java:21) at com.avos.avoscloud.im.v2.callback.AVIMConversationCallback.internalDone0(AVIMConversationCallback.java:10) at com.avos.avoscloud.AVCallback.internalDone(AVCallback.java:18) at com.avos.avoscloud.im.v2.AVIMConversation$17.execute(AVIMConversation.java:1446) at com.avos.avoscloud.im.v2.AVIMBaseBroadcastReceiver.onReceive(AVIMBaseBroadcastReceiver.java:29) at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:297) at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:46) at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:116) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) Caused by: java.lang.Throwable: cannot find icon! at cn.leancloud.chatkit.utils.LCIMConversationUtils.getConversationPeerIcon(LCIMConversationUtils.java:81) at cn.leancloud.chatkit.viewholder.LCIMConversationItemHolder.updateIcon(LCIMConversationItemHolder.java:160) at cn.leancloud.chatkit.viewholder.LCIMConversationItemHolder.access$100(LCIMConversationItemHolder.java:45) at cn.leancloud.chatkit.viewholder.LCIMConversationItemHolder$1.done(LCIMConversationItemHolder.java:83) at com.avos.avoscloud.im.v2.callback.AVIMConversationCallback.internalDone0(AVIMConversationCallback.java:21) at com.avos.avoscloud.im.v2.callback.AVIMConversationCallback.internalDone0(AVIMConversationCallback.java:10) at com.avos.avoscloud.AVCallback.internalDone(AVCallback.java:18) at com.avos.avoscloud.im.v2.AVIMConversation$17.execute(AVIMConversation.java:1446) at com.avos.avoscloud.im.v2.AVIMBaseBroadcastReceiver.onReceive(AVIMBaseBroadcastReceiver.java:29) at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:297) at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:46) at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:116) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
你好,请问使用那个版本 ChatKit?
能描述一下崩溃复现的流程步骤吗?
崩溃的原因不在于chatkit,是因为我们在会话界面添加了一个view,然后联网操作导致的,然后后重新再进入到leancloud的时候就会出现会话列表是空列表,提示错误 idList is empty,debug时候发现属性里面member值为空。chatkit我不知道是那个版本,我是去年八月份导入的lib包。
崩溃的原因不在于chatkit,是因为我们在会话界面添加了一个view,然后联网操作导致的
你好,我这边不清楚您具体的代码逻辑,具体功能需求等上下文,无法复现以及定位您说的问题。
您描述的这种场景,并不是 SDK 的问题导致的崩溃,LeanCloud 不提供技术支持。
另外补充一点,您上面的提供的日志信息并不是 crash 的打印日志,上面日志这个错误是是因为你还没有接入自己的用户体系。
ChatKit 用户体系相关可以参考文档:ChatKit 使用指南 · Android 。
好的 ,我再排查一下
我最近,仔细排查了一下这个问题,并不是因为我们程序崩溃导致的,而且我们也加了用户体系了。出现的情况是偶尔的 ,但是一般出现在两个场景:1.用户非正常退出。2.用户收到了消息通知,但是已经退出登录了,其后用户换手机登录,显示空会话,并且空会话会有未读消息角标,错误提示idList is empty。
另外,我们的会话列表是在本地缓存中获取的。