Android端JMessage发送消息失败,返回871325


(Liheng2016) #1

Android端JMessage发送消息失败,返回871325 Illegal message status. only created or send_failed message can be sent.


#2

#3

871325 Illegal message status. only created or send_failed message can be sent. 发送消息时消息状态不合法,只有消息状态为创建和发送失败的消息可以被发送


(Liheng2016) #4

怎么解决,偶尔出现


(Liheng2016) #5

前一条还正常,后一条就可能出现


(Liheng2016) #6

java.lang.Throwable: Explicit termination method ‘close’ not called
at dalvik.system.CloseGuard.open(CloseGuard.java:184)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:191)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:178)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:836)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:821)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:714)
at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:1280)
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:268)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:223)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:163)
at cn.jmessage.b.b.c.a(JMSQLiteDatabase.java)
at cn.jmessage.b.b.a.c(AbstractSQLiteOpenHelper.java)
at cn.jmessage.biz.c.a.a(DBOpenHelper.java)
at cn.jmessage.biz.b.a.a(CRUDMethods.java)
at cn.jmessage.biz.b.b.d(ConversationStorage.java)
at cn.jmessage.biz.a.a.b(ConversationManager.java)
at cn.jmessage.biz.b.b.a(ConversationStorage.java)
at cn.jmessage.biz.a.a.a(ConversationManager.java)
at cn.jmessage.biz.j.b.b.a.b(MessageProtocolParser.java)
at cn.jmessage.biz.j.b.b.a.a(MessageProtocolParser.java)
at cn.jmessage.biz.j.b.b.a.a(MessageProtocolParser.java)
at cn.jmessage.biz.h.a.a(ChatMsgManager.java)
at cn.jmessage.biz.h.a$4.call(ChatMsgManager.java)
at cn.jmessage.a.a.e$2.run(Task.java)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)


#7

对于你后面的这个报错,你使用的是自定义的通知吗,布局有自定义过吗?这个问题是否是必现的

上一个报错的问题,根据错误码说明检查你的消息状态


(Liheng2016) #8

后面的这个报错不是必现,
上一个报错,怎么检查消息状态,我是正常的发消息
// 发送聊天室消息
Conversation conv = JMessageClient.getChatRoomConversation(mRoomID);
if (null == conv) {
conv = Conversation.createChatRoomConversation(mRoomID);
}
if(conv == null){
return;
}
final Message msg = conv.createSendTextMessage(text);
msg.setOnSendCompleteCallback(new BasicCallback() {
@Override
public void gotResult(int i, String s) {
if (0 == i) {
printDebugLog("[sendGroupTextMessage] 发送群消息成功:"+s);
if (callback != null)
callback.onSuccess();
} else {
printDebugLog("[sendGroupTextMessage] 发送群{%s}消息失败: %s(%d)", mRoomID+"", s, i);

if (callback != null)
callback.onError(i, s);
}
}
});
JMessageClient.sendMessage(msg);


#9

返回 871325 的
消息状态不对,这条消息可能是发送成功的消息或者接收的消息,再调用了发送
发送前判断下消息状态


(Liheng2016) #10

Message msg = conv.createSendTextMessage(text);消息是新建的怎么会有其他状态呢


(jinfengf) #11

使用的SDK版本号是多少?


(Liheng2016) #12

jmessage:2.8.2
jcore:1.2.7


(jinfengf) #13

嗯,这是SDK的问题,下个版本会进行修复,如需使用聊天室发消息可以先使用2.8.2之前的版本


IM 消息发送失败