Nekoer / mirai-plugins-pixiv

可查看pixiv排行榜,作者作品,插画图片等等
GNU Affero General Public License v3.0
122 stars 19 forks source link

当加载插件时MCL报错并崩溃 #51

Closed tiehu closed 2 years ago

tiehu commented 2 years ago

问题描述

使用mirai console-2.12.0加载最新版本插件mirai-plugins-pixiv-1.7.4-fix出现崩溃,已附上控制台日志输出(不知道为什么有些字符变成了乱码,另在mirai console运行过程中中文显示为?)。 运行环境: 系统:Debian10 平台:ARM 64(由于Mirai Android安装不上,在移动平台上利用Linux Deploy部署Linux) 其他已安装的插件有mcl-addon、mirai-api-https和chat-command。 在我的环境下该bug复现率为100%。

复现

1.手动部署或使用mcl-installer部署mcl(实测无论用哪一个都会出现此问题)。 2.安装mcl-addon、mirai-api-https和chat-command。 3.安装本插件(手动安装或使用一键安装命令都会出现此问题)。 4,运行mcl,片刻之后报错,mcl崩溃。

pixiv 版本

1.7.4-fix

系统日志

日志来自mcl根目录下的logs文件夹:
2022-08-02 16:50:04 I/main: Starting mirai-console...
2022-08-02 16:50:04 I/main: Backend: version 2.12.0, built on 2022-07-03 10:57:58.
2022-08-02 16:50:04 I/main: Frontend Terminal: version 2.12.0, provided by Mamoe Technologies
2022-08-02 16:50:04 I/main: Welcome to visit https://mirai.mamoe.net/
2022-08-02 16:50:06 W/stderr: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
2022-08-02 16:50:06 W/stderr: SLF4J: Defaulting to no-operation (NOP) logger implementation
2022-08-02 16:50:06 W/stderr: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2022-08-02 16:50:07 I/plugin: Cannot load plugin pixiv插画 v1.7.4
2022-08-02 16:50:07 E/main: Failed to init MiraiConsole.
net.mamoe.mirai.console.plugin.loader.PluginLoadException: Exception while loading pixiv插画 v1.7.4
    at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.load(BuiltInJvmPluginLoaderImpl.kt:258)
    at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.load(BuiltInJvmPluginLoaderImpl.kt:35)
    at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.load(JvmPluginLoader.kt)
    at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.load(JvmPluginLoader.kt:50)
    at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.loadPluginNoEnable(PluginManagerImpl.kt:93)
    at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.loadAllPluginsUsingBuiltInLoaders$mirai_console(PluginManagerImpl.kt:149)
    at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:178)
    at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:464)
    at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:168)
    at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:167)
    at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:52)
    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 org.itxtech.mcl.Utility.bootJars(Utility.java:89)
    at org.itxtech.mcl.Utility.bootJars(Utility.java:79)
    at org.itxtech.mcl.Utility.bootMirai(Utility.java:101)
    at org.itxtech.mcl.module.builtin.Boot.boot(Boot.java:109)
    at org.itxtech.mcl.module.ModuleManager.phaseBoot(ModuleManager.java:148)
    at org.itxtech.mcl.Loader.lambda$start$4(Loader.java:189)
    at org.itxtech.mcl.Loader.tryCatching(Loader.java:146)
    at org.itxtech.mcl.Loader.start(Loader.java:189)
    at org.itxtech.mcl.Loader.main(Loader.java:79)
Caused by: java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: pixiv插画
    at java.base/sun.nio.fs.UnixPath.encode(Unknown Source)
    at java.base/sun.nio.fs.UnixPath.<init>(Unknown Source)
    at java.base/sun.nio.fs.UnixFileSystem.getPath(Unknown Source)
    at java.base/java.nio.file.Path.resolve(Unknown Source)
    at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.moveNameFolder(BuiltInJvmPluginLoaderImpl.kt:197)
    at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.load(BuiltInJvmPluginLoaderImpl.kt:237)
    ... 23 more


网络日志

未在bots/<****>/logs找到日志文件

补充信息

No response

Nekoer commented 2 years ago

请检查你的shell编码是否为utf-8

tiehu commented 2 years ago

感谢帮助,不过就在几分钟前我刚好自己解决了问题,的确是系统编码的问题,安装locales并设置默认编码为zh_CN-UTF-8后问题解决