MiraiForum

    • 注册
    • 登录
    • 搜索
    • 热门
    • 最新
    • 未解决
    • 标签
    • 群组
    • 友情链接
    1. 主页
    2. 青九CL
    3. 帖子
    • 资料
    • 关注 0
    • 粉丝 0
    • 主题 3
    • 帖子 11
    • 最佳 1
    • 有争议的 0
    • 群组 1

    青九CL 发布的帖子

    • RE: 监听好友添加成功事件,给这个新好友发消息报错

      @MrXiaoM 在 监听好友添加成功事件,给这个新好友发消息报错 中说:

      数据同步没有跟上,等待几秒后再发送消息

      好的,有延迟啊

      发布在 开发交流
      青九CL
      青九CL
    • 监听好友添加成功事件,给这个新好友发消息报错

      大佬们,求解
      监听的FriendAddEvent事件,但是发消息报错
      代码:

        @EventHandler
          private void onNewFriendRequest(NewFriendRequestEvent event) {
              event.accept();
          }
      
          @EventHandler
          private void onFriendAdd(FriendAddEvent event) {
              Friend f = event.getFriend();
              long qq = f.getId();
      
              f.sendMessage("添加好友成功"+qq);
          }
      

      报错信息:

      2023-06-19 21:41:32 V/Bot.934346886: Event: FriendDeleteEvent(friend=Friend(2640907048))
      2023-06-19 21:41:48 V/Bot.934346886: Event: NewFriendRequestEvent(bot=Bot(934346886), eventId=1687182109000000, message=我是sc, fromId=2640907048, fromGroupId=0, fromNick=sc111)
      2023-06-19 21:41:48 V/Bot.934346886: Event: FriendAddEvent(friend=Friend(2640907048))
      2023-06-19 21:41:48 E/Bot.934346886: java.lang.IllegalStateException: Exception while broadcasting event 'FriendAddEvent'
      java.lang.IllegalStateException: Exception while broadcasting event 'FriendAddEvent'
      	at net.mamoe.mirai.internal.network.components.EventDispatcherImpl.broadcast$suspendImpl(EventDispatcher.kt:104)
      	at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcast$1.invokeSuspend(EventDispatcher.kt)
      	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
      	at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:233)
      	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
      	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
      	at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:283)
      	at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith$default(DispatchedContinuation.kt:278)
      	at kotlinx.coroutines.DispatchedCoroutine.afterResume(Builders.common.kt:260)
      	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.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
      	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
      	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: 未找到异常处理器. 请继承 SimpleListenerHost 中的 handleException 方法, 或在构造 SimpleListenerHost 时提供 CoroutineExceptionHandler
      ------------
      Cannot find exception handler from coroutineContext. 
      Please extend SimpleListenerHost.handleException or provide a CoroutineExceptionHandler to the constructor of SimpleListenerHost
      	at net.mamoe.mirai.event.SimpleListenerHost.handleException(JvmMethodListeners.kt:192)
      	at net.mamoe.mirai.event.SimpleListenerHost$special$$inlined$CoroutineExceptionHandler$1.handleException(CoroutineExceptionHandler.kt:111)
      	at net.mamoe.mirai.internal.event.SafeListener.onEvent(SafeListener.kt:75)
      	at net.mamoe.mirai.internal.event.SafeListener$onEvent$1.invokeSuspend(SafeListener.kt)
      	... 16 more
      Caused by: net.mamoe.mirai.event.ExceptionInEventHandlerException: Exception in EventHandler
      	at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:147)
      	at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.access$registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:1)
      	at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt$registerEventHandler$callMethod$2.invokeSuspend(JvmMethodListenersInternal.kt:154)
      	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
      	... 7 more
      Caused by: java.lang.reflect.InvocationTargetException
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:140)
      	... 10 more
      Caused by: java.lang.IllegalStateException: Send message failed: MessageSvcPbSendMsg.Response.Failed(resultType=16, errorCode=0, errorMessage=发送失败,请先添加对方为好友)
      	at net.mamoe.mirai.internal.message.protocol.impl.GeneralMessageSenderProtocol$GeneralMessageSender.sendSinglePacket(GeneralMessageSenderProtocol.kt:173)
      	at net.mamoe.mirai.internal.message.protocol.impl.GeneralMessageSenderProtocol$GeneralMessageSender.access$sendSinglePacket(GeneralMessageSenderProtocol.kt:52)
      	at net.mamoe.mirai.internal.message.protocol.impl.GeneralMessageSenderProtocol$GeneralMessageSender$sendSinglePacket$1.invokeSuspend(GeneralMessageSenderProtocol.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.DispatchedTaskKt.resume(DispatchedTask.kt:178)
      	at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:166)
      	at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:397)
      	at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:431)
      	at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:420)
      	at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:328)
      	at kotlinx.coroutines.ResumeAwaitOnCompletion.invoke(JobSupport.kt:1413)
      	at kotlinx.coroutines.JobSupport.completeStateFinalization(JobSupport.kt:318)
      	at kotlinx.coroutines.JobSupport.tryFinalizeSimpleState(JobSupport.kt:295)
      	at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:856)
      	at kotlinx.coroutines.JobSupport.makeCompleting$kotlinx_coroutines_core(JobSupport.kt:806)
      	at kotlinx.coroutines.CompletableDeferredImpl.complete(CompletableDeferred.kt:92)
      	at net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport.collectReceived$mirai_core(NetworkHandlerSupport.kt:102)
      	at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$PacketDecodePipeline.processBody(CommonNetworkHandler.kt:161)
      	at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$PacketDecodePipeline.access$processBody(CommonNetworkHandler.kt:103)
      	at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$PacketDecodePipeline$1$3$1.invokeSuspend(CommonNetworkHandler.kt:127)
      	at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$PacketDecodePipeline$1$3$1.invoke(CommonNetworkHandler.kt)
      	at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$PacketDecodePipeline$1$3$1.invoke(CommonNetworkHandler.kt)
      	at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:55)
      	at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:112)
      	at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
      	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)
      	at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
      	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47)
      	at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source)
      	at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$PacketDecodePipeline$1.invokeSuspend(CommonNetworkHandler.kt:127)
      	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
      	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
      	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
      	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
      	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
      	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
      	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
      	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      
      
      发布在 开发交流
      青九CL
      青九CL
    • RE: 目前有什么方法能解决机器人风控吗

      可以试试下载这个里的console-runtime包,运行一次之后把device.json删除,把这个插件放进去,登录协议用AndroidPad密码登录,我这里用了几个星期一直没风控

      发布在 技术交流板块
      青九CL
      青九CL
    • RE: 8.8.88 + 2.15.0-dev-98 用了两天就报235了,有解决办法吗

      @cssxsh 在 协议问题汇报 中说:

      @青九CL 在 协议问题汇报 中说:

      [CIRCULAR REFERENCE:net.mamoe.mirai.network.WrongPasswordException: Error(bot=Bot(...), code=235, title=温馨提示, message=当前QQ版本过低,请升级至最新版本后再登录。点击进入下载页面, errorInfo= )]

      删掉 bot/.../device.json 让设备信息重新生成

      你可以安装这个插件 https://github.com/cssxsh/mirai-device-generator/releases/tag/v1.2.0
      它可以生成更拟真的设备信息

      发布在 使用交流
      青九CL
      青九CL
    • RE: 协议问题汇报

      @cssxsh 在 协议问题汇报 中说:

      @青九CL 在 协议问题汇报 中说:

      [CIRCULAR REFERENCE:net.mamoe.mirai.network.WrongPasswordException: Error(bot=Bot(...), code=235, title=温馨提示, message=当前QQ版本过低,请升级至最新版本后再登录。点击进入下载页面, errorInfo= )]

      删掉 bot/.../device.json 让设备信息重新生成

      你可以安装这个插件 https://github.com/cssxsh/mirai-device-generator/releases/tag/v1.2.0
      它可以生成更拟真的设备信息

      呜呼,直接登录成功!感谢!

      发布在 官方公告
      青九CL
      青九CL
    • 8.8.88 + 2.15.0-dev-98 用了两天就报235了,有解决办法吗

      如题。。

      发布在 使用交流
      青九CL
      青九CL
    • RE: 协议问题汇报

      1.mirai 版本

      ===============================[ Mirai console 2.15.0-dev-98 ]================================
       __       __ __                   __  ______                                      __
      |  \     /  \  \                 |  \/      \                                    |  \
      | ▓▓\   /  ▓▓\▓▓ ______   ______  \▓▓  ▓▓▓▓▓▓\ ______  _______   _______  ______ | ▓▓ ______
      | ▓▓▓\ /  ▓▓▓  \/      \ |      \|  \ ▓▓   \▓▓/      \|       \ /       \/      \| ▓▓/      \
      | ▓▓▓▓\  ▓▓▓▓ ▓▓  ▓▓▓▓▓▓\ \▓▓▓▓▓▓\ ▓▓ ▓▓     |  ▓▓▓▓▓▓\ ▓▓▓▓▓▓▓\  ▓▓▓▓▓▓▓  ▓▓▓▓▓▓\ ▓▓  ▓▓▓▓▓▓\
      | ▓▓\▓▓ ▓▓ ▓▓ ▓▓ ▓▓   \▓▓/      ▓▓ ▓▓ ▓▓   __| ▓▓  | ▓▓ ▓▓  | ▓▓\▓▓    \| ▓▓  | ▓▓ ▓▓ ▓▓    ▓▓
      | ▓▓ \▓▓▓| ▓▓ ▓▓ ▓▓     |  ▓▓▓▓▓▓▓ ▓▓ ▓▓__/  \ ▓▓__/ ▓▓ ▓▓  | ▓▓_\▓▓▓▓▓▓\ ▓▓__/ ▓▓ ▓▓ ▓▓▓▓▓▓▓▓
      | ▓▓  \▓ | ▓▓ ▓▓ ▓▓      \▓▓    ▓▓ ▓▓\▓▓    ▓▓\▓▓    ▓▓ ▓▓  | ▓▓       ▓▓\▓▓    ▓▓ ▓▓\▓▓     \
       \▓▓      \▓▓\▓▓\▓▓       \▓▓▓▓▓▓▓\▓▓ \▓▓▓▓▓▓  \▓▓▓▓▓▓ \▓▓   \▓▓\▓▓▓▓▓▓▓  \▓▓▓▓▓▓ \▓▓ \▓▓▓▓▓▓▓
      
      
      2023-06-15 14:22:11 I/main: Backend: version 2.15.0-dev-98, built on 2023-06-04 07:47:48.
      2023-06-15 14:22:11 I/main: Frontend Terminal: version 2.15.0-dev-98, provided by Mamoe Technologies
      
      

      2.协议版本信息

      2023-06-15 14:22:15 I/fix-protocol-version: 当前各协议版本日期: 
      ANDROID_PHONE  8.9.58.11170  2023-05-19T11:35+08:00
      ANDROID_PAD    8.8.88.7083   2022-03-23T11:01:55+08:00
      ANDROID_WATCH  2.0.8         2019-06-03T20:25:31+08:00
      IPAD           8.9.33.614    2021-12-31T11:36:26+08:00
      MACOS          6.7.9         1970-01-01T08:00+08:00
      
      

      3.登录方式及使用的协议

      密码登录(ANDROID_PAD)
      

      4.出现的问题
      登录不上,日志为

      2023-06-15 14:22:55 I/TLV544Provider: t544 command: 810_2
      2023-06-15 14:22:55 E/main: net.mamoe.mirai.network.BotAuthorizationException: BotAuthorization(BotAuthorization.byPassword(<ERASED>)) threw an exception during authorization process. See cause below.
      net.mamoe.mirai.network.BotAuthorizationException: BotAuthorization(BotAuthorization.byPassword(<ERASED>)) threw an exception during authorization process. See cause below.
      	at net.mamoe.mirai.internal.network.components.SsoProcessorImpl.login(SsoProcessor.kt:242)
      	at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$StateConnecting$startState$2.invokeSuspend(CommonNetworkHandler.kt:247)
      	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)
      	Suppressed: net.mamoe.mirai.network.WrongPasswordException: Error(bot=Bot(1940182146), code=235, title=温馨提示, message=当前QQ版本过低,请升级至最新版本后再登录。点击进入下载页面, errorInfo= )
      		at net.mamoe.mirai.internal.network.components.SsoProcessorImpl$SlowLoginImpl.doLogin(SsoProcessor.kt:469)
      		at net.mamoe.mirai.internal.network.components.SsoProcessorImpl$SlowLoginImpl$doLogin$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)
      		... 5 more
      	[CIRCULAR REFERENCE:net.mamoe.mirai.network.WrongPasswordException: Error(bot=Bot(1940182146), code=235, title=温馨提示, message=当前QQ版本过低,请升级至最新版本后再登录。点击进入下载页面, errorInfo= )]
      
      2023-06-15 14:22:55 I/Bot.1940182146: Bot cancelled: Bot closed
      2023-06-15 14:22:55 V/Bot.1940182146: Event: net.mamoe.mirai.console.events.AutoLoginEvent$Failure@44ccd75c
      2023-06-15 14:22:55 I/main: mirai-console started successfully.
      
      发布在 官方公告
      青九CL
      青九CL
    • RE: idea社区版使用插件新建项目失败

      @六芒星界 好的感谢,我试试

      发布在 开发交流
      青九CL
      青九CL
    • idea社区版使用插件新建项目失败

      小白不会用,大神帮忙看看怎么解决。。下面的那些都点过了也不行

      org/gradle/api/plugins/MavenPlugin
      
      * Try:
      > Run with --stacktrace option to get the stack trace.
      > Run with --info or --debug option to get more log output.
      > Run with --scan to get full insights.
      
      发布在 开发交流
      青九CL
      青九CL
    • RE: [DEPRECATED] mirai-compose:跨平台、图形化、易安装的mirai-console客户端

      太棒了

      发布在 项目发布
      青九CL
      青九CL
    • 1 / 1