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

奇奇怪怪的报错 #6

Closed
itzdrli opened this issue Jul 13, 2022 · 8 comments
Closed

奇奇怪怪的报错 #6

itzdrli opened this issue Jul 13, 2022 · 8 comments
Labels
question Further information is requested

Comments

@itzdrli
Copy link

itzdrli commented Jul 13, 2022

不知道为啥在输入/mcp xxx.xxx.xxx时有时会产生报错:

2022-07-13 19:42:10 W/Minecraft MOTD Fetcher: Exception in executing command `[mirai:source:ids=[15185], internalIds=[1402271165], from friend 3327930436 to 486237638 at 1657712530]/mcp mc.dlmc.cc`
java.lang.NoClassDefFoundError: Could not initialize class org.xbill.DNS.Lookup
        at McMotd-1.1.6.jar//org.zrnq.mclient.MClientKt.pingInternal(MClient.kt:26)
        at McMotd-1.1.6.jar//org.zrnq.mcmotd.QueryCommand$doPing$2.invokeSuspend(QueryCommand.kt:56)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        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:749)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

2022-07-13 19:42:10 V/Bot.486237638: Itz_Dr_Li(3327930436) -> /mcp mc.dlmc.cc

但是有时查其他服不会产生,并且报错后不会返回图片等消息,如下:
图片
以及单输入/mcp时也有问题(在已经绑定服务器的情况下)

2022-07-13 19:44:57 W/Minecraft MOTD Fetcher: Exception in executing command `[mirai:source:ids=[100485], internalIds=[-837464222], from group 3327930436 to 333160053 at 1657712697]/mcp`
java.lang.NoClassDefFoundError: Could not initialize class org.xbill.DNS.Lookup
        at McMotd-1.1.6.jar//org.zrnq.mclient.MClientKt.pingInternal(MClient.kt:26)
        at McMotd-1.1.6.jar//org.zrnq.mcmotd.QueryCommand$doPing$2.invokeSuspend(QueryCommand.kt:56)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        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:749)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)```
@Under-estimate
Copy link
Owner

我这里测试没有问题,请提供mirai版本和mirai启动器相关信息
image

@Under-estimate Under-estimate added the question Further information is requested label Jul 13, 2022
@itzdrli
Copy link
Author

itzdrli commented Jul 13, 2022

我这里测试没有问题,请提供mirai版本和mirai启动器相关信息 image

mcl2.1.0
mirai2.12.0
其他插件都运行正常

@Under-estimate
Copy link
Owner

Under-estimate commented Jul 13, 2022

我在本地仍无法复现此错误,以下是一些建议:

  1. 可能是插件jar包损坏,重新下载插件可能会解决此问题
  2. 检查mirai-console的启动过程中是否有报错

此错误是由于进行DNS查询的Java类缺失造成的,插件的jar包已经内置了此依赖,理论上不应当出现此问题
缺失的Java类在插件jar包内的路径(使用压缩文件管理器打开):org\xbill\DNS\Lookup.class
image

@itzdrli
Copy link
Author

itzdrli commented Jul 13, 2022

可能是插件jar包损坏,重新下载插件可能会解决此问题

昨天刚刚从Release下载的插件

检查mirai-console的启动过程中是否有报错

启动时在插件加载前有这么三行报错

2022-07-14 00:21:11 W/stderr: SLF4J: Defaulting to no-operation (NOP) logger implementation
2022-07-14 00:21:11 W/stderr: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

以及一个
2022-07-14 00:21:30 W/MCL Addon: iTXTech Soyuz 未安装,Soyuz MCL Handler 特性已禁用

Under-estimate added a commit that referenced this issue Jul 13, 2022
Add slf4j-nop implementation.
@Under-estimate
Copy link
Owner

Under-estimate commented Jul 13, 2022

有可能是一个依赖项的问题,你可以下载最新版本看看有没有解决

@itzdrli
Copy link
Author

itzdrli commented Jul 13, 2022

有可能是一个依赖项的问题,你可以下载最新版本看看有没有解决

还是不行,

2022-07-14 07:04:29 V/Bot.486237638: Itz_Dr_Li(3327930436) -> /mcp mc.dlmc.cc
2022-07-14 07:04:29 W/stderr: kotlin.UninitializedPropertyAccessException: lateinit property dnsServerList has not been initialized
2022-07-14 07:04:29 W/stderr:   at mcmotd-1.1.7.mirai.jar//org.zrnq.mclient.GUIMainKt.getDnsServerList(GUIMain.kt:8)
2022-07-14 07:04:29 W/stderr:   at mcmotd-1.1.7.mirai.jar//org.zrnq.mclient.MClientKt$dnsResolvers$2.invoke(MClient.kt:17)
2022-07-14 07:04:29 W/stderr:   at mcmotd-1.1.7.mirai.jar//org.zrnq.mclient.MClientKt$dnsResolvers$2.invoke(MClient.kt:16)
2022-07-14 07:04:29 W/stderr:   at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
2022-07-14 07:04:29 W/stderr:   at mcmotd-1.1.7.mirai.jar//org.zrnq.mclient.MClientKt.getDnsResolvers(MClient.kt:16)
2022-07-14 07:04:29 W/stderr:   at mcmotd-1.1.7.mirai.jar//org.zrnq.mclient.MClientKt.pingInternal(MClient.kt:35)
2022-07-14 07:04:29 W/stderr:   at mcmotd-1.1.7.mirai.jar//org.zrnq.mcmotd.QueryCommand$doPing$2.invokeSuspend(QueryCommand.kt:56)
2022-07-14 07:04:29 W/stderr:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2022-07-14 07:04:29 W/stderr:   at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
2022-07-14 07:04:29 W/stderr:   at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
2022-07-14 07:04:29 W/stderr:   at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
2022-07-14 07:04:29 W/stderr:   at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
2022-07-14 07:04:29 W/stderr:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
2022-07-14 07:04:29 W/stderr:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
2022-07-14 07:04:29 W/stderr:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
2022-07-14 07:04:29 W/Minecraft MOTD Fetcher: Exception in executing command `[mirai:source:ids=[21210], internalIds=[-559368794], from friend 3327930436 to 486237638 at 1657753469]/mcp mc.dlmc.cc`
java.lang.NullPointerException
        at mcmotd-1.1.7.mirai.jar//org.zrnq.mcmotd.QueryCommand$doPing$2.invokeSuspend(QueryCommand.kt:58)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        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:749)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

以及开头的3行slf4j-nop也还是显示

2022-07-14 07:03:16 W/stderr: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
2022-07-14 07:03:16 W/stderr: SLF4J: Defaulting to no-operation (NOP) logger implementation
2022-07-14 07:03:16 W/stderr: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

@Under-estimate
Copy link
Owner

抱歉,我的锅,现在应该修复了

@itzdrli
Copy link
Author

itzdrli commented Jul 14, 2022

抱歉,我的锅,现在应该修复了

现在能用了,但是开头的三行SLF4J还会出现哈哈哈哈哈

@itzdrli itzdrli closed this as completed Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants