Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data Type问题 #45

Open
M1hono opened this issue May 10, 2024 · 12 comments
Open

data Type问题 #45

M1hono opened this issue May 10, 2024 · 12 comments
Labels
bug 已确认存在漏洞 question 对错误或其它问题进行提问

Comments

@M1hono
Copy link

M1hono commented May 10, 2024

问题描述

在linux x84 Debian系统上使用Lagrange作为onebot服务时使用mirai的mirai mcmod插件获取模组列表时发生数据类型错误的问题。

复现

  1. 使用最新版的overflow与lagrange
  2. 使用linux服务器(之前在windows服务器时未遇到类似问题,不清楚原因)
  3. 使用该插件https://github.com/limbang/mirai-console-mcmod-plugin.
  4. 使用功能mod 随机模组

Overflow 版本

f37b538

其他组件版本

mirai-console-mcmod-plugin-2.0.10.mirai2.jar
Lagrange.OneBot_linux-x64_8.0

系统日志

2024-05-10 21:03:54 E/Mcmod: Exception in coroutine Plugin top.limbang.mcmod of Mcmod
top.mrxiaom.overflow.internal.deps.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected STRING but was BEGIN_OBJECT at path $.data
        at top.mrxiaom.overflow.internal.deps.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:397)
        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.sendGroupForwardMsgLagrange(Bot.kt:1498)
        at cn.evolvefield.onebot.client.core.Bot$sendGroupForwardMsgLagrange$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.IllegalStateException: Expected STRING but was BEGIN_OBJECT at path $.data
        at top.mrxiaom.overflow.internal.deps.gson.internal.bind.JsonTreeReader.nextString(JsonTreeReader.java:187)
        at top.mrxiaom.overflow.internal.deps.gson.internal.bind.TypeAdapters$15.read(TypeAdapters.java:421)        at top.mrxiaom.overflow.internal.deps.gson.internal.bind.TypeAdapters$15.read(TypeAdapters.java:409)        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)
        ... 14 more

网络日志

No response

补充信息

No response

@M1hono M1hono added the question 对错误或其它问题进行提问 label May 10, 2024
@MrXiaoM
Copy link
Owner

MrXiaoM commented May 10, 2024

请提供网络日志

@M1hono
Copy link
Author

M1hono commented May 10, 2024

info: Lagrange.Core.BotContext[0]
[2024-05-10 22:51:57] [MessagingLogic] [VERBOSE]: [MessageChain(157433231)(2977029595)] [Text]: mod 机械动力
warn: Lagrange.OneBot.Core.Network.LagrangeWebSvcCollection[6]
[LagrangeWebSvcCollection]: WebService send message failed.
System.Net.WebSockets.WebSocketException (0x80004005): The server returned status code '200' when status code '101' was expected.
at System.Net.WebSockets.WebSocketHandle.ValidateResponse(HttpResponseMessage response, String secValue)
at System.Net.WebSockets.WebSocketHandle.ConnectAsync(Uri uri, HttpMessageInvoker invoker, CancellationToken cancellationToken, ClientWebSocketOptions options)
at System.Net.WebSockets.ClientWebSocket.ConnectAsyncCore(Uri uri, HttpMessageInvoker invoker, CancellationToken cancellationToken)
at Lagrange.OneBot.Core.Network.Service.ReverseWSService.SendJsonAsync[T](ClientWebSocket ws, Task connectTask, T payload, CancellationToken token)
at Lagrange.OneBot.Core.Network.LagrangeWebSvcCollection.SendJsonAsync[T](T json, String identifier, CancellationToken cancellationToken)
info: Lagrange.Core.BotContext[0]
[2024-05-10 22:51:58] [MessagingLogic] [VERBOSE]: [MessageChain(157433231)(3374981268)] [MultiMsgEntity] 8 chains | [Xml]: <title color="#000000" size="34">聊天记录</title><title color="#777777" size="26">夏洛特: 30秒内回复编号查看</title><title color="#777777" size="26">夏洛特: 0:机械动力:动力刷怪笼 </title><title color="#777777" size="26">夏洛 特: 1:机械动力:喷气背包 </title><title color="#777777" size="26">夏洛特: 2:机械动力:咖啡馆 </title>


查看8条转发消息

@MrXiaoM
Copy link
Owner

MrXiaoM commented May 10, 2024

请提供网络日志,网络日志的定义详见 issue 模板

@MrXiaoM MrXiaoM added the wait-for-reply 信息不足,等待进一步补充信息 label May 10, 2024
@M1hono
Copy link
Author

M1hono commented May 10, 2024

请问lagrange要如何获取Log呢?我实在不清楚可打开的log文件的位置,不过我会尝试去用trace的模式再获取一次日志。
同时我发现私聊时消息能够正常地进行但会出现无法撤回信息的问题,我也会提供详细的日志。

@MrXiaoM
Copy link
Owner

MrXiaoM commented May 10, 2024

网络日志指的是 Overflow 的网络日志…没那么难理解吧

@M1hono
Copy link
Author

M1hono commented May 11, 2024

2024-05-11.log

@M1hono
Copy link
Author

M1hono commented May 11, 2024

抱歉抱歉没仔细看过mirai的文件结构我还以为是问onebot服务的报告。

@MrXiaoM MrXiaoM added bug 已确认存在漏洞 and removed wait-for-reply 信息不足,等待进一步补充信息 labels May 11, 2024
@MrXiaoM
Copy link
Owner

MrXiaoM commented May 11, 2024

以尝试修复,请使用最新版

@M1hono
Copy link
Author

M1hono commented May 11, 2024

依旧无法使用同时私聊也无法再正常进行第一步,这是log请您有空时看看,非常感谢您对overflow的维护。
logs.txt

@M1hono
Copy link
Author

M1hono commented May 11, 2024

有很多服务使用lagrange出现了大大小小的问题……请问有没有目前在linux上更稳定泛用的onebot服务呢。

@EvolvedGhost
Copy link
Contributor

有很多服务使用lagrange出现了大大小小的问题……请问有没有目前在linux上更稳定泛用的onebot服务呢。

目前走的最标准的和GOCQ最像的BUG最少的就shamrock,其他都不太行;如果是物理机的话可以尝试部署一个KVM装BlissOS装安卓QQ,虚拟机的话可以试试redroid这种docker镜像;但是我redroid跑不起来、BlissOS一周卡死一次,所以我也只能一直坚守Lagrange

@M1hono
Copy link
Author

M1hono commented May 13, 2024

有很多服务使用lagrange出现了大大小小的问题……请问有没有目前在linux上更稳定泛用的onebot服务呢。

目前走的最标准的和GOCQ最像的BUG最少的就shamrock,其他都不太行;如果是物理机的话可以尝试部署一个KVM装BlissOS装安卓QQ,虚拟机的话可以试试redroid这种docker镜像;但是我redroid跑不起来、BlissOS一周卡死一次,所以我也只能一直坚守Lagrange

尝试了半天后实在是无法实用redroid,跑得起来但完全连接不到adb,我试试llonebot好了……

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 已确认存在漏洞 question 对错误或其它问题进行提问
Projects
None yet
Development

No branches or pull requests

3 participants