DenisD3D / Mc2Discord

Link your Minecraft server chat with your Discord (100k downloads)
https://modrinth.com/mod/mc2discord
Apache License 2.0
45 stars 12 forks source link

Connection issues to Discord and messages not sending #130

Open Sparoney opened 2 weeks ago

Sparoney commented 2 weeks ago

Describe the bug

Hi,

Using v4.2.4 Forge on 1.20.1, the mod won't send messages anymore and keeps timing out. Was working fine yesterday. Checking the Discord status website it doesn't mention any issues. I've used your mod on the same server host before in the past and never had an issue, do you have an idea of what could be going on?

[12:07:19] [fr.denisd3d.mc2discord.shadow.reactor-http-nio-4/WARN] [fr.de.mc.sh.re.ne.ht.cl.HttpClientConnect/]: [2ddc44f2-17, L:/172.18.0.29:37168 - R:discord.com/162.159.135.232:443] The connection observed an error
java.io.IOException: Connection timed out
        at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[?:?] {}
        at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:47) ~[?:?] {}
        at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:340) ~[?:?] {}
        at sun.nio.ch.IOUtil.read(IOUtil.java:294) ~[?:?] {}
        at sun.nio.ch.IOUtil.read(IOUtil.java:269) ~[?:?] {}
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:417) ~[?:?] {}
        at fr.denisd3d.mc2discord.shadow.io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:256) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at fr.denisd3d.mc2discord.shadow.io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at fr.denisd3d.mc2discord.shadow.io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:357) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at fr.denisd3d.mc2discord.shadow.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at fr.denisd3d.mc2discord.shadow.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at fr.denisd3d.mc2discord.shadow.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at fr.denisd3d.mc2discord.shadow.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at fr.denisd3d.mc2discord.shadow.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at fr.denisd3d.mc2discord.shadow.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at fr.denisd3d.mc2discord.shadow.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at fr.denisd3d.mc2discord.shadow.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at java.lang.Thread.run(Thread.java:833) ~[?:?] {re:mixin}

Running /mc2discord status shows no errors though:

[12:15:08] [Server thread/INFO] [minecraft/MinecraftServer]: State: Connected
[12:15:08] [Server thread/INFO] [minecraft/MinecraftServer]: Response time (shard 0): 0.210513556s
[12:15:08] [Server thread/INFO] [minecraft/MinecraftServer]: No error

Running /mc2discord restart sometimes fixes it before it stops working pretty quickly again.

Also, attempting to run /mc2discord upload failed as well. Not sure if the mod itself is having difficulty making external connections or it is the server host's issue

[12:16:52] [fr.denisd3d.mc2discord.shadow.reactor-http-nio-3/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID 98cca2dc-d024-4189-9753-5ab4af794364
[12:16:53] [Server thread/INFO] [minecraft/MinecraftServer]: Upload failed : Unexpected response status: 503

Your config file

No response

Sparoney commented 2 weeks ago

After a while it'll catch up and mass send every message it missed

Sparoney commented 2 weeks ago

Also caught this error:

[12:33:24] [parallel-9/ERROR] [fr.de.mc.sh.re.co.pu.Operators/]: Operator called default onErrorDropped
fr.denisd3d.mc2discord.shadow.reactor.core.Exceptions$ErrorCallbackNotImplemented: java.util.concurrent.TimeoutException: Did not observe any item or terminal signal within 3000ms in 'publishOn' (and no fallback has been configured)
Caused by: java.util.concurrent.TimeoutException: Did not observe any item or terminal signal within 3000ms in 'publishOn' (and no fallback has been configured)
        at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.handleTimeout(FluxTimeout.java:295) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.doTimeout(FluxTimeout.java:280) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxTimeout$TimeoutTimeoutSubscriber.onNext(FluxTimeout.java:419) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.FluxOnErrorReturn$ReturnSubscriber.onNext(FluxOnErrorReturn.java:162) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.MonoDelay$MonoDelayRunnable.propagateDelay(MonoDelay.java:271) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at fr.denisd3d.mc2discord.shadow.reactor.core.publisher.MonoDelay$MonoDelayRunnable.run(MonoDelay.java:286) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at fr.denisd3d.mc2discord.shadow.reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at fr.denisd3d.mc2discord.shadow.reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) ~[mc2discord-forge-1.20.1-4.2.4.jar%23747!/:4.2.4] {re:classloading}
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] {}
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?] {}
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] {}
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] {}
        at java.lang.Thread.run(Thread.java:833) ~[?:?] {re:mixin}
DenisD3D commented 2 weeks ago

Seems like some connection to Discord server issue. Can you restart the discord bot and see if it solves the issue ? (/mc2discord restart)

Sparoney commented 2 weeks ago

I did it a few times in testing, it would fix it for a little bit or not at all. Not sure what is going on :(

DenisD3D commented 2 weeks ago

Maybe your host changed some proxy settings?

Sparoney commented 2 weeks ago

I’ll check with the host. In the meantime, I’ve noticed the console is coming up with an error that the channel is being updated too quickly and to increase the update delay, but I increased it to 999 from 610 and also turned it off?

Sparoney commented 2 weeks ago

Server host says there should be nothing blocking Discord or CloudFlare. I just ran /mc2discord upload and it gave me this:

[09:57:45] [fr.denisd3d.mc2discord.shadow.reactor-http-nio-1/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID e310d2dc-fc95-4f44-b945-3d49c8d66f2b
[09:57:45] [Server thread/INFO] [minecraft/MinecraftServer]: Your link : <html><body><script type="text/javascript" src="/aes.js" ></script><script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}var a=toNumbers("f655ba9d09a112d4968c63579db590b4"),b=toNumbers("98344c2eee86c3994890592585b49f80"),c=toNumbers("90b9340e95c34c8297fe7ef8ebbddddf");document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/"; location.href="http://m2d.denisd3d.fr/api/v1/upload/?i=1";</script><noscript>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support</noscript></body></html>

I would've thought it'd just give a link lol

DenisD3D commented 2 weeks ago

The website used for /mc2discord upload is currently down but that's not preventing the mod from working.

Sparoney commented 2 weeks ago

I ended up changing to a different mod and now it is working fine