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

ANDROID_PAD协议下匿名成员使用sender.mute()时会出现java.lang.IllegalStateException #2626

Closed
MrY-Cat opened this issue Apr 14, 2023 · 0 comments · Fixed by #2711
Closed
Labels
N 优先级: 一般 s:core 子系统: mirai-core t:problem 类型: 不容易归类为特性或 bug 的综合问题
Milestone

Comments

@MrY-Cat
Copy link
Contributor

MrY-Cat commented Apr 14, 2023

问题描述

在执行该行代码时:sender.mute(60)//禁言1分钟
当sender是匿名成员时,会禁言失败抛出异常。
奇怪的是,我用两个机器人账号各试了5次,使用ANDROID_PAD协议的必定会触发这个异常,而使用MACOS协议的必定不会触发。

复现

ANDROID_PAD协议下使用似乎必发生

mirai-core 版本

2.14.0

bot-protocol

ANDROID_PAD

其他组件版本

No response

系统日志

java.lang.IllegalStateException: {"cgicode":100000,"retcode":100000,"msg":"login error [errcode:100000:0]","result":[]}
	at net.mamoe.mirai.internal.MiraiImpl.muteAnonymousMember$suspendImpl(MiraiImpl.kt:618)
	at net.mamoe.mirai.internal.MiraiImpl$muteAnonymousMember$1.invokeSuspend(MiraiImpl.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	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)

网络日志

No response

补充信息

MACOS协议不发生

@MrY-Cat MrY-Cat changed the title 匿名成员sender.mute(60)时偶发的java.lang.IllegalStateException ANDROID_PAD协议下匿名成员使用sender.mute()时会出现java.lang.IllegalStateException Apr 14, 2023
@Him188 Him188 added N 优先级: 一般 t:problem 类型: 不容易归类为特性或 bug 的综合问题 s:core 子系统: mirai-core labels Apr 15, 2023
@Him188 Him188 added this to the Backlog milestone Apr 15, 2023
@Karlatemp Karlatemp modified the milestones: Backlog, 2.15.0 Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
N 优先级: 一般 s:core 子系统: mirai-core t:problem 类型: 不容易归类为特性或 bug 的综合问题
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants