MrXiaoM / Overflow

替换 mirai 实现为 Onebot 以进行无缝迁移
https://mirai.mrxiaom.top
GNU Affero General Public License v3.0
345 stars 24 forks source link

与Gensokyo-kook 配合问题 #46

Closed MeowStarrySea closed 6 months ago

MeowStarrySea commented 6 months ago

问题描述

非常抱歉 我不知道我可以去哪里提问相关问题 所以我来到这里开issues

我在使用overflow的时候想到是使用onebot11并且Gensokyo-kook 同样使用onebot11 所以我尝试进行了部署 但是部署的时候我遇到了一些问题 所以来到这里发issues

我不清楚问题如何解决 我已经尝试了我所能尝试的解决办法 实在没办法出此下策

复现

1,部署overflow以及Gensokyo-kook 2,配置 3,启动

Overflow 版本

v2.16.0-c49aec1

其他组件版本

onebot11

系统日志

2024-05-12 13:18:12 I/Onebot: Overflow v2.16.0-c49aec1-SNAPSHOT.1 正在运行
2024-05-12 13:18:12 I/Onebot: 在端口 9999 开启反向 WebSocket 服务端
2024-05-12 13:18:13 I/Onebot: ▌ 反向 WebSocket 服务端已在 0.0.0.0/0.0.0.0:9999 启动
2024-05-12 13:18:13 I/Onebot: ▌ 正在等待客户端连接...
2024-05-12 13:18:17 I/Onebot: ▌ 反向 WebSocket 客户端 /127.0.0.1:53108 已连接 ┈━═☆
2024-05-12 13:18:17 I/Onebot: 服务端版本信息
{
  "data": {
    "app_full_name": "gensokyo-kook",
    "app_name": "gensokyo-kook",
    "app_version": "v1.0.0",
    "coolq_directory": "",
    "coolq_edition": "pro",
    "go-cqhttp": true,
    "plugin_build_configuration": "release",
    "plugin_build_number": 99,
    "plugin_version": "4.15.0",
    "protocol_name": 4,
    "protocol_version": "v11",
    "runtime_os": "windows",
    "runtime_version": "go1.20.2",
    "version": "v1.0.0"
  },
  "echo": 0,
  "message": "",
  "retcode": 0,
  "status": "ok"
}
2024-05-12 13:18:17 E/main: Exception in coroutine MiraiConsoleImplementationTerminal
top.mrxiaom.overflow.internal.deps.gson.JsonSyntaxException: java.lang.NumberFormatException: For input string: "%!d(string=*********)"
        at top.mrxiaom.overflow.internal.deps.gson.internal.bind.TypeAdapters$11.read(TypeAdapters.java:333)
        at top.mrxiaom.overflow.internal.deps.gson.internal.bind.TypeAdapters$11.read(TypeAdapters.java:323)
        at top.mrxiaom.overflow.internal.deps.gson.internal.bind.ReflectiveTypeAdapterFactory$1.readIntoField(ReflectiveTypeAdapterFactory.java:212)
        at top.mrxiaom.overflow.internal.deps.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:433
)
        at top.mrxiaom.overflow.internal.deps.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:393)
        at top.mrxiaom.overflow.internal.deps.gson.internal.bind.ReflectiveTypeAdapterFactory$1.readIntoField(ReflectiveTypeAdapterFactory.java:212)
        at top.mrxiaom.overflow.internal.deps.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:433
)
        at top.mrxiaom.overflow.internal.deps.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:393)
        at top.mrxiaom.overflow.internal.deps.gson.Gson.fromJson(Gson.java:1227)
        at top.mrxiaom.overflow.internal.deps.gson.Gson.fromJson(Gson.java:1329)
        at top.mrxiaom.overflow.internal.deps.gson.Gson.fromJson(Gson.java:1300)
        at cn.evolvefield.onebot.client.core.Bot.getLoginInfo(Bot.kt:1483)
        at cn.evolvefield.onebot.client.core.Bot$getLoginInfo$1.invokeSuspend(Bot.kt)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33)
        at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Caused by: java.lang.NumberFormatException: For input string: "%!d(string=1040571434)"
        at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
        at java.base/java.lang.Long.parseLong(Long.java:697)
        at java.base/java.lang.Long.parseLong(Long.java:836)
        at top.mrxiaom.overflow.internal.deps.gson.JsonPrimitive.getAsLong(JsonPrimitive.java:203)
        at top.mrxiaom.overflow.internal.deps.gson.internal.bind.JsonTreeReader.nextLong(JsonTreeReader.java:236)
        at top.mrxiaom.overflow.internal.deps.gson.internal.bind.TypeAdapters$11.read(TypeAdapters.java:331)
        ... 21 more

网络日志

No response

补充信息

No response

MeowStarrySea commented 6 months ago

可以接收到相关事件 但是发生如下异常 2024-05-12 13:31:19 W/Overflow: 接收到的 cn.evole.onebot.sdk.event.message.GroupMessageEvent 事件中,selfId = *****,无法从已登录的机器人列表中找到该机器人。

MrXiaoM commented 6 months ago

看起来是 gensokyo-kook 没有按规定返回long类型的id,不是 Overflow 的问题

MeowStarrySea commented 6 months ago

好的