二维码扫码登录
-
扫码好像默认是手表协议登录?手表好像收不到戳一戳消息,无法对戳一戳相关进行回复,如果用其他协议扫码登录会报错,和戳一戳相关的功能用不了......
-
请问这个扫码自动登录是不是在加载其他插件之前,我的插件获取不到登陆成功的事件怎么办?
-
@我带你们打 扫码登录插件会在启用时执行自动登录。
如果你只是单纯想在机器人登录后获取机器人的群什么的,你可以注册扩展,注册 PostStartupExtension 以便在控制台完全加载完毕 (即插件全部启用并自动登录完毕) 后执行操作。 -
@MrXiaoM 谢谢
-
可能有插件兼容问题,在第二次启动以后均出现了此异常,需要删除config\top.mrxiaom.qrlogin的文件才能正常使用(也仅限第一次)
2023-04-27 00:31:31 E/QRLogin: net.mamoe.yamlkt.YamlDecodingException: Top-level decoder: deserializing nested class for 'accounts' in 'AutoLogin'
heartbeatStrategy: STAT_HB
^ at line 7, column 33net.mamoe.yamlkt.YamlDecodingException: Top-level decoder: deserializing nested class for 'accounts' in 'AutoLogin'
heartbeatStrategy: STAT_HB
^ at line 7, column 33at net.mamoe.yamlkt.internal.YamlUtils__ContextualExceptionKt.contextualDecodingException(ContextualException.kt:154) at net.mamoe.yamlkt.internal.YamlUtils.contextualDecodingException(Unknown Source) at net.mamoe.yamlkt.internal.YamlDecoder$AbstractDecoder.decodeSerializableElement(YamlDecoder.kt:181) at kotlinx.serialization.encoding.CompositeDecoder$DefaultImpls.decodeSerializableElement$default(Decoding.kt:533) at net.mamoe.mirai.console.internal.data.PluginDataImpl$updaterSerializer$1.deserialize(PluginDataImpl.kt:85) at net.mamoe.mirai.console.internal.data.PluginDataImpl$updaterSerializer$1.deserialize(PluginDataImpl.kt:47) at net.mamoe.yamlkt.Yaml.decodeFromString(Yaml.kt:162) at net.mamoe.mirai.console.internal.data.MultiFilePluginDataStorageImpl.load(MultiFilePluginDataStorageImpl.kt:45) at net.mamoe.mirai.console.plugin.jvm.AbstractJvmPlugin.reloadPluginConfig(AbstractJvmPlugin.kt:61) at mirai-console-dev-qrlogin-0.1.6.mirai2.jar//top.mrxiaom.qrlogin.QRLogin.onEnable(QRLogin.kt:34) at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal.internalOnEnable$mirai_console(JvmPluginInternal.kt:232) at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:305) at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:35) at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt) at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt:50) at net.mamoe.mirai.console.plugin.PluginManager.enablePlugin(PluginManager.kt:173) at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.enableAllLoadedPlugins$mirai_console(PluginManagerImpl.kt:181) at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:359) at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:500) at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:177) at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:176) at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:54) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.itxtech.mcl.Utility.bootJars(Utility.java:86) at org.itxtech.mcl.Utility.bootJars(Utility.java:76) at org.itxtech.mcl.Utility.bootMirai(Utility.java:98) at org.itxtech.mcl.module.builtin.Boot.boot(Boot.java:113) at org.itxtech.mcl.module.ModuleManager.phaseBoot(ModuleManager.java:123) at org.itxtech.mcl.Loader.lambda$start$4(Loader.java:196) at org.itxtech.mcl.Loader.tryCatching(Loader.java:151) at org.itxtech.mcl.Loader.start(Loader.java:196) at org.itxtech.mcl.Loader.main(Loader.java:84)
Caused by: net.mamoe.yamlkt.YamlDecodingException: Top-level decoder: deserializing nested class for '0' in 'kotlin.collections.ArrayList'
enable: true
^ at line 6, column 19at net.mamoe.yamlkt.internal.YamlUtils__ContextualExceptionKt.contextualDecodingException(ContextualException.kt:154) at net.mamoe.yamlkt.internal.YamlUtils.contextualDecodingException(Unknown Source) at net.mamoe.yamlkt.internal.YamlDecoder$AbstractDecoder.decodeSerializableElement(YamlDecoder.kt:181) at kotlinx.serialization.encoding.CompositeDecoder$DefaultImpls.decodeSerializableElement$default(Decoding.kt:533) at kotlinx.serialization.internal.CollectionLikeSerializer.readElement(CollectionSerializers.kt:80) at kotlinx.serialization.internal.AbstractCollectionSerializer.readElement$default(CollectionSerializers.kt:51) at kotlinx.serialization.internal.AbstractCollectionSerializer.merge(CollectionSerializers.kt:36) at kotlinx.serialization.internal.AbstractCollectionSerializer.deserialize(CollectionSerializers.kt:43) at net.mamoe.mirai.console.data.SerializableValue$Companion$serializableValueWith$$inlined$map$1.deserialize(serializerHelper.kt:170) at net.mamoe.yamlkt.internal.YamlDecoder$AbstractDecoder.decodeSerializableElement(YamlDecoder.kt:179) ... 32 more
Caused by: net.mamoe.yamlkt.YamlDecodingException: Top-level decoder: deserializing nested class for 'configuration' in 'top.mrxiaom.qrlogin.QRAutoLoginConfig.Account'
device: device.json
^ at line 5, column 26at net.mamoe.yamlkt.internal.YamlUtils__ContextualExceptionKt.contextualDecodingException(ContextualException.kt:154) at net.mamoe.yamlkt.internal.YamlUtils.contextualDecodingException(Unknown Source) at net.mamoe.yamlkt.internal.YamlDecoder$AbstractDecoder.decodeSerializableElement(YamlDecoder.kt:181) at mirai-console-dev-qrlogin-0.1.6.mirai2.jar//top.mrxiaom.qrlogin.QRAutoLoginConfig$Account$$serializer.deserialize(QRAutoLoginConfig.kt:28) at mirai-console-dev-qrlogin-0.1.6.mirai2.jar//top.mrxiaom.qrlogin.QRAutoLoginConfig$Account$$serializer.deserialize(QRAutoLoginConfig.kt:28) at net.mamoe.yamlkt.internal.YamlDecoder$AbstractDecoder.decodeSerializableElement(YamlDecoder.kt:179) ... 39 more
Caused by: net.mamoe.yamlkt.YamlDecodingException: Top-level decoder: deserializing nested class for '1' in 'kotlin.collections.LinkedHashMap'
device: device.json
^ at line 5, column 14at net.mamoe.yamlkt.internal.YamlUtils__ContextualExceptionKt.contextualDecodingException(ContextualException.kt:154) at net.mamoe.yamlkt.internal.YamlUtils.contextualDecodingException(Unknown Source) at net.mamoe.yamlkt.internal.YamlDecoder$AbstractDecoder.decodeSerializableElement(YamlDecoder.kt:181) at kotlinx.serialization.encoding.CompositeDecoder$DefaultImpls.decodeSerializableElement$default(Decoding.kt:533) at kotlinx.serialization.internal.MapLikeSerializer.readElement(CollectionSerializers.kt:111) at kotlinx.serialization.internal.MapLikeSerializer.readElement(CollectionSerializers.kt:84) at kotlinx.serialization.internal.AbstractCollectionSerializer.readElement$default(CollectionSerializers.kt:51) at kotlinx.serialization.internal.AbstractCollectionSerializer.merge(CollectionSerializers.kt:36) at kotlinx.serialization.internal.AbstractCollectionSerializer.deserialize(CollectionSerializers.kt:43) at net.mamoe.yamlkt.internal.YamlDecoder$AbstractDecoder.decodeSerializableElement(YamlDecoder.kt:179) ... 42 more
Caused by: java.lang.ClassCastException: class net.mamoe.yamlkt.internal.YamlDecoder$YamlStringDecoder cannot be cast to class net.mamoe.yamlkt.internal.YamlDecoder$AbstractDecoder (net.mamoe.yamlkt.internal.YamlDecoder$YamlStringDecoder is in unnamed module of loader 'app'; net.mamoe.yamlkt.internal.YamlDecoder$AbstractDecoder is in unnamed module of loader 'onebot-mirai-0.3.4-all.jar' @54a2d96e)
at onebot-mirai-0.3.4-all.jar//net.mamoe.yamlkt.YamlDynamicSerializer.deserialize(YamlDynamicSerializer.kt:63)
at net.mamoe.yamlkt.internal.YamlDecoder$AbstractDecoder.decodeSerializableElement(YamlDecoder.kt:179)
... 49 more -
-
@lovecpm 我跟你说过,是 yamlkt 依赖冲突了。另外,你应该要求已经两年没发版、没有遵守 mirai2 格式打包的 onebot-mirai 而不是要求我去兼容这个已经严重过时的插件。
-
@cssxsh 文档只写了2. 登录
处理滑动验证码
常见登录失败原因
没有扫码相关的 -
@jianguov 扫码目前是测试版功能,接口没有完全确定,在以后的版本中接口可能会改动,没有文档。只有在 2.15.0-M1 的 Release Note 有扫码登录用法。
-
@MrXiaoM 好的谢谢,我找到了https://github.com/mamoe/mirai/releases
-
-
-
感谢已经完美解决
-
感谢LZ,所有协议全部45,手表协议238的情况下解决了问题
-
@MrXiaoM 难怪我搞了一下午都一直报错……可是我严重依赖这个插件……头疼……
-
0.1.7 更新:
- 修复一处拼写错误。
- 将二维码文件挪到
./data/top.mrxiaom.qrlogin
文件夹 - 新增 不覆盖登录解决器选项
- 更新文档
-
报错应该怎么解决
> /qrlogin 2634732881 2023-05-12 14:47:54 I/QRLoginSolver: 登录解决器更换为 QRLoginSolver Login failed: net.mamoe.mirai.internal.network.auth.ProducerFailureException 2023-05-12 14:47:54 E/console: net.mamoe.mirai.internal.network.auth.ProducerFailureException net.mamoe.mirai.internal.network.auth.ProducerFailureException at net.mamoe.mirai.internal.network.auth.CoroutineOnDemandValueScope.receiveOrNull(CoroutineOnDemandValueScope.kt:152) at net.mamoe.mirai.internal.network.auth.AuthControl.acquireAuth(AuthControl.kt:98) at net.mamoe.mirai.internal.network.components.SsoProcessorImpl.login(SsoProcessor.kt:219) at net.mamoe.mirai.internal.network.components.SsoProcessorImpl$login$1.invokeSuspend(SsoProcessor.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 net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:138) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:112) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:14) at net.mamoe.mirai.internal.deps.io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:62) 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: net.mamoe.mirai.internal.network.auth.IllegalProducerStateException: ProducerReady at net.mamoe.mirai.internal.network.auth.CoroutineOnDemandValueScope$Producer.emit(CoroutineOnDemandValueScope.kt:76) at net.mamoe.mirai.internal.network.auth.AuthControl$userDecisions$1$sessionImpl$1.authByQRCode(AuthControl.kt:53) at net.mamoe.mirai.internal.network.auth.DefaultBotAuthorizationFactoryImpl$byQRCode$1.authorize(DefaultBotAuthorizationFactoryImpl.kt:46) at net.mamoe.mirai.internal.network.auth.AuthControl$userDecisions$1.invokeSuspend(AuthControl.kt:77) at net.mamoe.mirai.internal.network.auth.AuthControl$userDecisions$1.invoke(AuthControl.kt) at net.mamoe.mirai.internal.network.auth.AuthControl$userDecisions$1.invoke(AuthControl.kt) at net.mamoe.mirai.internal.network.auth.CoroutineOnDemandValueScope$Producer$1.invokeSuspend(CoroutineOnDemandValueScope.kt:50) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) ... 5 more 2023-05-12 14:47:54 I/Bot.2634732881: Bot cancelled: Bot closed
-
@kaixinol 出现 IllegalProducerStateException 建议重启 mirai 或者多试几次,这是 mirai 测试版的已知bug
-
此回复已被删除! -
此回复已被删除! -
0.1.8 更新:
- 修复 Linux 系统无桌面环境下不可使用本插件的问题
- 修复二维码图片没有重定向到 data 文件夹的问题
- 增加风控提示
-