Closed ohuo133233 closed 7 months ago
补充发现了一些问题 我之所以可以获取到的消息是0(下面的json),是因为我调用了 clear_msgs 接口。 {"status":"ok","retcode":0,"data":{"messages":[]},"echo":""}
当我没有调这个接口的时候会直接返回 { "status": "failed", "retcode": 20002, "data": { "url": "/get_group_msg_history?group_id=729873048%20", "error": "UNIQUE constraint failed: message_mapping_v2.msgHashId (code 1555 SQLITE_CONSTRAINT_PRIMARYKEY)" } }
错误日志: [18:40:44] ERROR android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: message_mapping_v2.msgHashId (code 1555 SQLITE_CONSTRAINT_PRIMARYKEY) at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method) at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:940) at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:790) at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:89) at androidx.sqlite.db.framework.FrameworkSQLiteStatement.executeInsert(FrameworkSQLiteStatement.kt:42) at androidx.room.EntityInsertionAdapter.insert(EntityInsertionAdapter.kt:52) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.ktor.server.netty.EventLoopGroupProxy$Companion.create$lambda$1$lambda$0(NettyApplicationEngine.kt:296) at io.ktor.server.netty.EventLoopGroupProxy$Companion.$r8$lambda$XgnKz7L6tCWRUaIAa7SVURwtFE4(Unknown Source:0) at io.ktor.server.netty.EventLoopGroupProxy$Companion$$ExternalSyntheticLambda1.run(Unknown Source:2) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:920)
补充发现了一些问题 我之所以可以获取到的消息是0(下面的json),是因为我调用了 clear_msgs 接口。 {"status":"ok","retcode":0,"data":{"messages":[]},"echo":""}
当我没有调这个接口的时候会直接返回 { "status": "failed", "retcode": 20002, "data": { "url": "/get_group_msg_history?group_id=729873048%20", "error": "UNIQUE constraint failed: message_mapping_v2.msgHashId (code 1555 SQLITE_CONSTRAINT_PRIMARYKEY)" } }
错误日志: [18:40:44] ERROR android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: message_mapping_v2.msgHashId (code 1555 SQLITE_CONSTRAINT_PRIMARYKEY) at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method) at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:940) at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:790) at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:89) at androidx.sqlite.db.framework.FrameworkSQLiteStatement.executeInsert(FrameworkSQLiteStatement.kt:42) at androidx.room.EntityInsertionAdapter.insert(EntityInsertionAdapter.kt:52) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.ktor.server.netty.EventLoopGroupProxy$Companion.create$lambda$1$lambda$0(NettyApplicationEngine.kt:296) at io.ktor.server.netty.EventLoopGroupProxy$Companion.$r8$lambda$XgnKz7L6tCWRUaIAa7SVURwtFE4(Unknown Source:0) at io.ktor.server.netty.EventLoopGroupProxy$Companion$$ExternalSyntheticLambda1.run(Unknown Source:2) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:920)
相同的问题, 目前升级到Shamrock-v1.0.9.r405.2ac0003-x86_64后,问题看上去解决了。
描述 Bug
get 请求 http://127.0.0.1:9999/get_group_msg_history?group_id=729873048 返回消息 {"status":"ok","retcode":0,"data":{"messages":[]},"echo":""}
我发送消息的接口就可以发送,获取聊天记录的就不行,两个接口都使用了
复现 Bug
如果可以的话可以加我QQ吗?1441289873 有偿解决一下
系统信息