discord-jda / JDA

Java wrapper for the popular chat & VOIP service: Discord https://discord.com
Apache License 2.0
4.33k stars 735 forks source link

Bot disconnects from WebSocket and doesn't reconnect #615

Closed Poizenes closed 6 years ago

Poizenes commented 6 years ago

Issue

2018-02-07 17:49:44 [JDA MainWS-WriteThread] WARN  net.dv8tion.jda.core.requests.WebSocketClient  - Got disconnected from WebSocket (Internet?!)...
2018-02-07 17:49:44 [JDA MainWS-WriteThread] ERROR net.dv8tion.jda.core.requests.WebSocketClient  - There was an error in the WebSocket connection
java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;
        at org.slf4j.impl.Log4jLoggerAdapter.warn(Log4jLoggerAdapter.java:415)
        at net.dv8tion.jda.core.requests.WebSocketClient.reconnect(WebSocketClient.java:612)
        at net.dv8tion.jda.core.requests.WebSocketClient.reconnect(WebSocketClient.java:583)
        at net.dv8tion.jda.core.requests.WebSocketClient.onDisconnected(WebSocketClient.java:558)
        at com.neovisionaries.ws.client.ListenerManager.callOnDisconnected(ListenerManager.java:223)
        at com.neovisionaries.ws.client.WebSocket.finish(WebSocket.java:3545)
        at com.neovisionaries.ws.client.WebSocket.onThreadsFinished(WebSocket.java:3515)
        at com.neovisionaries.ws.client.WebSocket.onWritingThreadFinished(WebSocket.java:3504)
        at com.neovisionaries.ws.client.WritingThread.notifyFinished(WritingThread.java:539)
        at com.neovisionaries.ws.client.WritingThread.runMain(WritingThread.java:78)
        at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)

Issue Type

For questions join the official JDA discord server: https://discord.gg/0hMr4ce0tIl3SLv5

Description

After a few hours my bot goes offline and doesn't reconnect. I tried to fix this, but i can't find a issue in my code. If this is a Bug please fix it else please tell me how I can fix it.

queer commented 6 years ago

java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;

Are you sure you shaded slf4j (and deps) correctly / are using correct versions?

natanbc commented 6 years ago

Relocate slf4j. Something added an incompatible version at runtime.

MinnDevelopment commented 6 years ago

The github issue tracker is reserved for feature requests and bug reports. Your issue is neither and should be sorted out inside of our discord server. Go to discord.gg/0hMr4ce0tIl3SLv5 to receive the needed help.