Lightman's Discord Integration

Lightman's Discord Integration

46.6k Downloads

JDA failing setting up. MC 1.18

VirtualGaming1 opened this issue ยท 10 comments

commented

The mod is not connecting to my discord bot and looking in the log i found that it gave an error on the JDA setup

[17:55:03] [Server thread/ERROR] [io.gi.li.li.LightmansDiscordIntegration/]: Error setting up the JDA.
java.lang.IllegalStateException: Was shutdown trying to await status
        at net.dv8tion.jda.internal.JDAImpl.awaitStatus(JDAImpl.java:479) ~[lightmansdiscord-1.18-0.0.3.6-server.jar%23148!/:1.18-0.0.3.6] {re:classloading,pl:epic_rei_lmao:A}
        at net.dv8tion.jda.api.JDA.awaitStatus(JDA.java:316) ~[lightmansdiscord-1.18-0.0.3.6-server.jar%23148!/:1.18-0.0.3.6] {re:classloading,pl:epic_rei_lmao:A}
        at net.dv8tion.jda.api.JDA.awaitReady(JDA.java:366) ~[lightmansdiscord-1.18-0.0.3.6-server.jar%23148!/:1.18-0.0.3.6] {re:classloading,pl:epic_rei_lmao:A}
        at io.github.lightman314.lightmansconsole.proxy.ServerProxy.initializeJDA(ServerProxy.java:53) ~[lightmansdiscord-1.18-0.0.3.6-server.jar%23148!/:1.18-0.0.3.6] {re:classloading,pl:epic_rei_lmao:A}
        at io.github.lightman314.lightmansconsole.LightmansDiscordIntegration.onConfigLoad(LightmansDiscordIntegration.java:67) ~[lightmansdiscord-1.18-0.0.3.6-server.jar%23148!/:1.18-0.0.3.6] {re:classloading,pl:epic_rei_lmao:A}
        at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:247) ~[eventbus-5.0.3.jar%232!/:?] {}
        at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:239) ~[eventbus-5.0.3.jar%232!/:?] {}
        at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-5.0.3.jar%232!/:?] {}
        at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-5.0.3.jar%232!/:?] {}
        at net.minecraftforge.fml.javafmlmod.FMLModContainer.lambda$new$0(FMLModContainer.java:41) ~[javafmllanguage-1.18.2-40.1.30.jar%23260!/:?] {}
        at net.minecraftforge.fml.ModContainer.lambda$dispatchConfigEvent$7(ModContainer.java:135) ~[fmlcore-1.18.2-40.1.30.jar%23259!/:?] {}
        at java.util.Optional.ifPresent(Optional.java:178) ~[?:?] {re:mixin,re:computing_frames,pl:epic_rei_lmao:A}
        at net.minecraftforge.fml.ModContainer.dispatchConfigEvent(ModContainer.java:135) ~[fmlcore-1.18.2-40.1.30.jar%23259!/:?] {}
        at net.minecraftforge.fml.config.ModConfig.fireEvent(ModConfig.java:77) ~[fmlcore-1.18.2-40.1.30.jar%23259!/:?] {}
        at net.minecraftforge.fml.config.ConfigTracker.openConfig(ConfigTracker.java:62) ~[fmlcore-1.18.2-40.1.30.jar%23259!/:?] {}
        at net.minecraftforge.fml.config.ConfigTracker.lambda$loadConfigs$1(ConfigTracker.java:50) ~[fmlcore-1.18.2-40.1.30.jar%23259!/:?] {}
        at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {re:mixin}
        at java.util.Collections$SynchronizedCollection.forEach(Collections.java:2131) ~[?:?] {}
        at net.minecraftforge.fml.config.ConfigTracker.loadConfigs(ConfigTracker.java:50) ~[fmlcore-1.18.2-40.1.30.jar%23259!/:?] {}
        at net.minecraftforge.server.ServerLifecycleHooks.handleServerAboutToStart(ServerLifecycleHooks.java:81) ~[forge-1.18.2-40.1.30-universal.jar%23262!/:?] {re:classloading,pl:epic_rei_lmao:A}
        at net.minecraft.server.dedicated.DedicatedServer.m_7038_(DedicatedServer.java:171) ~[server-1.18.2-20220404.173914-srg.jar%23258!/:?] {re:computing_frames,pl:accesstransformer:B,pl:epic_rei_lmao:A,re:classloading,pl:accesstransformer:B,pl:epic_rei_lmao:A}
        at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:661) ~[server-1.18.2-20220404.173914-srg.jar%23258!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,pl:epic_rei_lmao:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:elementalcraft.mixins.json:MixinMinecraftServer,pl:mixin:A,pl:epic_rei_lmao:A}
        at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:261) ~[server-1.18.2-20220404.173914-srg.jar%23258!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,pl:epic_rei_lmao:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:elementalcraft.mixins.json:MixinMinecraftServer,pl:mixin:A,pl:epic_rei_lmao:A}
        at java.lang.Thread.run(Thread.java:833) [?:?] {}
commented

Linking this with #6

commented

Looking at a similar issue reported to the JDA team here, it's probably because your bot is connected to too many guilds (discord servers). If this is not the case, feel free to let me know and I'll see if there's something I can do to make it work regardless, but I'd recommend making sure the bot is only invited to a single discord server and see if that fixes your issue.

commented

nope only server i know for sure. and i have not sent out any link for it as well.
image

commented

Could I have the entire log file please? I need to know if any other warnings, etc. are showing up. Also, I'd double-check to make sure the token you put in the config is correct (please don't send it to me though, that should be kept private).

commented

latest.log

There you go if this help and this is active log as well.

Just thought of this, could it be that the dedicated server port is not the default. would it cause it?

commented

Odd that it doesn't seem to be reporting anything strange, but I just released a newer version (1.18-0.0.3.7) that's using the latest version of the JDA. I don't know if that will help, but that's the only thing I can think of without having to report the issue straight to the JDA dev team.

commented

image

LOL I already press "completed" as I posted it.

By the way thanks for updating JDA because at first it was not even telling me what it is missing until you updated it.

commented

(MAJOR FACEPALM)

I missed a step. updating JDA really help because it told me what I missed.
image

I forgot to enable 2 things that step 2 on your wiki and i missed that LOL.

commented

Just updated it and here is new error it came from the log. notice it close the connection due to GUILD_PRESENCES or GUILD_MEMBERS

[JDA MainWS-WriteThread] ERROR WebSocketClient - WebSocket connection was closed and cannot be recovered due to identification issues
CloseCode(4014 / Disallowed intents. Your bot might not be eligible to request a privileged intent such as GUILD_PRESENCES or GUILD_MEMBERS.)

What dose that mean?

[03:27:23] [Server thread/INFO] [io.gi.li.li.LightmansDiscordIntegration/]: Attempting to build the JDA.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
SLF4J: Failed to load class "org.slf4j.impl.StaticMDCBinder".
SLF4J: Defaulting to no-operation MDCAdapter implementation.
SLF4J: See http://www.slf4j.org/codes.html#no_static_mdc_binder for further details.
[Server thread] INFO JDA - Login Successful!
[03:27:23] [Server thread/INFO] [io.gi.li.li.LightmansDiscordIntegration/]: Waiting for the JDA to finish the log in process.
[JDA MainWS-ReadThread] INFO WebSocketClient - Connected to WebSocket
[JDA MainWS-WriteThread] ERROR WebSocketClient - WebSocket connection was closed and cannot be recovered due to identification issues
CloseCode(4014 / Disallowed intents. Your bot might not be eligible to request a privileged intent such as GUILD_PRESENCES or GUILD_MEMBERS.)
[03:27:24] [Server thread/ERROR] [io.gi.li.li.LightmansDiscordIntegration/]: Error setting up the JDA.
java.lang.IllegalStateException: Was shutdown trying to await status
        at net.dv8tion.jda.internal.JDAImpl.awaitStatus(JDAImpl.java:483) ~[lightmansdiscord-1.18-0.0.3.7a-server.jar%23150!/:1.18-0.0.3.7a] {re:classloading,pl:epic_rei_lmao:A}
        at net.dv8tion.jda.api.JDA.awaitStatus(JDA.java:318) ~[lightmansdiscord-1.18-0.0.3.7a-server.jar%23150!/:1.18-0.0.3.7a] {re:classloading,pl:epic_rei_lmao:A}
        at net.dv8tion.jda.api.JDA.awaitReady(JDA.java:368) ~[lightmansdiscord-1.18-0.0.3.7a-server.jar%23150!/:1.18-0.0.3.7a] {re:classloading,pl:epic_rei_lmao:A}
        at io.github.lightman314.lightmansconsole.proxy.ServerProxy.initializeJDA(ServerProxy.java:53) ~[lightmansdiscord-1.18-0.0.3.7a-server.jar%23150!/:1.18-0.0.3.7a] {re:classloading,pl:epic_rei_lmao:A}
        at io.github.lightman314.lightmansconsole.LightmansDiscordIntegration.onConfigLoad(LightmansDiscordIntegration.java:67) ~[lightmansdiscord-1.18-0.0.3.7a-server.jar%23150!/:1.18-0.0.3.7a] {re:classloading,pl:epic_rei_lmao:A}
        at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:247) ~[eventbus-5.0.3.jar%232!/:?] {}
        at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:239) ~[eventbus-5.0.3.jar%232!/:?] {}
        at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-5.0.3.jar%232!/:?] {}
        at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-5.0.3.jar%232!/:?] {}
        at net.minecraftforge.fml.javafmlmod.FMLModContainer.lambda$new$0(FMLModContainer.java:41) ~[javafmllanguage-1.18.2-40.1.30.jar%23264!/:?] {}
        at net.minecraftforge.fml.ModContainer.lambda$dispatchConfigEvent$7(ModContainer.java:135) ~[fmlcore-1.18.2-40.1.30.jar%23263!/:?] {}
        at java.util.Optional.ifPresent(Optional.java:178) ~[?:?] {re:mixin,re:computing_frames,pl:epic_rei_lmao:A}
        at net.minecraftforge.fml.ModContainer.dispatchConfigEvent(ModContainer.java:135) ~[fmlcore-1.18.2-40.1.30.jar%23263!/:?] {}
        at net.minecraftforge.fml.config.ModConfig.fireEvent(ModConfig.java:77) ~[fmlcore-1.18.2-40.1.30.jar%23263!/:?] {}
        at net.minecraftforge.fml.config.ConfigTracker.openConfig(ConfigTracker.java:62) ~[fmlcore-1.18.2-40.1.30.jar%23263!/:?] {}
        at net.minecraftforge.fml.config.ConfigTracker.lambda$loadConfigs$1(ConfigTracker.java:50) ~[fmlcore-1.18.2-40.1.30.jar%23263!/:?] {}
        at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {re:mixin}
        at java.util.Collections$SynchronizedCollection.forEach(Collections.java:2131) ~[?:?] {}
        at net.minecraftforge.fml.config.ConfigTracker.loadConfigs(ConfigTracker.java:50) ~[fmlcore-1.18.2-40.1.30.jar%23263!/:?] {}
        at net.minecraftforge.server.ServerLifecycleHooks.handleServerAboutToStart(ServerLifecycleHooks.java:81) ~[forge-1.18.2-40.1.30-universal.jar%23266!/:?] {re:classloading,pl:epic_rei_lmao:A}
        at net.minecraft.server.dedicated.DedicatedServer.m_7038_(DedicatedServer.java:171) ~[server-1.18.2-20220404.173914-srg.jar%23262!/:?] {re:computing_frames,pl:accesstransformer:B,pl:epic_rei_lmao:A,re:classloading,pl:accesstransformer:B,pl:epic_rei_lmao:A}
        at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:661) ~[server-1.18.2-20220404.173914-srg.jar%23262!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,pl:epic_rei_lmao:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:elementalcraft.mixins.json:MixinMinecraftServer,pl:mixin:A,pl:epic_rei_lmao:A}
        at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:261) ~[server-1.18.2-20220404.173914-srg.jar%23262!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,pl:epic_rei_lmao:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:elementalcraft.mixins.json:MixinMinecraftServer,pl:mixin:A,pl:epic_rei_lmao:A}
        at java.lang.Thread.run(Thread.java:833) [?:?] {}
commented

Glad you got it figured out :)