Giter Club home page Giter Club logo

sora's People

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

sora's Issues

SoraCommand设置SourceFlag.Private时提示不支持的类型

使用环境

  • 框架版本号:1.0.0-rc.41
  • 运行环境:linux docker

bug描述
SoraCommand设置SourceFlag.Private时提示不支持的类型。
经检查应该是CommandUtils.csCheckMethodLegality的条件判断出现问题。

if (commandAttr.SourceType is not SourceFlag.Group or SourceFlag.Private)
{
Log.Warning("CommandCheck", $"指令{method.Name}设置了不支持的消息源类型({commandAttr.SourceType}),已自动忽略");
return false;
}
PS:
这段代码下面返回的代码好像也有错误,因为没能运行到那边,所以我不太确定,
两个消息类型都是para.ParameterType == typeof(GroupMessageEventArgs)

如何复现
使用service.Event.CommandManager.MappingCommands加载带有SoraCommand的dll
SoraCommandSourceType设置为Sora.Enumeration.SourceFlag.Private

错误截图或日志
02/01/2022 11:20:00| Warning | Sora.Command.CommandUtils
[CommandCheck]指令TestCommand设置了不支持的消息源类型(Private),已自动忽略

Group.GetGroupRootFiles() 超时

使用环境

  • 框架版本号:1.0.0-rc.80
  • 运行环境:Windows

bug描述
实际上群文件列表是可以获取的,但是当群文件数量较多的时候,似乎是超时设置的时间过于短,导致无法完成后续操作。

如何复现
在群文件数量较多的群调用Group.GetGroupRootFiles()函数

错误截图或日志

fail: Sora.Net.ReactiveApiManager.<SendApiRequest>d__2[0]
      [Sora] API超时[msg echo:78e48bb1-6f2c-447d-91c9-847ca68f22fa]

关于异常捕获

报错能否取消发送到私聊和群消息 只打印错误日志,或者改成配置或者加debug模式才发群
M2{MQ X$XI03EUGYK EWD~F

[重要] 未来的计划

go-cqhttp 因为qq官方的一系列协议升级,可能后续会停止开发
详细的原因:go-cqhttp#2471
这里推荐迁移至 Shamrock 这类的NTQQ协议端

并且本项目将会在未来重构,以减少对协议的依赖,未来将会以协议插件的形式实现对协议的解耦

相关repo:
Shamrock

Group.GetEssenceMsgList() 精华消息获取的2个问题

使用环境

  • 框架版本号:1.3.0
  • 运行环境:Windows

bug描述
Group.GetEssenceMsgList()在任何群,机器人身份为群主、管理员或普通成员时,均返回ApiStatusType.Ok,但获取精华消息数始终为0。

如何复现
调用'Group.GetEssenceMsgList()'

错误截图或日志

存在未知Bug

使用环境

  • 框架版本号:``最新
  • 运行环境:``.net 5.0

bug描述
会出现异常bug直接闪退,不知道bug。解决办法,干掉你的强退逻辑,新开一个客户端重启。

如何复现
不知道

错误截图或日志
image

收到邀请进群通知后崩溃

使用环境

  • 框架版本号: 1.0.0-rc73``
  • 运行环境: Linux``

bug描述
如果机器人被任何人邀请加入群后就会出现崩溃.

如何复现
如果机器人被任何人邀请加入群后就会出现崩溃.

错误截图或日志
image

Fatal:System.Collections.Generic.KeyNotFoundException

rc.54

稳定跑了一个月,今天挂了

Application: FFXIV.Sora.exe
CoreCLR Version: 6.0.422.16404
.NET Version: 6.0.4
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Collections.Generic.KeyNotFoundException: The given key '41309edd-e531-4a8d-82c6-ac9d7c1a0faf' was not present in the dictionary.
   at System.Collections.Concurrent.ConcurrentDictionary`2.ThrowKeyNotFoundException(TKey key)
   at Sora.EventArgs.SoraEvent.BaseMessageEventArgs..ctor(Guid serviceId, Guid connectionId, String eventName, BaseObMessageEventArgs msg, SourceFlag source)
   at Sora.OnebotAdapter.EventAdapter.MessageAdapter(JObject messageJson, Guid connection)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()


监听群员变动事件后被拉入新群后崩溃

使用环境

  • 框架版本号:1.0.0-rc73``
  • 运行环境: Linux``

bug描述
使用示例代码 service.Event.OnGroupMemberChange += async (_, eventArgs) =>
监听群员变动事件后,Sora报错崩溃

如何复现
监听群员变动事件后,使用一个新群(人数低于10)邀请机器人加群,然后崩溃.

错误截图或日志
image

关于SoraCommand中的MatchType

Discussed in #65

Originally posted by hd80606b July 15, 2022
MatchType中的KeyWord似乎并不是真正意义上的关键词匹配,而是只要句子里出现了这几个字就会触发
举例:使用指南里的例子,添加MatchType = Sora.Enumeration.MatchType.KeyWord 来匹配 坏耶
然而,你发送:“坏人太多了耶” ,“坏啊啊啊啊啊啊啊啊啊dwadaw啊啊啊啊啊啊耶啊啊啊2adwadwa”
机器人也会回复 好耶
并不是常规的 string.contains 这种关键词匹配,请问是否是个bug

单向好友列表有内容但信息为空

使用环境

  • 框架版本号:v1.0.0-rc20
  • 运行环境:gocq v1.0.0-beta7-fix1. CentOS 7.6.1810 x86_64(Py3.7.9)

bug描述

如图,看到有获取单向好友的接口,于是想查看下单向好友列表,最后数量是22个但是里面的数据都是null

如何复现

错误截图或日志
image
image
image

建议

建议将GroupMemberChangeEventArgs 中MemberChangeType SubType 改为公有属性,而不是同命名空间

关于用cqhttp反代的一些问题

尊敬的开发者您好,在我使用sora框架创建bot的时候我遇到了在反代上的一些问题,在bot的工程中我认为我的代码和您的是完全一致的(其实就是复制粘贴),在cqhttp中的配置如下,已经查阅过文档和问过相关人员均没有得到答案,所以想来请教一下您
QQ截图20210120225645
QQ截图20210120225823

接收消息时出现错误 MSG_NOT_FOUND

使用环境

  • 框架版本号:1.3.3
  • 运行环境:linux docker

bug描述
使用cqhttp目前最新的dev版本后,每次有人发消息都会出现一条错误。
不过功能还是可以正常使用。

如何复现
接收QQ消息

错误截图或日志
QQ截图20230804010234

长期运行偶尔崩溃

使用环境

  • 框架版本号:0.9.9.0
  • 运行环境:cqhttp 1.0.0 beta6

bug描述
崩溃

如何复现
不知道,偶尔遇到

错误截图或日志

[2021/9/5 21:01:02][FATAL][System]检测到未处理的异常进程将停止运行,错误信息:
==============ERROR==============
Error:System.InvalidOperationException

Message:Collection was modified; enumeration operation may not execute.

Stack Trace:
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
   at Sora.Net.ConnectionManager.HeartBeatCheck(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.TimerQueueTimer.CallCallback(Boolean isThreadPool)
   at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
   at System.Threading.TimerQueue.FireNextTimers()
=================================

忘记圈起来果然还是很丢人,虽然close了还是改一下

内部HeartBeatUpdate触发程序崩溃

rc-52

Application: FFXIV.Sora.exe
CoreCLR Version: 6.0.422.16404
.NET Version: 6.0.4
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Collections.Generic.KeyNotFoundException: The given key '447082cc-4a88-42c4-ab7e-fcc58be9bf8d' was not present in the dictionary.
   at System.Collections.Concurrent.ConcurrentDictionary`2.ThrowKeyNotFoundException(TKey key)
   at Sora.Net.ConnectionManager.HeartBeatUpdate(Guid connectionGuid)
   at Sora.OnebotAdapter.EventAdapter.MetaAdapter(JObject messageJson, Guid connection)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()


[Feature Request] 静态文件的http服务器(?

在采用了Shamrock的方案后,现在BotServer和Sora被运行在了不同的机器上
当我使用本地文件path的方式发送语音时,由于并不是同一台机器,Shamrock会报错找不到文件。
因此只剩下了Base64与URL的方式可用

或许Sora可以做到在以被动ws的方式启动时,顺便绑一个/static的router在监听的目录下,只要映射到本地存储的一个目录就行了

AutoMarkMessageRead 个别API调用情况下报错

使用环境

  • 框架版本号:rc17
  • 运行环境:CentOS 7.6.1810 go-cqhttp v1.0.0-beta6

bug描述
SetFriendAddRequest调用后功能正常但是触发go-cqhttp处理ws命令失败导致WS重连

如何复现

  1. OnFriendRequest捕获OnFriendRequest,并输出RequsetFlag
  2. 创建一个同意好友的私聊指令并调用await args.SoraApi.SetFriendAddRequest(flag, true);
  3. 向机器人发送flag触发指令
  4. 触发同意后,好友添加成功,但是WS断开连接,go-cqhttp报错如下
[2021-08-23 19:12:40] [INFO]: 处置WS命令时发生无法恢复的异常:interface conversion: interface {} is int32, not int64
goroutine 479997 [running]:
runtime/debug.Stack(0xc0008417a0, 0xd78000, 0xc001ec8510)
	runtime/debug/stack.go:24 +0x9f
github.com/Mrs4s/go-cqhttp/server.(*webSocketConn).handleRequest.func1(0xc000a00690)
	github.com/Mrs4s/go-cqhttp/server/websocket.go:372 +0x5b
panic(0xd78000, 0xc001ec8510)
	runtime/panic.go:965 +0x1b9
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).CQMarkMessageAsRead(0xc00029a0c0, 0xc071d2e6b3, 0xa)
	github.com/Mrs4s/go-cqhttp/coolq/api.go:1434 +0xb0f
github.com/Mrs4s/go-cqhttp/server.markMSGAsRead(0xc00029a0c0, 0xfb3140, 0xc0007fb240, 0x10)
	github.com/Mrs4s/go-cqhttp/server/api.go:354 +0xcc
github.com/Mrs4s/go-cqhttp/server.(*apiCaller).callAPI(0xc0003f5640, 0xc0010ec40b, 0x10, 0xfb3140, 0xc0007fb240, 0xc0010ec454)
	github.com/Mrs4s/go-cqhttp/server/api.go:430 +0x409
github.com/Mrs4s/go-cqhttp/server.(*webSocketConn).handleRequest(0xc000a00690, 0xc00029a0c0, 0xc0010ec400, 0x6e, 0x3d6)
	github.com/Mrs4s/go-cqhttp/server/websocket.go:379 +0x5a5
github.com/Mrs4s/go-cqhttp/server.(*webSocketServer).listenAPI.func2(0xc000a00690, 0xc0007aa060, 0xc000ceba10)
	github.com/Mrs4s/go-cqhttp/server/websocket.go:361 +0x9d
created by github.com/Mrs4s/go-cqhttp/server.(*webSocketServer).listenAPI
	github.com/Mrs4s/go-cqhttp/server/websocket.go:359 +0x10e
 
[2021-08-23 19:12:40] [INFO]: 接受 WebSocket 连接: 127.0.0.1:60306 (/) 

怀疑是启用了AutoMarkMessageRead导致的个别特殊API调用报错

错误截图或日志
需要具体核实情况可以QQ 415206409

转发消息的时候图片会变成cq码

使用环境

  • 框架版本号:1.4.1
  • 运行环境:docker

bug描述
详细描述bug的内容
进行消息转发的时候图片会变成cq码

如何复现

e.Reply(e.Message.MessageBody);

错误截图或日志
image

v1.0.0-rc28及以上版本的Log工具类无法在CentOS 8上使用

使用环境

  • 框架版本号:v1.0.0-rc28及以上
  • 运行环境:CentOS 8.2

bug描述
v1.0.0-rc28及以上版本时调用Log工具类不会在控制台有任何输出

如何复现
当我从v1.0.0-rc27及以下版本更换为更高版本时Log工具类失效
应该是因为更改了NuGet包导致的
v1.0.0-rc28及以上版本的YukariToolBox版本为 3.0.8
而v1.0.0-rc27及以下版本YukariToolBox版本为 2.0.0

错误截图或日志
v1.0.0-rc28及以上
image

v1.0.0-rc27及以下
image

命名空间污染

Sora.Entities.MessageElement.CQModel下的多个类名造成了命名空间污染,建议更名。
例如:
Image->CQImage
Text->CQText
...

依旧是关于SoraCommand中的MatchType

这里,提出新的bug,依旧是关于SoraCommand中的MatchType
在这个改过后的版本1.0.0-rc.73
现在KeyWord匹配变成了:只要出现其中一个字就会匹配
举例:依旧指南的例子,添加MatchType = Sora.Enumeration.MatchType.KeyWord 来匹配 坏耶
然而,你发送:“太坏了”,“坏”,“我觉得这个好耶”,“耶”
机器人就会回复“好耶”

v1.0.0-rc26中 Sora.Net.ConnectionManager.HeartBeatUpdate() 抛出 KeyNotFoundException

使用环境

  • 框架版本号:v1.0.0-rc26 7bccd2baf0
  • 运行环境:Windows Server 2019 Datacenter, .NET SDK 5.0.404

bug描述及如何复现
项目使用 SoraServiceFactory.CreateMultiService() 创建多个Sora服务实例
通过反向ws与多个go-cqhttp服务通讯
启动Sora约五分钟后 Sora.Net.ConnectionManager.HeartBeatUpdate() 抛出KeyNotFoundException

错误截图或日志
2022/1/2 14:39:49
System.Collections.Generic.KeyNotFoundException: The given key 'ced23f42-38af-4544-a057-79592660966c' was not present in the dictionary.
at System.Collections.Concurrent.ConcurrentDictionary`2.ThrowKeyNotFoundException(TKey key)
at Sora.Net.ConnectionManager.HeartBeatUpdate(Guid connectionGuid) in ..\Sora\Net\ConnectionManager.cs:line 177
at Sora.OnebotInterface.EventInterface.MetaAdapter(JObject messageJson, Guid connection) in ..\Sora\OnebotInterface\EventInterface.cs:line 314
at System.Threading.Tasks.Task.<>c.b__140_1(Object state)
at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

重连cqhttp失败,程序直接退出

使用环境

  • 框架版本号:0.9.9
  • 运行环境:winserver 2016 go-cqhttp v1.0.0 beta5

bug描述
重连go-cqhttp会失败并进程直接退出,必须先启动bot再启动go-cqhttp才能避免

如何复现

  1. 开启bot
  2. 开启cqhttp
  3. 关闭bot
  4. 开启bot

错误截图或日志

第一次:

[2021/8/29 20:26:22][ERROR][Sora]与Onebot客户端[127.0.0.1:49415]失去链接(心跳包超时)
[2021/8/29 20:26:22][ERROR][Sora]与Onebot客户端[127.0.0.1:49420]失去链接(心跳包超时)
[2021/8/29 20:26:22][ERROR][Sora]与Onebot客户端[127.0.0.1:49423]失去链接(心跳包超时)
[2021/8/29 20:26:22][FATAL][Sora]Websocket连接被关闭失败
[2021/8/29 20:26:22][FATAL][Sora]Websocket连接被关闭失败
[2021/8/29 20:26:22][FATAL][Sora]Websocket连接被关闭失败
[2021/8/29 20:26:22][WARNINIG][Sora]将在5s后自动退出
[2021/8/29 20:26:22][WARNINIG][Sora]将在5s后自动退出
[2021/8/29 20:26:22][WARNINIG][Sora]将在5s后自动退出

第二次:

[2021/8/29 20:28:47][ERROR][Sora]与Onebot客户端[127.0.0.1:49607]失去链接(心跳包超时)
[2021/8/29 20:28:47][ERROR][Sora]与Onebot客户端[127.0.0.1:49610]失去链接(心跳包超时)
[2021/8/29 20:28:47][ERROR][Sora]与Onebot客户端[127.0.0.1:49613]失去链接(心跳包超时)
[2021/8/29 20:28:47][ERROR][Sora]与Onebot客户端[127.0.0.1:49615]失去链接(心跳包超时)
[2021/8/29 20:28:47][ERROR][Sora]与Onebot客户端[127.0.0.1:49619]失去链接(心跳包超时)
[2021/8/29 20:28:47][ERROR][Sora]与Onebot客户端[127.0.0.1:49621]失去链接(心跳包超时)
[2021/8/29 20:28:47][INFO][Sora]客户端连接被关闭[127.0.0.1:49613]
[2021/8/29 20:28:47][INFO][Sora]客户端连接被关闭[127.0.0.1:49615]
[2021/8/29 20:28:47][INFO][Sora]客户端连接被关闭[127.0.0.1:49619]
[2021/8/29 20:28:47][INFO][Sora]客户端连接被关闭[127.0.0.1:49621]
[2021/8/29 20:28:47][ERROR][Sora]检查心跳包时发生错误 code -1, 连接[94f9fdde-9fe1-412c-851a-d9f156538d01]无法被关闭
FATAL][Sora]Websocket连接被关闭失败
[2021/8/29 20:28:47][FATAL][Sora]Websocket连接被关闭失败
[2021/8/29 20:28:47][ERROR][Sora]检查心跳包时发生错误 code -1, 连接[3704197d-d7dc-48c1-ad7f-8c131f21b5b5]无法被关闭
[2021/8/29 20:28:47][WARNINIG][Sora]将在5s后自动退出
[2021/8/29 20:28:47][WARNINIG][Sora]将在5s后自动退出
[2021/8/29 20:28:47][ERROR][Sora]检查心跳包时发生错误 code -1, 连接[895c40c8-e359-4111-8726-885f60cb5eb6]无法被关闭
[2021/8/29 20:28:47][ERROR][Sora]检查心跳包时发生错误 code -1, 连接[c977ebcd-909b-4348-a7c9-de01a263fe0d]无法被关闭
[2021/8/29 20:28:47][INFO][Sora]已连接客户端[127.0.0.1:49643]
[2021/8/29 20:28:47][INFO][Sora]已连接到go-cqhttp,版本:v1.0.0-beta5

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.