Git Product home page Git Product logo

mirai-api-http's Introduction

logo
title

Gitter Actions Status

Mirai 是一个在全平台下运行,提供 QQ Android 和 TIM PC 协议支持的高效率机器人框架

这个项目的名字来源于

京都动画作品《境界的彼方》栗山未来(Kuriyama Mirai)

CRYPTON初音未来为代表的创作与活动(Magical Mirai)

图标以及形象由画师DazeCake绘制

mirai-api-http

Mirai HTTP API (console) plugin

mirai-api-http插件 提供HTTP API供所有语言使用mirai

安装mirai-api-http

使用 Mirai Console Loader 安装mirai-api-http

  • MCL 支持自动更新插件,支持设置插件更新频道等功能
  • 2.x 版本需要切换到 stable-v2 的 channel

./mcl --update-package net.mamoe:mirai-api-http --channel stable-v2 --type plugin

  • 启动 MCL 完成自动更新和启动

./mcl -u

开始使用

  1. 编辑config/net.mamoe.mirai-api-http/setting.yml配置文件 (没有则自行创建)
  2. 启动MCL ./mcl
  3. 如果手动安装则启动 mirai-console(不建议)
  4. 记录日志中出现的authKey

setting.yml模板

## 配置文件中的值,全为默认值

## 启用的 adapter, 内置有 http, ws, reverse-ws, webhook
adapters:
  - http
  - ws

## 是否开启认证流程, 若为 true 则建立连接时需要验证 verifyKey
## 建议公网连接时开启
enableVerify: true
verifyKey: 1234567890

## 开启一些调试信息
debug: false

## 是否开启单 session 模式, 若为 true,则自动创建 session 绑定 console 中登录的 bot
## 开启后,接口中任何 sessionKey 不需要传递参数
## 若 console 中有多个 bot 登录,则行为未定义
## 确保 console 中只有一个 bot 登录时启用
singleMode: false

## 历史消息的缓存大小
## 同时,也是 http adapter 的消息队列容量
cacheSize: 4096

## adapter 的单独配置,键名与 adapters 项配置相同
adapterSettings:
  ## 详情看 http adapter 使用说明 配置
  http:
    host: localhost
    port: 8080
    cors: ["*"]
    unreadQueueMaxSize: 100
  
  ## 详情看 websocket adapter 使用说明 配置
  ws:
    host: localhost
    port: 8080
    reservedSyncId: -1

Adapter

mirai-api-http 提供了多种接口调用方式, 并进行模块化称为 adapter

对于较常使用的调用方式, 内置了4种 adapter

  • http: 基于轮询的 http 接口
  • ws: websocket server 形式的接口
  • reverse-ws: websocket client 形式的接口
  • webhook: http 回调形式的接口

adapter 可以多个同时开启, 请按需启用

Adapter 一览

迁移至 2.x

从 1.x 迁移至 2.x 有不少变动,提供迁移文档参考

可能无法覆盖所有变更

调试API

(2.x 未更新)

更新日志

点我查看

文档

在线文档

mirai-api-http's People

Contributors

blankqwq avatar blueglassblock avatar copydog avatar cssxsh avatar dependabot[bot] avatar developer-ken avatar dfaofeng avatar drincann avatar excaive avatar hieuzest avatar him188 avatar hoshinotented avatar icebear67 avatar iskyil avatar karlatemp avatar kawaiizapic avatar liujiahua123123 avatar mr-xiexuan avatar pa733 avatar peratx avatar programripper avatar ryoii avatar tomoemami avatar u2x1 avatar wyapx avatar wybxc avatar xavierwah avatar yoshino-s avatar yucling avatar yunyoujun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mirai-api-http's Issues

[文档] 关于messageId类型的说明不一致

在文档中sendFriendMessage返回值的注释中说明了messageId的类型为Long,但API其余部分的messageId输入参数类型均为Int。建议修改一下文档统一这些说明。

GroupRecallEventDTO is not registered for polymorphic serialization in the scope of class net.mamoe.mirai.api.http.data.common.EventDTO

[NETWORK ERROR]: kotlinx.serialization.SerializationException: class net.mamoe.mirai.api.http.data.common.GroupRecallEventDTO is not registered for polymorphic serialization in the scope of class net.mamoe.mirai.api.http.data.common.EventDTO
kotlinx.serialization.SerializationException: class net.mamoe.mirai.api.http.data.common.GroupRecallEventDTO is not registered for polymorphic serialization in the scope of class net.mamoe.mirai.api.http.data.common.EventDTO
	at kotlinx.serialization.internal.AbstractPolymorphicSerializerKt.throwSubtypeNotRegistered(AbstractPolymorphicSerializer.kt:100)
	at kotlinx.serialization.internal.AbstractPolymorphicSerializerKt.throwSubtypeNotRegistered(AbstractPolymorphicSerializer.kt:103)
	at kotlinx.serialization.internal.AbstractPolymorphicSerializer.findPolymorphicSerializer(AbstractPolymorphicSerializer.kt:96)
	at kotlinx.serialization.json.internal.StreamingJsonOutput.encodeSerializableValue(StreamingJsonOutput.kt:231)
	at kotlinx.serialization.EncodingKt.encode(Encoding.kt:402)
	at kotlinx.serialization.json.Json.stringify(Json.kt:100)
	at net.mamoe.mirai.api.http.route.WebSocketRouteModuleKt$websocketRouteModule$1$$special$$inlined$miraiWebsocket$3$lambda$1.invokeSuspend(WebSocketRouteModule.kt:122)
	at net.mamoe.mirai.api.http.route.WebSocketRouteModuleKt$websocketRouteModule$1$$special$$inlined$miraiWebsocket$3$lambda$1.invoke(WebSocketRouteModule.kt)
	at net.mamoe.mirai.api.http.route.WebSocketRouteModuleKt$websocketRouteModule$1$$special$$inlined$miraiWebsocket$3$lambda$2.invokeSuspend(subscriber.kt:212)
	at net.mamoe.mirai.api.http.route.WebSocketRouteModuleKt$websocketRouteModule$1$$special$$inlined$miraiWebsocket$3$lambda$2.invoke(subscriber.kt)
	at net.mamoe.mirai.event.internal.Handler$onEvent$2.invokeSuspend(InternalEventListeners.kt:59)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

序列化 TempMessage 为 json 时失败

13:21:49 [INFO] [BOT 208924405] Event: TempMessage(sender=1846913566 from group(655057127), message=[mirai:source:-71290628]re)�[39;49m
13:21:50 [INFO] [NETWORK] Send done: Heartbeat.Alive�[39;49m
13:21:50 [INFO] [NETWORK] Event: Heartbeat.Alive.Response�[39;49m
13:21:50 �[38;5;196m[ERROR]�[39;49m [MiraiAPIHTTP] kotlinx.serialization.SerializationException: class net.mamoe.mirai.api.http.data.common.TempMessagePacketDto is not registered for polymorphic serialization in the scope of class net.mamoe.mirai.api.http.data.common.EventDTO
        at kotlinx.serialization.internal.AbstractPolymorphicSerializerKt.throwSubtypeNotRegistered(AbstractPolymorphicSerializer.kt:100)
        at kotlinx.serialization.internal.AbstractPolymorphicSerializerKt.throwSubtypeNotRegistered(AbstractPolymorphicSerializer.kt:103)
        at kotlinx.serialization.internal.AbstractPolymorphicSerializer.findPolymorphicSerializer(AbstractPolymorphicSerializer.kt:96)
        at kotlinx.serialization.json.internal.StreamingJsonOutput.encodeSerializableValue(StreamingJsonOutput.kt:231)
        at kotlinx.serialization.builtins.AbstractEncoder.encodeSerializableElement(AbstractEncoder.kt:72)
        at kotlinx.serialization.internal.ListLikeSerializer.serialize(CollectionSerializers.kt:76)
        at kotlinx.serialization.json.internal.StreamingJsonOutput.encodeSerializableValue(StreamingJsonOutput.kt:227)
        at kotlinx.serialization.builtins.AbstractEncoder.encodeSerializableElement(AbstractEncoder.kt:72)
        at net.mamoe.mirai.api.http.data.common.EventListRestfulResult.write$Self(RestfulResult.kt:30)
        at net.mamoe.mirai.api.http.data.common.EventListRestfulResult$$serializer.serialize(RestfulResult.kt)
        at net.mamoe.mirai.api.http.data.common.EventListRestfulResult$$serializer.serialize(RestfulResult.kt:28)
        at kotlinx.serialization.json.internal.StreamingJsonOutput.encodeSerializableValue(StreamingJsonOutput.kt:227)
        at kotlinx.serialization.EncodingKt.encode(Encoding.kt:402)
        at kotlinx.serialization.json.Json.stringify(Json.kt:100)
        at net.mamoe.mirai.api.http.route.MessageRouteModuleKt$messageModule$1$2.invokeSuspend(MessageRouteModule.kt:345)
        at net.mamoe.mirai.api.http.route.MessageRouteModuleKt$messageModule$1$2.invoke(MessageRouteModule.kt)
        at net.mamoe.mirai.api.http.route.BaseRouteKt$miraiGet$1$$special$$inlined$intercept$1.invokeSuspend(BaseRoute.kt:323)
        at net.mamoe.mirai.api.http.route.BaseRouteKt$miraiGet$1$$special$$inlined$intercept$1.invoke(BaseRoute.kt)
        at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:318)
        at io.ktor.util.pipeline.SuspendFunctionGun.proceed(PipelineContext.kt:163)
        at io.ktor.util.pipeline.SuspendFunctionGun.execute(PipelineContext.kt:183)
        at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:27)
        at io.ktor.routing.Routing.executeResult(Routing.kt:147)
        at io.ktor.routing.Routing.interceptor(Routing.kt:34)
        at io.ktor.routing.Routing$Feature$install$1.invokeSuspend(Routing.kt:99)
        at io.ktor.routing.Routing$Feature$install$1.invoke(Routing.kt)
        at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:318)
        at io.ktor.util.pipeline.SuspendFunctionGun.proceed(PipelineContext.kt:163)
        at io.ktor.features.CallLogging$Feature$install$2.invokeSuspend(CallLogging.kt:139)
        at io.ktor.features.CallLogging$Feature$install$2.invoke(CallLogging.kt)
        at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:318)
        at io.ktor.util.pipeline.SuspendFunctionGun.proceed(PipelineContext.kt:163)
        at io.ktor.util.pipeline.SuspendFunctionGun.execute(PipelineContext.kt:183)
        at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:27)
        at io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$2.invokeSuspend(DefaultEnginePipeline.kt:120)
        at io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$2.invoke(DefaultEnginePipeline.kt)
        at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:318)
        at io.ktor.util.pipeline.SuspendFunctionGun.proceed(PipelineContext.kt:163)
        at io.ktor.util.pipeline.SuspendFunctionGun.execute(PipelineContext.kt:183)
        at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:27)
        at io.ktor.server.cio.CIOApplicationEngine$startConnector$server$1$1.invokeSuspend(CIOApplicationEngine.kt:167)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

以上是使用 http 轮询方式获取, 而 websocket 则是:

13:25:14 [INFO] [BOT 208924405] Event: TempMessage(sender=1846913566 from group(655057127), message=[mirai:source:513235233]te)�[39;49m
13:25:14 [INFO] [BOT 208924405] An exception was thrown under a coroutine of Bot�[39;49m
13:25:14 [INFO] [NETWORK ERROR] kotlinx.serialization.SerializationException: class net.mamoe.mirai.api.http.data.common.TempMessagePacketDto is not registered for polymorphic serialization in the scope of class net.mamoe.mirai.api.http.data.common.EventDTO
        at kotlinx.serialization.internal.AbstractPolymorphicSerializerKt.throwSubtypeNotRegistered(AbstractPolymorphicSerializer.kt:100)
        at kotlinx.serialization.internal.AbstractPolymorphicSerializerKt.throwSubtypeNotRegistered(AbstractPolymorphicSerializer.kt:103)
        at kotlinx.serialization.internal.AbstractPolymorphicSerializer.findPolymorphicSerializer(AbstractPolymorphicSerializer.kt:96)
        at kotlinx.serialization.json.internal.StreamingJsonOutput.encodeSerializableValue(StreamingJsonOutput.kt:231)
        at kotlinx.serialization.EncodingKt.encode(Encoding.kt:402)
        at kotlinx.serialization.json.Json.stringify(Json.kt:100)
        at net.mamoe.mirai.api.http.route.WebSocketRouteModuleKt$websocketRouteModule$1$$special$$inlined$miraiWebsocket$1$lambda$1$1.invokeSuspend(WebSocketRouteModule.kt:135)
        at net.mamoe.mirai.api.http.route.WebSocketRouteModuleKt$websocketRouteModule$1$$special$$inlined$miraiWebsocket$1$lambda$1$1.invoke(WebSocketRouteModule.kt)
        at net.mamoe.mirai.event.SubscribeMessagesKt$subscribeMessages$4$1.invokeSuspend(subscribeMessages.kt:162)
        at net.mamoe.mirai.event.SubscribeMessagesKt$subscribeMessages$4$1.invoke(subscribeMessages.kt)
        at net.mamoe.mirai.event.SubscriberKt$subscribeAlways$3.invokeSuspend(subscriber.kt:246)
        at net.mamoe.mirai.event.SubscriberKt$subscribeAlways$3.invoke(subscriber.kt)
        at net.mamoe.mirai.event.internal.Handler$onEvent$2.invokeSuspend(InternalEventListeners.kt:76)
        at net.mamoe.mirai.event.internal.Handler$onEvent$2.invoke(InternalEventListeners.kt)
        at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:91)
        at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:154)
        at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
        at net.mamoe.mirai.event.internal.Handler.onEvent(InternalEventListeners.kt:76)
        at net.mamoe.mirai.event.internal.InternalEventListenersKt$callAndRemoveIfRequired$$inlined$forEachNode$lambda$1.invokeSuspend(InternalEventListeners.kt:167)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

真是给了我个大惊喜.

v1.5.0无法发送长消息

一次日志
https://paste.ubuntu.com/p/fWBwTDdZsM/
操作:

  • post /auth
  • post /verify
  • post /sendGroupMessage
{
  "sessionKey": ${"sessionKey"},
  "target": ${"GroupID"},
  "messageChain": [
  {
    "type": "Plain",
    "text": "先帝创业未半而中道崩殂,今天下三分,益州疲弊,此诚危急存亡之秋也。然侍卫之臣不懈于内,忠志之士忘身于外者,盖追先帝之殊遇,欲报之于陛下也。诚宜开张圣听,以光先帝遗德,恢弘志士之气,不宜妄自菲薄,引喻失义,以塞忠谏之路也。宫中府中,俱为一体,陟罚臧否,不宜异同。若有作奸犯科及为忠善者,宜付有司论其刑赏,以昭陛下平明之理,不宜偏私,使内外异法也。侍中、侍郎郭攸之、费祎、董允等,此皆良实,志虑忠纯,是以先帝简拔以遗陛下。愚以为宫中之事,事无大小,悉以咨之,然后施行,必能裨补阙漏,有所广益。将军向宠,性行淑均,晓畅军事,试用于昔日,先帝称之曰能,是以众议举宠为督。愚以为营中之事,悉以咨之,必能使行阵和睦,优劣得所。亲贤臣,远小人,此先汉所以兴隆也;亲小人,远贤臣,此后汉所以倾颓也。先帝在时,每与臣论此事,未尝不叹息痛恨于桓、灵也。侍中、尚书、长史、参军,此悉贞良死节之臣,愿陛下亲之信之,则汉室之隆,可计日而待也。臣本布衣,躬耕于南阳,苟全性命于乱世,不求闻达于诸侯。先帝不以臣卑鄙,猥自枉屈,三顾臣于草庐之中,咨臣以当世之事,由是感激,遂许先帝以驱驰。后值倾覆,受任于败军之际,奉命于危难之间,尔来二十有一年矣。先帝知臣谨慎,故临崩寄臣以大事也。受命以来,夙夜忧叹,恐托付不效,以伤先帝之明,故五月渡泸,深入不毛。今南方已定,兵甲已足,当奖率三军,北定中原,庶竭驽钝,攘除奸凶,兴复汉室,还于旧都。此臣所以报先帝而忠陛下之职分也。至于斟酌损益,进尽忠言,则攸之、祎、允之任也。愿陛下托臣以讨贼兴复之效,不效,则治臣之罪,以告先帝之灵。若无兴德之言,则责攸之、祎、允等之慢,以彰其咎;陛下亦宜自谋,以咨诹善道,察纳雅言。深追先帝遗诏,臣不胜受恩感激。今当远离,临表涕零,不知所言。"
  }
]
}

反馈

{
"code": 20,
"msg": "Bot被禁言"
}

此时bot并没有禁言。。

添加插件后报错

没添加插件前运行正常,添加后运行程序,报错如下

You are running Mirai-Console-Wrapper under /root/qqbot
Starting Mirai Console Pure, reset by clear /content/
Starting version check...
Fetching Newest Core Version ..
Fetching Newest Console Version of Pure
Local Core Version: 0.33.0 | Newest Core Version: 0.33.0
Local Console-Pure Version: 0.4.3 | Newest Console-Pure Version: 0.4.3
Version check complete, starting Mirai
shadow-Protocol:/root/qqbot/content/mirai-core-qqandroid-jvm-0.33.0.jar
Console :/root/qqbot/content/mirai-console-0.4.3.jar
Root :/root/qqbot/
00:32:35 [INFO] [Mirai 0.4.3 Pkmon] Mirai-console now running under /root/qqbot
00:32:35 [INFO] [Mirai 0.4.3 Pkmon] Get news in github: https://github.com/mamoe/mirai
00:32:35 [INFO] [Mirai 0.4.3 Pkmon] Mirai为开源项目,请自觉遵守开源项目协议
00:32:35 [INFO] [Mirai 0.4.3 Pkmon] Powered by Mamoe Technologies and contributors
00:32:35 [INFO] [Plugin Manager] 开始加载/root/qqbot/plugins/下的插件
00:32:35 [INFO] [Plugin Manager] loading plugin MiraiAPIHTTP
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at net.mamoe.mirai.console.wrapper.WrapperMain.start(WrapperMain.kt:150)
at net.mamoe.mirai.console.wrapper.WrapperMain.preStartInNonNative(WrapperMain.kt:133)
at net.mamoe.mirai.console.wrapper.WrapperMain.main(WrapperMain.kt:89)
Caused by: java.lang.LinkageError: loader constraint violation: when resolving method 'void net.mamoe.mirai.console.plugins.PluginBase.(kotlin.coroutines.CoroutineContext, int, kotlin.jvm.internal.DefaultConstructorMarker)' the class loader net.mamoe.mirai.console.plugins.PluginClassLoader @7c1e2a2d of the current class, net/mamoe/mirai/api/http/HttpApiPluginBase, and the class loader net.mamoe.mirai.console.wrapper.MiraiClassLoader @23202fce for the method's defining class, net/mamoe/mirai/console/plugins/PluginBase, have different Class objects for the type kotlin/jvm/internal/DefaultConstructorMarker used in the signature (net.mamoe.mirai.api.http.HttpApiPluginBase is in unnamed module of loader net.mamoe.mirai.console.plugins.PluginClassLoader @7c1e2a2d, parent loader net.mamoe.mirai.console.plugins.PluginsClassLoader @2f16c6b3; net.mamoe.mirai.console.plugins.PluginBase is in unnamed module of loader net.mamoe.mirai.console.wrapper.MiraiClassLoader @23202fce, parent loader 'bootstrap')
at net.mamoe.mirai.api.http.HttpApiPluginBase.(HttpApiPluginBase.kt:24)
at net.mamoe.mirai.api.http.HttpApiPluginBase.(HttpApiPluginBase.kt:24)
at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1042)
at java.base/jdk.internal.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
at java.base/jdk.internal.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:186)
at java.base/java.lang.reflect.Field.acquireFieldAccessor(Field.java:1105)
at java.base/java.lang.reflect.Field.getFieldAccessor(Field.java:1086)
at java.base/java.lang.reflect.Field.get(Field.java:418)
at kotlin.reflect.jvm.internal.KClassImpl$Data$objectInstance$2.invoke(KClassImpl.kt:114)
at kotlin.reflect.jvm.internal.ReflectProperties$LazyVal.invoke(ReflectProperties.java:62)
at kotlin.reflect.jvm.internal.ReflectProperties$Val.getValue(ReflectProperties.java:31)
at kotlin.reflect.jvm.internal.KClassImpl$Data.getObjectInstance(KClassImpl.kt)
at kotlin.reflect.jvm.internal.KClassImpl.getObjectInstance(KClassImpl.kt:239)
at net.mamoe.mirai.console.plugins.PluginManager$loadPlugins$4.invoke(PluginManager.kt:181)
at net.mamoe.mirai.console.plugins.PluginManager.loadPlugins(PluginManager.kt:206)
at net.mamoe.mirai.console.MiraiConsole.start(MiraiConsole.kt:85)
at net.mamoe.mirai.console.pure.MiraiConsolePureLoader$Companion.load(MiraiConsolePureLoader.kt:22)
at net.mamoe.mirai.console.pure.MiraiConsolePureLoader.load(MiraiConsolePureLoader.kt)
... 7 more

[v1.3.1] 无法发送消息

Win10 18363 (1909)
Oracle Java 1.8.0_221 64位
mirai-api-http版本:v1.3.1
mirai-console版本:0.3.7
mirai-core-jvm版本:0.30.0
mirai-core-qqandroid-jvm版本:0.30.0
登录QQ正常,AuthKey + Verify正常,调用sendFriendMessage和sendGroupMessage接口时报错:

[0m 00:59:05 �[38;5;196m[ERROR]�[39;49m [MiraiAPIHTTP] java.lang.NoSuchMethodError: net.mamoe.mirai.message.data.PlainText.constructor-impl(Ljava/lang/String;)Ljava/lang/String;
        at net.mamoe.mirai.api.http.data.common.MessageDTOKt.toMessage(MessageDTO.kt:156)
        at net.mamoe.mirai.api.http.data.common.MessageDTOKt.toMessageChain(MessageDTO.kt:130)
        at net.mamoe.mirai.api.http.route.MessageRouteModuleKt$messageModule$1$$special$$inlined$miraiVerify$1$1.invokeSuspend(BaseRoute.kt:326)
        at net.mamoe.mirai.api.http.route.MessageRouteModuleKt$messageModule$1$$special$$inlined$miraiVerify$1$1.invoke(BaseRoute.kt)
        at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:318)
        at io.ktor.util.pipeline.SuspendFunctionGun.proceed(PipelineContext.kt:163)
        at io.ktor.util.pipeline.SuspendFunctionGun.execute(PipelineContext.kt:183)
        at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:27)
        at io.ktor.routing.Routing.executeResult(Routing.kt:147)
        at io.ktor.routing.Routing.interceptor(Routing.kt:34)
        at io.ktor.routing.Routing$Feature$install$1.invokeSuspend(Routing.kt:99)
        at io.ktor.routing.Routing$Feature$install$1.invoke(Routing.kt)
        at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:318)
        at io.ktor.util.pipeline.SuspendFunctionGun.proceed(PipelineContext.kt:163)
        at io.ktor.features.CallLogging$Feature$install$2.invokeSuspend(CallLogging.kt:139)
        at io.ktor.features.CallLogging$Feature$install$2.invoke(CallLogging.kt)
        at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:318)
        at io.ktor.util.pipeline.SuspendFunctionGun.proceed(PipelineContext.kt:163)
        at io.ktor.util.pipeline.SuspendFunctionGun.execute(PipelineContext.kt:183)
        at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:27)
        at io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$2.invokeSuspend(DefaultEnginePipeline.kt:120)
        at io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$2.invoke(DefaultEnginePipeline.kt)
        at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:318)
        at io.ktor.util.pipeline.SuspendFunctionGun.proceed(PipelineContext.kt:163)
        at io.ktor.util.pipeline.SuspendFunctionGun.execute(PipelineContext.kt:183)
        at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:27)
        at io.ktor.server.cio.CIOApplicationEngine$startConnector$server$1$1.invokeSuspend(CIOApplicationEngine.kt:167)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

回退mirai-core-jvm, mirai-core-qqandroid-jvm到0.29.1后(通过修改文件后缀名跳过了强制更新),登录QQ(login)指令时报错,无法收到消息,调HTTP接口发送消息时始终返回错误:5 发送消息目标不存在(指定对象不存在)

�[0m 01:13:33 [INFO] [Mirai 0.3.7 Pkmon] java.lang.NoSuchMethodError: net.mamoe.mirai.Bot.login(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
        at net.mamoe.mirai.console.command.DefaultCommands$invoke$2$1.invokeSuspend(DefaultCommands.kt:139)
        at net.mamoe.mirai.console.command.DefaultCommands$invoke$2$1.invoke(DefaultCommands.kt)
        at net.mamoe.mirai.console.command.AnonymousCommand.onCommand(Command.kt:124)
        at net.mamoe.mirai.console.command.CommandManager.processCommandImpl(CommandManager.kt:154)
        at net.mamoe.mirai.console.command.CommandManager$processCommand$2.invokeSuspend(CommandManager.kt:144)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

fetchMessage 时报错

Unknown error @ fetchMessage: Request failed with status code 500

09:46:27[ERROR][MiraiAPIHTTP] java.lang.NoClassDefFoundError: Could not initialize class net.mamoe.mirai.api.http.util.FaceMap
        at net.mamoe.mirai.api.http.data.common.MessageDTOKt.toDTO(MessageDTO.kt:152)
        at net.mamoe.mirai.api.http.data.common.MessageDTOKt.toDTO(MessageDTO.kt:215)
        at net.mamoe.mirai.api.http.data.common.BotEventDTOKt.toDTO(BotEventDTO.kt:22)
        at net.mamoe.mirai.api.http.queue.MessageQueue.fetch(MessageQueue.kt:27)

        at net.mamoe.mirai.api.http.route.MessageRouteModuleKt$messageModule$1$1.invokeSuspend(MessageRouteModule.kt:38)
        at net.mamoe.mirai.api.http.route.MessageRouteModuleKt$messageModule$1$1.invoke(MessageRouteModule.kt)
        at net.mamoe.mirai.api.http.route.BaseRouteKt$miraiGet$1$$special$$inlined$intercept$1.invokeSuspend(BaseRoute.kt:323)
        at net.mamoe.mirai.api.http.route.BaseRouteKt$miraiGet$1$$special$$inlined$intercept$1.invoke(BaseRoute.kt)

该插件在Core0.32.0 Console0.4.2 无法验证会话

日志:

10:55:57 [ERROR] [MiraiAPIHTTP] java.lang.NoClassDefFoundError: net/mamoe/mirai/utils/PlatformUtilsJvmKt
at net.mamoe.mirai.api.http.AuthedSession.(Session.kt:185)
at net.mamoe.mirai.api.http.SessionManager.createAuthedSession(Session.kt:62)
at net.mamoe.mirai.api.http.route.AuthRouteModuleKt$authModule$1$$special$$inlined$miraiVerify$1$1.invokeSuspend(BaseRoute.kt:328)
at net.mamoe.mirai.api.http.route.AuthRouteModuleKt$authModule$1$$special$$inlined$miraiVerify$1$1.invoke(BaseRoute.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:318)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(PipelineContext.kt:163)
at io.ktor.util.pipeline.SuspendFunctionGun.execute(PipelineContext.kt:183)
at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:27)
at io.ktor.routing.Routing.executeResult(Routing.kt:147)
at io.ktor.routing.Routing.interceptor(Routing.kt:34)
at io.ktor.routing.Routing$Feature$install$1.invokeSuspend(Routing.kt:99)
at io.ktor.routing.Routing$Feature$install$1.invoke(Routing.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:318)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(PipelineContext.kt:163)
at io.ktor.features.CallLogging$Feature$install$2.invokeSuspend(CallLogging.kt:139)
at io.ktor.features.CallLogging$Feature$install$2.invoke(CallLogging.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:318)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(PipelineContext.kt:163)
at io.ktor.util.pipeline.SuspendFunctionGun.execute(PipelineContext.kt:183)
at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:27)
at io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$2.invokeSuspend(DefaultEnginePipeline.kt:120)
at io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$2.invoke(DefaultEnginePipeline.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:318)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(PipelineContext.kt:163)
at io.ktor.util.pipeline.SuspendFunctionGun.execute(PipelineContext.kt:183)
at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:27)
at io.ktor.server.cio.CIOApplicationEngine$startConnector$server$1$1.invokeSuspend(CIOApplicationEngine.kt:167)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

复现:

使用最新的wrapper下载依赖并启动
将该插件丢进plugins文件夹里
进后台reload重载
根据文档发送post请求 /auth 得到未验证的sessionKey
再发送post请求 /verify 以绑定sessionKey http报错500 net/mamoe/mirai/utils/PlatformUtilsJvmKt
后台日志如上

SendGroupMessage 返回数据为 sequenceId not yet available

请求地址: http://127.0.0.1:789/sendGroupMessage
请求内容:
{"messageChain":[{"text":"你今天共有 ","type":"Plain"},{"text":"3","type":"Plain"},{"text":" 节课\n","type":"Plain"},{"text":"1","type":"Plain"},{"text":". ","type":"Plain"},{"text":"船舶材料力学","type":"Plain"},{"text":",","type":"Plain"},{"text":"A01 - 330","type":"Plain"},{"text":",","type":"Plain"},{"text":"8:20 - 10:00","type":"Plain"},{"text":"\n","type":"Plain"},{"text":"2","type":"Plain"},{"text":". ","type":"Plain"},{"text":"大学英语拓展课程(Ⅱ)","type":"Plain"},{"text":",","type":"Plain"},{"text":"A01 - 317","type":"Plain"},{"text":",","type":"Plain"},{"text":"14:00 - 15:40","type":"Plain"},{"text":"\n","type":"Plain"},{"text":"3","type":"Plain"},{"text":". ","type":"Plain"},{"text":"船舶静力学","type":"Plain"},{"text":",","type":"Plain"},{"text":"A01 - 118","type":"Plain"},{"text":",","type":"Plain"},{"text":"16:00 - 17:40","type":"Plain"},{"text":"\n","type":"Plain"}],"sessionKey":"QmfivD1A","target":1029259687}
返回数据: sequenceId not yet available

虽然返回数据是sequenceId not yet available,但是QQ群能收到消息(消息成功发出去了)。
在调用SendTempMessage时有同样的返回值,但是临时消息没有成功发出去,对方收不到。
在调用SendFriendMessage时没有错误。

修改建议:出错之后返回的数据还是 json 格式,把错误放到 msg 里。

版本信息:
mirai v0.35.7
mirai-http-api v1.6.3

core0.32.0无法加载该插件v1.4.0

日志如下
$ java -Xmx512M -jar mirai-console-wrapper-0.2.0-all.jar
You are running Mirai-Console-Wrapper under /home/app/qqbot
Starting Mirai Console Pure, reset by clear /content/
Starting version check...
Fetching Newest Core Version ..
Fetching Newest Console Version of Pure
Local Console-Pure Version: 0.4.2 | Newest Console-Pure Version: 0.4.2
Local Core Version: 0.32.0 | Newest Core Version: 0.32.0
Version check complete, starting Mirai
shadow-Protocol:/home/app/qqbot/content/mirai-core-qqandroid-jvm-0.32.0.jar
Console :/home/app/qqbot/content/mirai-console-0.4.2.jar
Root :/home/app/qqbot/
10:04:11 [INFO] [Mirai 0.4.2 Pkmon] Mirai-console now running under /home/app/qqbot
10:04:11 [INFO] [Mirai 0.4.2 Pkmon] Get news in github: https://github.com/mamoe/mirai
10:04:11 [INFO] [Mirai 0.4.2 Pkmon] Mirai为开源项目,请自觉遵守开源项目协议
10:04:11 [INFO] [Mirai 0.4.2 Pkmon] Powered by Mamoe Technologies and contributors
10:04:11 [INFO] [Plugin Manager] 开始加载/home/app/qqbot/plugins/下的插件
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.mamoe.mirai.console.wrapper.WrapperMain.start(WrapperMain.kt:150)
at net.mamoe.mirai.console.wrapper.WrapperMain.preStartInNonNative(WrapperMain.kt:133)
at net.mamoe.mirai.console.wrapper.WrapperMain.main(WrapperMain.kt:89)
Caused by: java.lang.NoClassDefFoundError: org/yaml/snakeyaml/Yaml
at net.mamoe.mirai.console.plugins.YamlConfig.deserialize(ConfigSection.kt:527)
at net.mamoe.mirai.console.plugins.FileConfigImpl$content$2.invoke(ConfigSection.kt:443)
at net.mamoe.mirai.console.plugins.FileConfigImpl$content$2.invoke(ConfigSection.kt:428)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at net.mamoe.mirai.console.plugins.FileConfigImpl.getContent(ConfigSection.kt)
at net.mamoe.mirai.console.plugins.FileConfigImpl.get(ConfigSection.kt:476)
at net.mamoe.mirai.console.plugins.ConfigSection$DefaultImpls.getString(ConfigSection.kt:288)
at net.mamoe.mirai.console.plugins.FileConfigImpl.getString(ConfigSection.kt:428)
at net.mamoe.mirai.console.plugins.PluginDescription$Companion.readFromContent(PluginBase.kt:152)
at net.mamoe.mirai.console.plugins.PluginManager.loadPlugins(PluginManager.kt:91)
at net.mamoe.mirai.console.MiraiConsole.start(MiraiConsole.kt:85)
at net.mamoe.mirai.console.pure.MiraiConsolePureLoader$Companion.load(MiraiConsolePureLoader.kt:22)
at net.mamoe.mirai.console.pure.MiraiConsolePureLoader.load(MiraiConsolePureLoader.kt)
... 7 more
Caused by: java.lang.ClassNotFoundException: org.yaml.snakeyaml.Yaml
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
... 20 more

拆分文档

一个文档太难长了,难得写也难得查看

撤回好友消息返回状态码不正确

简介

撤回好友消息返回状态码不符合业务逻辑。

API:/recall

可复现:

操作步骤

  1. 使用/sendFriendMessage向任意好友发送消息。
  2. 使用/recall撤回消息。

预期结果

  1. 消息成功发送。
  2. 消息成功撤回并返回:
{
    "code": 0,
    "msg": "success"
}

实际结果

  1. 消息成功发送。
  2. 消息成功撤回并返回:
{
    "code": 20,
    "msg": "Bot被禁言"
}

[功能请求] docker镜像

rt

好处:

  1. 无需java环境
  2. 方便挂在后台运行
  3. 内置适配当前版本的mirai-console,避免冲突

无法接收引用消息

引用消息的示意图

预期

文档中所述,格式为:

{
    "type": "Quote",
    "id": 123456,
    "groupId": 123456789,
    "senderId": 987654321,
    "targetId": 9876543210,
    "origin": [
        { "type": "Plain", text: "text" }
    ] 
}

实际

{'code': 5, 'msg': '指定对象不存在'}

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

shows it when starting mirai with mirai-http-api

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".                 SLF4J: Defaulting to no-operation (NOP) logger implementation                    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

and when i post to server using curl

curl -X POST -d '{"authKey":"my_key"}' http://192.168.1.2:8080/auth

it got error and then api server shutdown automatically.

java.lang.NoSuchMethodError: 'void io.ktor.server.cio.backend.ServerIncomingConnection.<init>(io.ktor.utils.io.ByteReadChannel, io.ktor.utils.io.ByteWriteChannel, java.net.SocketAddress, java.net.SocketAddress)'                                        at io.ktor.server.cio.backend.HttpServerKt$httpServer$acceptJob$1.invokeSuspend(HttpServer.kt:58)                                                                 at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)                                                                         at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)                   at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)                                                                          at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)                                                                 at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)                                                                   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

请求添加 CORS 支持

Access to XMLHttpRequest at 'http://127.0.0.1:8081/auth' from origin 'http://127.0.0.1:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
添加 Access-Control-Allow-Origin 用于前端跨域请求直接调用 mirai

配置类似:

authKey: foobarbaz
port: 8081
CORS: 127.0.0.1:8080

0.27.0发送图片不稳定

偶尔尝试发图的时候mirai-console会报错

java.lang.IllegalStateException: send message failed: MessageSvc.PbSendMsg.Response.Failed(resultType=34, errorCode=0, errorMessage=)
        at net.mamoe.mirai.qqandroid.GroupImpl.sendMessage(ContactImpl.kt:603)
        at net.mamoe.mirai.qqandroid.GroupImpl$sendMessage$1.invokeSuspend(ContactImpl.kt)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

我也在尝试去寻找一个比较稳定的复现方式。稍微测试了一下,当单条消息发送超过五张图片的时候会发送失败,但是有的时候发两张不同的图也会失败。
按照我对文档的理解,我发图的过程是,先调用/uploadImage接口去上传图片,然后把该接口返回值里添加一条{"type": "Image"}直接作为messageChain的元素进行发送。
测试用的大致的封包结构:

{
    "target":111111,
    "messageChain":[
        {
            "imageId":"{11}.jpg",
            "url":"http://gchat.qpic.cn/gchatpic_new/01/0",
            "type":"Image"
        },
        {
            "imageId":"{11}.jpg",
            "url":"http://gchat.qpic.cn/gchatpic_new/01/0",
            "type":"Image"
        },
        {
            "type":"Plain",
            "text":"abfbfdbc"
        },
        {
            "imageId":"{11}.jpg",
            "url":"http://gchat.qpic.cn/gchatpic_new/01/0",
            "type":"Image"
        },
    ],
    "sessionKey":"absdcsd"
}

修改群成员信息返回值不正常;kick群成员报错

POST /memberInfo HTTP/1.1
Content-Length: 161
Content-Type: application/json;charset=UTF-8
Host: 127.0.0.1:5710
{
  	"sessionKey": "I8OXUhZl",
	"target": 1048307612,
	"memberId": 1786630005
    "info": {
        "name": "凋零",
        "specialTitle": "星号酱"
    }
}

HTTP/1.1 200 OK
Date: Thu, 09 Apr 2020 14:27:38 GMT
Server: Application/debug ktor/debug
Content-Length: 35
Content-Type: application/json; charset=UTF-8
Connection: keep-alive
{"code":10,"msg":"无操作权限"}

此时群成员已改名

POST /kick HTTP/1.1
Content-Length: 105
Content-Type: application/json;charset=UTF-8
Host: 127.0.0.1:5710
{
  	"sessionKey": "I8OXUhZl",
	"target": 1048307612,
	"memberId": 1786630005
    "msg": "踢人测试"
}

HTTP/1.1 500 Internal Server Error
Date: Thu, 09 Apr 2020 14:32:37 GMT
Server: Application/debug ktor/debug
Content-Length: 25
Content-Type: text/plain; charset=UTF-8
Connection: keep-alive
kick failed: 踢人测试

log:

 22:36:18 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x8a0_0
 22:36:18 [INFO] [ConsoleAddition] [NETWORK] Event: TroopManagement.Kick.Response(false)
 22:36:18 [ERROR] [MiraiAPIHTTP] java.lang.IllegalStateException: kick failed: 踢人测试
        at net.mamoe.mirai.qqandroid.contact.MemberImpl.kick(MemberImpl.kt:184)
        at net.mamoe.mirai.qqandroid.contact.MemberImpl$kick$1.invokeSuspend(MemberImpl.kt)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:32)
        at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:113)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

此时群成员已被踢出

Reload时抛出错误

java.net.BindException: Address already in use: bind
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Unknown Source)
        at sun.nio.ch.Net.bind(Unknown Source)
        at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
        at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
        at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
        at io.ktor.network.sockets.TcpSocketBuilder.bind(Builders.kt:125)
        at io.ktor.network.sockets.TcpSocketBuilder.bind(Builders.kt:92)
        at io.ktor.network.sockets.TcpSocketBuilder.bind$default(Builders.kt:91)
        at io.ktor.server.cio.backend.HttpServerKt$httpServer$acceptJob$1.invokeSuspend(HttpServer.kt:44)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

sendFriendMessage会报错

sendFriendMessage会报这个错误net.mamoe.mirai.message.data.MessageChainBuilder.(Ljava/util/Collection;ILkotlin/jvm/internal/DefaultConstructorMarker;)V

连续运行大约三四天后出现 OutOfMemoryError

Core 版本 0.37.0
Console Wrapper 0.2.0
HTTP API版本 1.6.3
指定 cache size 128

cat mirai/plugins/MiraiAPIHTTP/setting.yml
authKey: abcdefgh
port: 18080
cacheSize: 128
# enableWebsocket: no
enableWebsocket: yes

期间使用mirai水群作为压力测试来源,在收到约几千条到一万条消息后出现 OutOfMemoryError。
内存占用约300M,实际内存和swap仍有足够的剩余。

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "kotlinx.coroutines.DefaultExecutor"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "DefaultDispatcher-worker-41"
Exception in thread "DefaultDispatcher-worker-3" java.lang.OutOfMemoryError: Java heap space

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "kotlinx.coroutines.DefaultExecutor"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "kotlinx.coroutines.DefaultExecutor"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "DefaultDispatcher-worker-17"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "kotlinx.coroutines.DefaultExecutor"
 08:20:58 [ERROR] [MiraiAPIHTTP] java.lang.OutOfMemoryError: Java heap space

 06:45:12 [ERROR] [MiraiAPIHTTP] java.lang.OutOfMemoryError: Java heap space

 06:45:36 [ERROR] [MiraiAPIHTTP] java.lang.OutOfMemoryError: Java heap space

 06:45:36 [ERROR] [MiraiAPIHTTP] java.lang.OutOfMemoryError: Java heap space

 06:45:48 [ERROR] [MiraiAPIHTTP] java.lang.OutOfMemoryError: Java heap space

 07:45:55 [ERROR] [MiraiAPIHTTP] java.lang.OutOfMemoryError: Java heap space

 09:10:59 [ERROR] [MiraiAPIHTTP] java.lang.OutOfMemoryError: Java heap space

 09:11:09 [ERROR] [MiraiAPIHTTP] java.lang.OutOfMemoryError: Java heap space

 09:15:24 [ERROR] [MiraiAPIHTTP] java.lang.OutOfMemoryError: Java heap space

其他用户 Quote bot消息时,quote id 一直是 0

Core版本 V0.37.4
Console版本 V0.4.9
HTTPAPI 版本 V1.6.3
其他插件: console-addition V0.2.3

02:36:52 [INFO] [BOT xxxxx] [bot起飞(xxxx)] (xxxx) -> [mirai:source:1214129823][mirai:at:xxxxx] 233[mirai:quote:0]

QQ1: quote 一个 bot 发送的消息 (不是bot发送的也行,例如用户1和用户2互相quote)

Bot 收到消息的 quote id 一直是 0 (应为 bot 发送的消息的id)

(以前64位message id的时候 seq id是正常的,random有的平台是0)

希望能获取到quote部分的seq id,对random没有需求

1.4.0在群聊内回复带图片消息数据异常

测试用封包结构

{
  "target": 111111,
  "messageChain": [
    {
      "type": "Quote",
      "id": 111111111,
      "groupId": 1111111111,
      "senderId": 1111111111,
      "origin": [
        {
          "type": "Plain",
          "text": "test "
        },
        {
          "type": "Image",
          "imageId": "{111111111111111111}.jpg",
          "url": "http://gchat.qpic.cn/gchatpic_new/11111111111111",
          "path": null
        }
      ]
    },
    {
      "type": "Plain",
      "text": "response here"
    }
  ],
  "quote": 111111111111111,
  "sessionKey": "1111111111111111111111"
}

返回

{"code":20,"msg":"Bot被禁言"}

但实际上bot并没有被禁言,并且回复纯文本信息没有任何问题。
mirai-console返回信息

Received: MessageSvc.PbSendMsg.Response.Failed(resultType=34, errorCode=0, errorMessage=)

关于从/fetchMessage返回的数据格式不统一

当前/fetchMessage返回的数据不统一:
若获取成功,返回的是数组[...],若失败,却返回的JSON{...}
我觉得应该做到返回数据的格式的统一,以更方便解析并减少解析成本(?)。

{
code: 0,
data: [...]
}

/countMessage 与其他 API 格式不一致

文档中写到返回的 json 对象有一个 "errorMessage" 域,而其他的 API 在出错时给的错误信息都是用 "msg",不知道是文档问题还是确实如此。

NoSuchMethodError: io.ktor.server.cio.backend.ServerIncomingConnection.<init>

问题描述

mirai-api-http-v1.2.2.jar放入plugins/内后访问服务器8080端口后程序抛出异常。

重现步骤

  1. java -jar mirai_console.jar

日志

nutr1t07@iZ9zacvzwqpz8vZ:~/mirai$ java -jar mirai_console.jar                 
You are running Mirai-Console-Wrapper under /home/nutr1t07/mirai
Starting Mirai Console Pure, reset by clear /content/
Starting version check...
Fetching Newest Core Version .. 
Fetching Newest Console Version of Pure
Local Core Version: 0.27.0 | Newest Core Version: 0.27.0
Local Console-Pure Version: 0.3.4 | Newest Console-Pure Version: 0.3.4
Version check complete, starting Mirai
Core    :/home/nutr1t07/mirai/content/mirai-core-jvm-0.27.0.jar
Protocol:/home/nutr1t07/mirai/content/mirai-core-qqandroid-jvm-0.27.0.jar
Console :/home/nutr1t07/mirai/content/mirai-console-0.3.4.jar
Root    :/home/nutr1t07/mirai/
 10:19:40 [Mirai 0.3.4 Pkmon]: Mirai-console now running under /home/nutr1t07/mirai
 10:19:40 [Mirai 0.3.4 Pkmon]: Get news in github: https://github.com/mamoe/mirai
 10:19:40 [Mirai 0.3.4 Pkmon]: Mirai为开源项目,请自觉遵守开源项目协议
 10:19:40 [Mirai 0.3.4 Pkmon]: Powered by Mamoe Technologies and contributors
 10:19:41 [Plugin Manager]: 开始加载/home/nutr1t07/mirai/plugins/下的插件
 10:19:41 [Plugin Manager]: loading plugin MiraiAPIHTTP
 10:19:41 [Plugin Manager]: successfully loaded plugin MiraiAPIHTTP version v1.2.2 by ryoii
 10:19:41 [Plugin Manager]: Mirai HTTP API Server Plugin
 10:19:41 [MiraiAPIHTTP]: Loading Mirai HTTP API plugin
 10:19:41 [MiraiAPIHTTP]: Trying to Start Mirai HTTP Server in 0.0.0.0:8080
 10:19:41 [MiraiAPIHTTP]: Starting Mirai HTTP Server in 0.0.0.0:8080
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Mirai HTTP API 10:19:41 : Http api server is running with authKey: 1234567890
 10:19:41 [Plugin Manager]: 加载了1个插件
 10:19:41 [Mirai 0.3.4 Pkmon]: Mirai-console 启动完成
 10:19:41 [Mirai 0.3.4 Pkmon]: "/login qqnumber qqpassword " to login a bot
 10:19:41 [Mirai 0.3.4 Pkmon]: "/login qq号 qq密码 " 来登录一个BOT
java.lang.NoSuchMethodError: io.ktor.server.cio.backend.ServerIncomingConnection.<init>(Lio/ktor/utils/io/ByteReadChannel;Lio/ktor/utils/io/ByteWriteChannel;Ljava/net/SocketAddress;Ljava/net/SocketAddress;)V
        at io.ktor.server.cio.backend.HttpServerKt$httpServer$acceptJob$1.invokeSuspend(HttpServer.kt:58)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

配置文件

MiraiAPIHTTP/setting.yml

port: 8080
authKey: 1234567890
cacheSize: 4096
enableWebsocket: false

环境

  • Debian 9.12 stretch
  • java
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-1~deb9u1-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)
  • mirai-console wrapper-0.1.2
  • mirai-api-http 1.2.2

文字图片混合消息中图片的url无效

描述

通过 WebSocket 取得的消息中,文字与图片的混合消息内图片的url是图片的根域名http://c2cpicdw.qpic.cn

日志

  • 混合消息
{
    "type":"FriendMessage",
    "messageChain":[
        {
            "type":"Plain",
            "text":""
        },
        {
            "type":"Image",
            "imageId":"/477e9c20-bd66-4384-8157-10737381be40",
            "url":"http://c2cpicdw.qpic.cn",
            "path":null
        }
    ]
}
  • 单独的图片消息
{
    "type":"FriendMessage",
    "messageChain":[
        {
            "type":"Image",
            "imageId":"/ec65388e-3413-4af1-b3b2-d2600a8093a0",
            "url":"http://c2cpicdw.qpic.cn/offpic_new/xxxxxxxqqid//ec65388e-3413-4af1-b3b2-d2600a8093a0/0?term=2",
            "path":null
        }
    ]
}

一些无关信息已省略

环境

mirai-core: 0.32.0
mirai-console Pure: 0.4.2
mirai-api-http: 1.4.1

文件上传失败

故障现象:
无法使用[POST] /uploadImage发送本地已有的图片
若从消息中获取图片,可以正常直接转发

环境: centos7
jre版本: server-jre-8u241-linux-x64.tar.gz
Mirai console: Pure 0.3.5
使用语言:python 3.7
py脚本与mirai在同一台服务器

故障py代码

def init_session():
    session_key = json.loads(requests.post(mirai_api_http_locate+'/auth',json={"authKey":authKey}).text)['session']
    code = json.loads(requests.post(mirai_api_http_locate + '/verify', json={"sessionKey": session_key,"qq":qq}).text)['code']
    return code,session_key  #返回0为正常

code,session_key  =init_session()
print(session_key)
if not code:
    files = {'sessionKey': (None, session_key),"type": (None, "group"), 'img': ('file.jpg', open('1.jpg', 'rb'), 'image/jpeg')}
    r = requests.post(mirai_api_http_locate + '/uploadImage', files=files)
    print(r.text)

运行后控制台输出:

Unable to read file(path=/root/qqbot/plugins/MiraiAPIHTTP/images/file.jpg), no ImageReader found (file type not supported)

服务器端输出:

[ERROR] [MiraiAPIHTTP] net.mamoe.mirai.utils.ExternalImageJvmKt.toExternalImage(ExternalImageJvm.kt:69)
net.mamoe.mirai.message.SendImageUtilsJvmKt$uploadAsImage$8.invokeSuspend(SendImageUtilsJvm.kt:120)
kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

发现服务器端存在file.jpg,且与上传的1.jpg相同.

已存在的配置文件无法加载,载入默认配置?

当我更新core并载入插件时

^C 11:08:39 [INFO] [ConsoleAddition] [BOT 3173857429] Event: GroupRecall(bot=Bot                                                                                                                     (3173857429), authorId=750733195, messageId=683911134, messageTime=1586315313, o                                                                                                                     perator=Member(750733195), group=Group(330986863))
 11:08:39 [INFO] [ConsoleAddition] [NETWORK] Event: MultiPacketBySequence
 11:08:39 [INFO] [ConsoleAddition] [NETWORK] Send: OnlinePush.RespPush
[root@izne820n1d82x2z qqbot]# java -jar mirai-console-wrapper-0.2.0-all.jar
You are running Mirai-Console-Wrapper under /home/app/qqbot
Starting Mirai Console Pure, reset by clear /content/
Starting version check...
Fetching Newest Core Version ..
Fetching Newest Console Version of Pure
Local Console-Pure Version: 0.4.6 | Newest Console-Pure Version: 0.4.7
Updating Console-Pure from V0.4.6 -> V0.4.7, this is a force update
Local Core Version: 0.34.0 | Newest Core Version: 0.34.0
Mirai Downloader
[Mirai国内镜像] 感谢崔Cloud慷慨提供免费的国内储存分发
Progress: ########################################  | Complete
Version check complete, starting Mirai
shadow-Protocol:/home/app/qqbot/content/mirai-core-qqandroid-jvm-0.34.0.jar
Console        :/home/app/qqbot/content/mirai-console-0.4.7.jar
Root           :/home/app/qqbot/
 11:08:49 [INFO] [Mirai 0.4.7 Pkmon] Mirai-console now running under /home/app/q                                                                                                                     qbot
 11:08:49 [INFO] [Mirai 0.4.7 Pkmon] Get news in github: https://github.com/mamo                                                                                                                     e/mirai
 11:08:49 [INFO] [Mirai 0.4.7 Pkmon] Mirai为开源项目,请自觉遵守开源项目协议
 11:08:49 [INFO] [Mirai 0.4.7 Pkmon] Powered by Mamoe Technologies and contribut                                                                                                                     ors
 11:08:50 [INFO] [Plugin Manager] 开始加载/home/app/qqbot/plugins/下的插件
 11:08:50 [INFO] [Plugin Manager] loading plugin ConsoleAddition
 11:08:50 [INFO] [Plugin Manager] successfully loaded plugin ConsoleAddition ver                                                                                                                     sion V0.2.3 by ryoii
 11:08:50 [INFO] [Plugin Manager] Mirai-console的增强插件,添加若干常用的命令
 11:08:50 [INFO] [Plugin Manager] loading plugin Ghs
 11:08:50 [INFO] [Plugin Manager] successfully loaded plugin Ghs version 0.1.0 b                                                                                                                     y evrstr
 11:08:50 [INFO] [Plugin Manager] ghs插件
 11:08:50 [INFO] [Plugin Manager] loading plugin MiraiAPIHTTP
 11:08:50 [INFO] [Plugin Manager] successfully loaded plugin MiraiAPIHTTP versio                                                                                                                     n v1.5.1 by ryoii
 11:08:50 [INFO] [Plugin Manager] Mirai HTTP API Server Plugin
 11:08:50 [INFO] [ConsoleAddition] 3173857429
 11:08:50 [INFO] [ConsoleAddition] 读取了1个bot信息
 11:08:50 [INFO] [MiraiAPIHTTP] Loading Mirai HTTP API plugin
 11:08:50 [INFO] [MiraiAPIHTTP] Trying to Start Mirai HTTP Server in 0.0.0.0:808                                                                                                                     0
 11:08:50 [WARNING] [MiraiAPIHTTP] USING INITIAL KEY, please edit the key
 11:08:50 [INFO] [ConsoleAddition] 正在自动登录3173857429
 11:08:50 [INFO] [ConsoleAddition] [Bot md5 Login] login...
 11:08:50 [INFO] [Ghs] PingMyMCServer Enabled
 11:08:50 [INFO] [MiraiAPIHTTP] Starting Mirai HTTP Server in 0.0.0.0:8080
Mirai HTTP API 11:08:50 : Http api server is running with authKey: INITKEYXQl19i                                                                                                                     AO
 11:08:50 [INFO] [Plugin Manager] 加载了3个插件
 11:08:50 [INFO] [Mirai 0.4.7 Pkmon] Mirai-console 启动完成
 11:08:50 [INFO] [Mirai 0.4.7 Pkmon] "/login qqnumber qqpassword " to login a bo                                                                                                                     t
 11:08:50 [INFO] [Mirai 0.4.7 Pkmon] "/login qq号 qq密码 " 来登录一个BOT
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail                                                                                                                     s.
 11:08:50 [INFO] [ConsoleAddition] [BOT 3173857429] Logging in...
 11:08:50 [INFO] [ConsoleAddition] [NETWORK] Connected to server 114.221.144.22:                                                                                                                     8080
 11:08:50 [INFO] [ConsoleAddition] [NETWORK] Send done: wtlogin.login
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: WtLogin.Login.LoginPacketRes                                                                                                                     ponse.DeviceLockLogin
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: wtlogin.login
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: LoginPacketResponse.Success
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Login successful
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: StatSvc.register
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: Response(StatSvc.register)
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] 开始加载好友信息
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] 开始加载群组列表与群成员列表
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.getFriendGrou                                                                                                                     pList
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopListR                                                                                                                     eqV2
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetFriendGroupLis                                                                                                                     t.Response
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] 正在加载好友列表 6/6
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] 好友列表加载完成, 共 6个
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetFriendGroupLis                                                                                                                     t.Response
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] 群组列表与群成员加载完成, 共 9个
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Received commandName: MultiVideo.s2                                                                                                                     c
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: net.mamoe.mirai.qqandroid.ne                                                                                                                     twork.protocol.packet.chat.GroupInfoImpl@5b363d99
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Received commandName: MultiVideo.s2                                                                                                                     c
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: net.mamoe.mirai.qqandroid.ne                                                                                                                     twork.protocol.packet.chat.GroupInfoImpl@2a61052c
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: net.mamoe.mirai.qqandroid.ne                                                                                                                     twork.protocol.packet.chat.GroupInfoImpl@aa65073
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: net.mamoe.mirai.qqandroid.ne                                                                                                                     twork.protocol.packet.chat.GroupInfoImpl@57c818a6
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMembe                                                                                                                     rListReq
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMembe                                                                                                                     rListReq
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMembe                                                                                                                     rListReq
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMembe                                                                                                                     rListReq
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: net.mamoe.mirai.qqandroid.ne                                                                                                                     twork.protocol.packet.chat.GroupInfoImpl@3d782d33
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: net.mamoe.mirai.qqandroid.ne                                                                                                                     twork.protocol.packet.chat.GroupInfoImpl@1f1217d5
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMembe                                                                                                                     rListReq
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMembe                                                                                                                     rListReq
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: net.mamoe.mirai.qqandroid.ne                                                                                                                     twork.protocol.packet.chat.GroupInfoImpl@339150f9
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: net.mamoe.mirai.qqandroid.ne                                                                                                                     twork.protocol.packet.chat.GroupInfoImpl@7663cda9
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: net.mamoe.mirai.qqandroid.ne                                                                                                                     twork.protocol.packet.chat.GroupInfoImpl@467059dc
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMembe                                                                                                                     rListReq
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMembe                                                                                                                     rListReq
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMembe                                                                                                                     rListReq
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberLis                                                                                                                     t.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberLis                                                                                                                     t.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberLis                                                                                                                     t.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberLis                                                                                                                     t.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberLis                                                                                                                     t.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberLis                                                                                                                     t.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberLis                                                                                                                     t.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMembe                                                                                                                     rListReq
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberLis                                                                                                                     t.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMembe                                                                                                                     rListReq
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberLis                                                                                                                     t.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMembe                                                                                                                     rListReq
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberList.Response
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] 开始加载好友信息
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] 开始加载群组列表与群成员列表
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.getFriendGroupList
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopListReqV2
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetFriendGroupList.Response
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] 正在加载好友列表 6/6
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] 好友列表加载完成, 共 6个
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetFriendGroupList.Response
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] 群组列表与群成员加载完成, 共 9个
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Received commandName: MultiVideo.s2c
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl@5b363d99
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Received commandName: MultiVideo.s2c
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl@2a61052c
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl@aa65073
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl@57c818a6
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl@3d782d33
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl@1f1217d5
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl@339150f9
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl@7663cda9
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Event: net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl@467059dc
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
 11:08:51 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberList.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberList.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberList.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberList.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberList.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberList.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberList.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberList.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberList.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberList.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberList.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberList.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: FriendList.GetTroopMemberList.Response
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Send: MessageSvc.PbGetMsg
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Event: MessageSvc.PbGetMsg.Response(CONTINUE=CONTINUE, messages=<Iterable>))
 11:08:52 [INFO] [ConsoleAddition] [NETWORK] Send done: MessageSvc.PbGetMsg
 11:08:53 [INFO] [ConsoleAddition] [NETWORK] Event: MessageSvc.PbGetMsg.Response(CONTINUE=CONTINUE, messages=<Iterable>))
 11:08:53 [INFO] [ConsoleAddition] [NETWORK] Send done: MessageSvc.PbGetMsg
 11:08:53 [INFO] [ConsoleAddition] [NETWORK] Event: MessageSvc.PbGetMsg.Response(CONTINUE=CONTINUE, messages=<Iterable>))
 11:08:53 [INFO] [ConsoleAddition] [NETWORK] Send done: MessageSvc.PbGetMsg
 11:08:53 [INFO] [ConsoleAddition] [NETWORK] Event: MessageSvc.PbGetMsg.GetMsgSuccess(messages=<Iterable>))
 11:08:53 [INFO] [ConsoleAddition] [BOT 3173857429] Login successful
 11:08:53 [INFO] [Command] 3173857429 login successes
 11:08:53 [INFO] [ConsoleAddition] 3173857429 自动登录成功
 11:08:54 [INFO] [ConsoleAddition] [NETWORK] Received commandName: ConfigPushSvc.PushDomain
 11:08:56 [INFO] [ConsoleAddition] [NETWORK] unknown shtype 528
 11:08:56 [INFO] [ConsoleAddition] [NETWORK] Event: MultiPacketBySequence
 11:08:56 [INFO] [ConsoleAddition] [NETWORK] Send: OnlinePush.RespPush
 11:09:05 [INFO] [ConsoleAddition] [NETWORK] unknown shtype 528
 11:09:05 [INFO] [ConsoleAddition] [NETWORK] Event: MultiPacketBySequence
 11:09:05 [INFO] [ConsoleAddition] [NETWORK] Send: OnlinePush.RespPush
reload
 11:09:17 [INFO] [Plugin Manager] 开始加载/home/app/qqbot/plugins/下的插件
 11:09:17 [INFO] [Plugin Manager] loading plugin ConsoleAddition
 11:09:17 [INFO] [Plugin Manager] successfully loaded plugin ConsoleAddition version V0.2.3 by ryoii
 11:09:17 [INFO] [Plugin Manager] Mirai-console的增强插件,添加若干常用的命令
 11:09:17 [INFO] [Plugin Manager] loading plugin Ghs
 11:09:17 [INFO] [Plugin Manager] successfully loaded plugin Ghs version 0.1.0 by evrstr
 11:09:17 [INFO] [Plugin Manager] ghs插件
 11:09:17 [INFO] [Plugin Manager] loading plugin MiraiAPIHTTP
 11:09:17 [INFO] [Plugin Manager] successfully loaded plugin MiraiAPIHTTP version v1.5.1 by ryoii
 11:09:17 [INFO] [Plugin Manager] Mirai HTTP API Server Plugin
 11:09:17 [INFO] [ConsoleAddition] 3173857429
 11:09:17 [INFO] [ConsoleAddition] 读取了1个bot信息
 11:09:17 [INFO] [MiraiAPIHTTP] Loading Mirai HTTP API plugin
 11:09:17 [INFO] [MiraiAPIHTTP] Trying to Start Mirai HTTP Server in 0.0.0.0:8080
 11:09:17 [WARNING] [MiraiAPIHTTP] USING INITIAL KEY, please edit the key
 11:09:17 [INFO] [Ghs] PingMyMCServer Enabled
 11:09:17 [INFO] [MiraiAPIHTTP] Starting Mirai HTTP Server in 0.0.0.0:8080
Mirai HTTP API 11:09:17 : Http api server is running with authKey: INITKEYmgK2usVf
 11:09:17 [INFO] [Plugin Manager] 加载了3个插件
 11:09:17 [INFO] [Command] 重新加载完成
 11:09:51 [INFO] [ConsoleAddition] [NETWORK] Send done: Heartbeat.Alive
 11:09:51 [INFO] [ConsoleAddition] [NETWORK] Event: Heartbeat.Alive.Response

此时的setting.yml

authKey: 3173857429
port: 5710
enableWebsocket: true
cacheSize: 4096

是不能加载配置文件吗?

发送消息500报错,之后一收到消息就报错。

java -Xmx512M -jar mirai-console-wrapper-0.2.0-all.jar
You are running Mirai-Console-Wrapper under /home/app/qqbot
Starting Mirai Console Pure, reset by clear /content/
Starting version check...
Fetching Newest Core Version ..
Fetching Newest Console Version of Pure
Local Console-Pure Version: 0.4.2 | Newest Console-Pure Version: 0.4.2
Local Core Version: 0.33.0 | Newest Core Version: 0.33.0
Version check complete, starting Mirai
shadow-Protocol:/home/app/qqbot/content/mirai-core-qqandroid-jvm-0.33.0.jar
Console :/home/app/qqbot/content/mirai-console-0.4.2.jar
Root :/home/app/qqbot/
16:13:13 [INFO] [Mirai 0.4.2 Pkmon] Mirai-console now running under /home/app/qqbot
16:13:13 [INFO] [Mirai 0.4.2 Pkmon] Get news in github: https://github.com/mamoe/mirai
16:13:13 [INFO] [Mirai 0.4.2 Pkmon] Mirai为开源项目,请自觉遵守开源项目协议
16:13:13 [INFO] [Mirai 0.4.2 Pkmon] Powered by Mamoe Technologies and contributors
16:13:13 [INFO] [Plugin Manager] 开始加载/home/app/qqbot/plugins/下的插件
16:13:13 [INFO] [Plugin Manager] loading plugin ConsoleAddition
16:13:14 [INFO] [Plugin Manager] successfully loaded plugin ConsoleAddition version V0.2.2 by ryoii
16:13:14 [INFO] [Plugin Manager] Mirai-console的增强插件,添加若干常用的命令
16:13:14 [INFO] [Plugin Manager] loading plugin MiraiAPIHTTP
16:13:14 [INFO] [Plugin Manager] successfully loaded plugin MiraiAPIHTTP version v1.4.1 by ryoii
16:13:14 [INFO] [Plugin Manager] Mirai HTTP API Server Plugin
16:13:14 [INFO] [Plugin Manager] loading plugin hsoPro
16:13:14 [INFO] [Plugin Manager] successfully loaded plugin hsoPro version V0.0.1 by unknown
16:13:14 [INFO] [Plugin Manager] hso plugin Pro
16:13:14 [INFO] [ConsoleAddition] 3173857429
16:13:14 [INFO] [ConsoleAddition] 读取了1个bot信息
16:13:14 [INFO] [MiraiAPIHTTP] Loading Mirai HTTP API plugin
16:13:14 [INFO] [MiraiAPIHTTP] Trying to Start Mirai HTTP Server in 0.0.0.0:5710
16:13:14 [INFO] [ConsoleAddition] 正在自动登录3173857429
16:13:14 [INFO] [MiraiAPIHTTP] Starting Mirai HTTP Server in 0.0.0.0:5710
Mirai HTTP API 16:13:14 : Http api server is running with authKey: 3173857429
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
16:13:14 [INFO] [ConsoleAddition] [Bot md5 Login] login...
16:13:14 [INFO] [hsoPro] 本地图片版本1.0.0 from https://api.lolicon.app
16:13:14 [INFO] [hsoPro] Normal * 658
16:13:14 [INFO] [hsoPro] R18 * 497
16:13:14 [INFO] [hsoPro] hso插件已加载
16:13:14 [INFO] [Plugin Manager] 加载了3个插件
16:13:14 [INFO] [Mirai 0.4.2 Pkmon] Mirai-console 启动完成
16:13:14 [INFO] [Mirai 0.4.2 Pkmon] "/login qqnumber qqpassword " to login a bot
16:13:14 [INFO] [Mirai 0.4.2 Pkmon] "/login qq号 qq密码 " 来登录一个BOT
16:13:14 [INFO] [ConsoleAddition] [BOT 3173857429] Logging in...
16:13:14 [INFO] [ConsoleAddition] [NETWORK] Connected to server 114.221.144.22:8080
16:13:14 [INFO] [ConsoleAddition] [NETWORK] Send done: wtlogin.login
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Received: WtLogin.Login.LoginPacketResponse.DeviceLockLogin
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: wtlogin.login
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Received: LoginPacketResponse.Success
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Login successful
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: StatSvc.register
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Received: Response(StatSvc.register)
16:13:15 [INFO] [ConsoleAddition] [NETWORK] 开始加载好友信息
16:13:15 [INFO] [ConsoleAddition] [NETWORK] 开始加载群组列表与群成员列表
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.getFriendGroupList
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopListReqV2
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Received: FriendList.GetFriendGroupList.Response
16:13:15 [INFO] [ConsoleAddition] [NETWORK] 正在加载好友列表 6/6
16:13:15 [INFO] [ConsoleAddition] [NETWORK] 好友列表加载完成, 共 6个
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Received: FriendList.GetFriendGroupList.Response
16:13:15 [INFO] [ConsoleAddition] [NETWORK] 群组列表与群成员加载完成, 共 9个
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: OidbSvc.0x88d_7
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Received commandName: MultiVideo.s2c
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Received commandName: MultiVideo.s2c
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Received: net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl@5f50958a
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Received: net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl@40cd730d
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Received: net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl@7f4ab9dc
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Received: net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl@7fa175ff
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Received: net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl@24064344
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Received: net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl@f7809d2
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Received: net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl@2556d5b8
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Received: net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl@512c4260
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Received: net.mamoe.mirai.qqandroid.network.protocol.packet.chat.GroupInfoImpl@47262762
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
16:13:15 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Received: FriendList.GetTroopMemberList.Response
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Received: FriendList.GetTroopMemberList.Response
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Received: FriendList.GetTroopMemberList.Response
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Received: FriendList.GetTroopMemberList.Response
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Received: FriendList.GetTroopMemberList.Response
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Received: FriendList.GetTroopMemberList.Response
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Received: FriendList.GetTroopMemberList.Response
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Received: FriendList.GetTroopMemberList.Response
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Received: FriendList.GetTroopMemberList.Response
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Received: FriendList.GetTroopMemberList.Response
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Received: FriendList.GetTroopMemberList.Response
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Received: FriendList.GetTroopMemberList.Response
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Send done: friendlist.GetTroopMemberListReq
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Received: FriendList.GetTroopMemberList.Response
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Send: MessageSvc.PbGetMsg
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Received: MessageSvc.PbGetMsg.Response(CONTINUE=CONTINUE, messages=))
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Send done: MessageSvc.PbGetMsg
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Received: MessageSvc.PbGetMsg.Response(CONTINUE=CONTINUE, messages=))
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Send done: MessageSvc.PbGetMsg
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Received: MessageSvc.PbGetMsg.Response(CONTINUE=CONTINUE, messages=))
16:13:16 [INFO] [ConsoleAddition] [NETWORK] Send done: MessageSvc.PbGetMsg
16:13:17 [INFO] [ConsoleAddition] [NETWORK] Received: MessageSvc.PbGetMsg.GetMsgSuccess(messages=))
16:13:17 [INFO] [ConsoleAddition] [NETWORK] unknown shtype 528
16:13:17 [INFO] [ConsoleAddition] [NETWORK] Received: MultiPacketBySequence
16:13:17 [INFO] [ConsoleAddition] [NETWORK] Send: OnlinePush.RespPush
16:13:17 [INFO] [ConsoleAddition] [BOT 3173857429] Login successful
16:13:17 [INFO] [Command] 3173857429 login successes
16:13:17 [INFO] [ConsoleAddition] 3173857429 自动登录成功
16:13:18 [INFO] [ConsoleAddition] [NETWORK] Received commandName: ConfigPushSvc.PushDomain
16:13:24 [INFO] [ConsoleAddition] [NETWORK] unknown shtype 528
16:13:24 [INFO] [ConsoleAddition] [NETWORK] Received: MultiPacketBySequence
16:13:24 [INFO] [ConsoleAddition] [NETWORK] Send: OnlinePush.RespPush
16:13:25 [INFO] [ConsoleAddition] [BOT 3173857429] Received: GroupMessage(group=330986863, senderName=zhzhongshi, sender=3365615175, permission=MEMBER, message=??)
16:13:25 [INFO] [ConsoleAddition] [BOT 3173857429] Received: GroupMessage(group=330986863, senderName=‮~喵‭ÿ轻雨, sender=1701717336, permission=MEMBER, message=[mirai:image:{4A1D38CB-952F-8D80-57DB-AB34660C4480}.jpg])
16:13:26 [INFO] [ConsoleAddition] [BOT 3173857429] Received: GroupMessage(group=608553250, senderName=Kondrucki, sender=1213285708, permission=MEMBER, message=???)
16:13:48 [INFO] [ConsoleAddition] [NETWORK] Send done: MessageSvc.PbSendMsg
16:13:48 [INFO] [ConsoleAddition] [NETWORK] Received: MessageSvc.PbSendMsg.Response.SUCCESS
16:13:48 [ERROR] [MiraiAPIHTTP] java.lang.NoSuchMethodError: net.mamoe.mirai.message.MessageReceipt.getSource()Lnet/mamoe/mirai/message/data/MessageSource;
at net.mamoe.mirai.api.http.route.MessageRouteModuleKt$messageModule$1$$special$$inlined$miraiVerify$2$1.invokeSuspend(BaseRoute.kt:335)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:32)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:113)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

16:13:48 [INFO] [ConsoleAddition] [BOT 3173857429] Received: OnlinePush.PbPushGroupMsg.SendGroupMessageReceipt(messageRandom=4837675, sequenceId=1318528)
16:14:06 [INFO] [ConsoleAddition] [BOT 3173857429] Received: GroupMessage(group=330986863, senderName=zhzhongshi, sender=3365615175, permission=MEMBER, message=???)
16:14:06 [INFO] [ConsoleAddition] [BOT 3173857429] An exception was thrown under a coroutine of Bot
16:14:06 [INFO] [ConsoleAddition] [BOT ERROR 3173857429] java.lang.IncompatibleClassChangeError: Found class net.mamoe.mirai.message.data.MessageSource, but interface was expected
java.lang.IncompatibleClassChangeError: Found class net.mamoe.mirai.message.data.MessageSource, but interface was expected
at net.mamoe.mirai.api.http.queue.CacheQueue.add(CacheQueue.kt:28)
at net.mamoe.mirai.api.http.AuthedSession$2.invokeSuspend(Session.kt:134)
at net.mamoe.mirai.api.http.AuthedSession$2.invoke(Session.kt)
at net.mamoe.mirai.api.http.AuthedSession$$special$$inlined$subscribeAlwaysForBot1$2.invokeSuspend(subscriber.kt:246)
at net.mamoe.mirai.api.http.AuthedSession$$special$$inlined$subscribeAlwaysForBot1$2.invoke(subscriber.kt)
at net.mamoe.mirai.event.internal.Handler$onEvent$2.invokeSuspend(InternalEventListeners.kt:76)
at net.mamoe.mirai.event.internal.Handler$onEvent$2.invoke(InternalEventListeners.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:91)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:154)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at net.mamoe.mirai.event.internal.Handler.onEvent(InternalEventListeners.kt:76)
at net.mamoe.mirai.event.internal.InternalEventListenersKt$callAndRemoveIfRequired$$inlined$forEachNode$lambda$1.invokeSuspend(InternalEventListeners.kt:167)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
16:14:10 [INFO] [ConsoleAddition] [BOT 3173857429] Received: GroupMessage(group=330986863, senderName=游离, sender=285717162, permission=MEMBER, message=歪比歪比)
16:14:10 [INFO] [ConsoleAddition] [BOT 3173857429] An exception was thrown under a coroutine of Bot
16:14:10 [INFO] [ConsoleAddition] [BOT ERROR 3173857429] java.lang.IncompatibleClassChangeError: Found class net.mamoe.mirai.message.data.MessageSource, but interface was expected
java.lang.IncompatibleClassChangeError: Found class net.mamoe.mirai.message.data.MessageSource, but interface was expected
at net.mamoe.mirai.api.http.queue.CacheQueue.add(CacheQueue.kt:28)
at net.mamoe.mirai.api.http.AuthedSession$2.invokeSuspend(Session.kt:134)
at net.mamoe.mirai.api.http.AuthedSession$2.invoke(Session.kt)
at net.mamoe.mirai.api.http.AuthedSession$$special$$inlined$subscribeAlwaysForBot1$2.invokeSuspend(subscriber.kt:246)
at net.mamoe.mirai.api.http.AuthedSession$$special$$inlined$subscribeAlwaysForBot1$2.invoke(subscriber.kt)
at net.mamoe.mirai.event.internal.Handler$onEvent$2.invokeSuspend(InternalEventListeners.kt:76)
at net.mamoe.mirai.event.internal.Handler$onEvent$2.invoke(InternalEventListeners.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:91)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:154)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at net.mamoe.mirai.event.internal.Handler.onEvent(InternalEventListeners.kt:76)
at net.mamoe.mirai.event.internal.InternalEventListenersKt$callAndRemoveIfRequired$$inlined$forEachNode$lambda$1.invokeSuspend(InternalEventListeners.kt:167)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
16:14:10 [INFO] [ConsoleAddition] [BOT 3173857429] Received: GroupMessage(group=330986863, senderName=‮~喵‭ÿ轻雨, sender=1701717336, permission=MEMBER, message=歪比巴卜)
16:14:10 [INFO] [ConsoleAddition] [BOT 3173857429] An exception was thrown under a coroutine of Bot
16:14:10 [INFO] [ConsoleAddition] [BOT ERROR 3173857429] java.lang.IncompatibleClassChangeError: Found class net.mamoe.mirai.message.data.MessageSource, but interface was expected
java.lang.IncompatibleClassChangeError: Found class net.mamoe.mirai.message.data.MessageSource, but interface was expected
at net.mamoe.mirai.api.http.queue.CacheQueue.add(CacheQueue.kt:28)
at net.mamoe.mirai.api.http.AuthedSession$2.invokeSuspend(Session.kt:134)
at net.mamoe.mirai.api.http.AuthedSession$2.invoke(Session.kt)
at net.mamoe.mirai.api.http.AuthedSession$$special$$inlined$subscribeAlwaysForBot1$2.invokeSuspend(subscriber.kt:246)
at net.mamoe.mirai.api.http.AuthedSession$$special$$inlined$subscribeAlwaysForBot1$2.invoke(subscriber.kt)
at net.mamoe.mirai.event.internal.Handler$onEvent$2.invokeSuspend(InternalEventListeners.kt:76)
at net.mamoe.mirai.event.internal.Handler$onEvent$2.invoke(InternalEventListeners.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:91)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:154)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at net.mamoe.mirai.event.internal.Handler.onEvent(InternalEventListeners.kt:76)
at net.mamoe.mirai.event.internal.InternalEventListenersKt$callAndRemoveIfRequired$$inlined$forEachNode$lambda$1.invokeSuspend(InternalEventListeners.kt:167)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
^C 16:14:13 [INFO] [MiraiAPIHTTP] kotlin.UninitializedPropertyAccessException: lateinit property server has not been initialized
at net.mamoe.mirai.api.http.MiraiHttpAPIServer.stop(MiraiHttpAPIServer.kt:69)
at net.mamoe.mirai.api.http.HttpApiPluginBase.onDisable(HttpApiPluginBase.kt:50)
at net.mamoe.mirai.console.plugins.PluginBase.disable$mirai_console(PluginBase.kt:122)
at net.mamoe.mirai.console.plugins.PluginManager.disablePlugins(PluginManager.kt:250)
at net.mamoe.mirai.console.plugins.PluginManager.disablePlugins$default(PluginManager.kt:247)
at net.mamoe.mirai.console.MiraiConsole.stop(MiraiConsole.kt:98)
at net.mamoe.mirai.console.pure.MiraiConsolePureLoader$Companion$load$1.invoke(MiraiConsolePureLoader.kt:28)
at net.mamoe.mirai.console.pure.MiraiConsolePureLoader$Companion$load$1.invoke(MiraiConsolePureLoader.kt:16)
at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

16:14:13 [INFO] [hsoPro] Saving data
16:14:13 [INFO] [hsoPro] Image Fetcher (worker) has closed
16:14:13 [INFO] [hsoPro] Image Fetcher (worker) has closed
16:14:13 [INFO] [hsoPro] Image Fetcher (worker) has closed
16:14:13 [INFO] [hsoPro] Image Fetcher (worker) has closed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.