请求更新,支持更多的api
VantHoff 发布的帖子
-
通过mcl启动mirai时报错
问题描述
启动mirai时报错
复现
1.使用
stop
命令停止
2.使用./mcl
启动
3.报错产生mirai-core 版本
2.12.1
bot-protocol
ANDROID_PHONE
其他组件版本
2022-08-30 17:53:06 I/plugin: Successfully loaded plugin ApexLookUp v1.6.0 2022-08-30 17:53:06 I/plugin: Successfully loaded plugin net.mamoe.mirai-api-http v2.5.2 2022-08-30 17:53:06 I/plugin: Successfully loaded plugin OneBot v0.3.4 2022-08-30 17:53:06 I/plugin: Successfully loaded plugin Chat Command v0.5.0 2022-08-30 17:53:06 I/plugin: Successfully loaded plugin MCL Addon v2.0.2
系统日志
2022-08-30 17:53:09 E/main: NettyChannelException(message=null, cause=null) NettyChannelException(message=null, cause=null) at net.mamoe.mirai.internal.network.impl.netty.NettyNetworkHandler.createConnection$lambda-3(NettyNetworkHandler.kt:177) at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578) at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:552) at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491) at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616) at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:605) at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:104) at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:84) at io.netty.channel.AbstractChannel$CloseFuture.setClosed(AbstractChannel.java:1186) at io.netty.channel.AbstractChannel$AbstractUnsafe.doClose0(AbstractChannel.java:773) at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:749) at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:620) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.closeOnRead(AbstractNioByteChannel.java:105) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:174) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) 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:833) Suppressed: java.util.concurrent.CancellationException: NetworkHandler closed at kotlinx.coroutines.ExceptionsKt.CancellationException(Exceptions.kt:22) at kotlinx.coroutines.JobKt__JobKt.cancel(Job.kt:596) at kotlinx.coroutines.JobKt.cancel(Unknown Source) at net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport.close(NetworkHandlerSupport.kt:61) at net.mamoe.mirai.internal.network.impl.netty.NettyNetworkHandler.close(NettyNetworkHandler.kt:205) ... 22 more Caused by: [CIRCULAR REFERENCE: NettyChannelException(message=null, cause=null)] Suppressed: StateSwitchingException(old=StateLoading, new=StateClosed, cause=NettyChannelException(message=null, cause=null)) at net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport.setStateImpl$mirai_core(NetworkHandlerSupport.kt:302) at net.mamoe.mirai.internal.network.impl.netty.NettyNetworkHandler.close(NettyNetworkHandler.kt:422) ... 22 more Caused by: [CIRCULAR REFERENCE: NettyChannelException(message=null, cause=null)] Suppressed: [CIRCULAR REFERENCE: java.util.concurrent.CancellationException: NetworkHandler closed] 2022-08-30 17:53:09 I/Bot.1026152696: Bot cancelled: Bot closed
网络日志
补充信息
该问题在断线一分钟后仍未重连 #1361,中出现过。
-
RE: ApexLookUp - Apex英雄查询插件
最新版本调用报错
2022-05-01 20:34:09 W/RankLookUp: Exception in executing command `[mirai:source:[1015],[-444575135]]/apexmap` java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97) at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Instance.call(CallerImpl.kt:113) at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108) at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod$kotlin_reflection(KCallableImpl.kt:159) at kotlin.reflect.full.KCallables.callSuspendBy(KCallables.kt:74) at net.mamoe.mirai.console.internal.command.CommandReflector$findSubCommands$6$1.invokeSuspend(CommandReflector.kt:305) at net.mamoe.mirai.console.internal.command.CommandReflector$findSubCommands$6$1.invoke(CommandReflector.kt) at net.mamoe.mirai.console.internal.command.CommandReflector$findSubCommands$6$1.invoke(CommandReflector.kt) at net.mamoe.mirai.console.command.descriptor.CommandSignatureFromKFunctionImpl.call$suspendImpl(CommandSignature.kt:88) at net.mamoe.mirai.console.command.descriptor.CommandSignatureFromKFunctionImpl.call(CommandSignature.kt) at net.mamoe.mirai.console.internal.command.CommandManagerImplKt.executeCommandImpl(CommandManagerImpl.kt:167) at net.mamoe.mirai.console.command.CommandManager.executeCommand(CommandManager.kt:131) at net.mamoe.mirai.console.command.CommandManager$INSTANCE.executeCommand(CommandManager.kt) at net.mamoe.mirai.console.command.CommandManager.executeCommand$default(CommandManager.kt:126) at net.mamoe.mirai.console.plugins.chat.command.PluginMain.handleCommand(PluginMain.kt:86) at net.mamoe.mirai.console.plugins.chat.command.PluginMain$onEnable$2$1.invokeSuspend(PluginMain.kt:69) 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:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665) Caused by: javax.imageio.IIOException: Caught exception during read: at java.desktop/com.sun.imageio.plugins.png.PNGImageReader.read(Unknown Source) at java.desktop/javax.imageio.ImageIO.read(Unknown Source) at java.desktop/javax.imageio.ImageIO.read(Unknown Source) at pers.shennoter.ApexUtilsKt.ImageCache(ApexUtils.kt:29) at pers.shennoter.MapStatKt.mapPictureMode(MapStat.kt:45) at pers.shennoter.MapStatKt.mapStat(MapStat.kt:33) at pers.shennoter.Map.apexMapInfo(RankLookUp.kt:77) ... 26 more Caused by: java.lang.IndexOutOfBoundsException at java.base/java.io.RandomAccessFile.readBytes(Native Method) at java.base/java.io.RandomAccessFile.read(Unknown Source) at java.desktop/javax.imageio.stream.FileImageInputStream.read(Unknown Source) at java.desktop/com.sun.imageio.plugins.common.SubImageInputStream.read(Unknown Source) at java.desktop/com.sun.imageio.plugins.common.InputStreamAdapter.read(Unknown Source) at java.base/java.io.SequenceInputStream.read(Unknown Source) at java.base/java.util.zip.InflaterInputStream.fill(Unknown Source) at java.base/java.util.zip.InflaterInputStream.read(Unknown Source) at java.base/java.io.BufferedInputStream.fill(Unknown Source) at java.base/java.io.BufferedInputStream.read1(Unknown Source) at java.base/java.io.BufferedInputStream.read(Unknown Source) at java.base/java.io.DataInputStream.readFully(Unknown Source) at java.desktop/com.sun.imageio.plugins.png.PNGImageReader.decodePass(Unknown Source) at java.desktop/com.sun.imageio.plugins.png.PNGImageReader.decodeImage(Unknown Source) at java.desktop/com.sun.imageio.plugins.png.PNGImageReader.readImage(Unknown Source) ... 33 more
-
提示安全问题?
用一段时间就会报错这个内容,应该怎么处理呢?
2022-05-01 13:30:55 E/ExternalResourceLeakObserver: A resource leak occurred, use ExternalResource.close to avoid it!! (holder=net.mamoe.mirai.internal.utils.ExternalResourceImplByFile$ResourceHolder@11215370). Add jvm option `-Dmirai.resource.creation.stack.enabled=true` to show creation stack track
-
当有多个程序需要调用http接口时,应该如何书写配置文件?
我现在正在使用
Amiya-Bot
和ChatLearning
两个程序,两个程序都要求使用http接口,应该怎样正确书写mirai-api-http的配置文件呢?
我目前的配置文件是这样的:adapters: - http - ws debug: false enableVerify: true verifyKey: AmiyaBot singleMode: false cacheSize: 4096 adapterSettings: http: host: 127.0.0.1 port: 8096 cors: [*] ws: host: 127.0.0.1 port: 8060 reservedSyncId: -1 http: host: 127.0.0.1 port: 8097 cors: [*]
这样使用的话会出现两个程序都无法正确上报回复内容,应该怎么修改呢?
如果我想使用两个不同的verifyKey
的话,应该怎么书写呢? -
RE: ChatLearning——让bot学会你的群聊
@Koreyoshi 在 ChatLearning——让bot学会你的群聊 中说:
项目地址:ChatLearning
下载地址:ChatLearningReleases使用ChatLearning前请先安装并配置好mirai-api-http插件
完成配置后打开ChatLearning目录下的data.json文件填入配置信息:
{ "Key": "xxxxx", //在mirai-api-http中设置的密钥 "host": "127.0.0.1:8080", //mirai-api-http中设置的地址(若设置成0.0.0.0,请填写127.0.0.1) "port": "8080", //mirai-api-httpmirai-api-http中设置的端口 "qq": "xxx", //所登录mirai的QQ号 "session": "xxx" //任意,由程序自动获取 }
以上步骤完成后,Windows用户点击Chatmain.exe运行
Linux用户则使用python运行Chatmain.py脚本 (python版本需为3.5以上)
输入help来查看命令列表
详细说明请见README
来自@daisy524 提供的创意点子
以下是ChatLearning的效果图(收集了大约一天的词库,图中绿牌是bot,甚至还能斗图)
欢迎提出bug和提供后续更新意见!
兄啊,linux里面根本没有这个
data.json
文件啊 -
腾讯识别mirai为非官方客户端了?
使用提醒:
Caused by: [CIRCULAR REFERENCE: net.mamoe.mirai.network.WrongPasswordException: Error(bot=Bot(1026152696), code=40, title=安全提醒, message=该帐号因使用非官方QQ客户端被暂时冻结,请点击下方按钮了解详情及处理。, errorInfo=)]