starcraft66 / minecraft-discord-bridge

A minecraft <-> discord bridge with no server-side requirements
Apache License 2.0
30 stars 9 forks source link

Issues with tab menu #64

Closed hyperdefined closed 4 years ago

hyperdefined commented 5 years ago

As requested, here is my debug log. This happens right when the server stops and the bot cannot reconnect after.

2019-10-15 14:03:23,918:bridge:DEBUG:Got Tablist H/F Update: footer={"text":"\n§r\n§r     §7TPS: §a19.98     §7Ping: §a0     §7Uptime: §b5m 21s     \n§r\n§r     §7Online: §b2     §7Total Players: §b1186     \n§r\n§r     §7Website: §bdestroymc.net     \n§r     §7Reddit: §b/r/DestroyMC     \n§r     §7Email: §badmin@destroymc.net     \n§r"}
2019-10-15 14:03:27,951:discord.client:DEBUG:Dispatching event guild_available
2019-10-15 14:03:27,953:discord.client:DEBUG:Dispatching event socket_raw_send
2019-10-15 14:03:27,953:websockets.protocol:DEBUG:client > Frame(fin=True, opcode=1, data=b'{"op":1,"d":1}', rsv1=False, rsv2=False, rsv3=False)
2019-10-15 14:03:27,953:bridge:DEBUG:Processing tab list packet
2019-10-15 14:03:27,953:websockets.protocol:DEBUG:client < Frame(fin=True, opcode=8, data=b'\x03\xe8', rsv1=False, rsv2=False, rsv3=False)
2019-10-15 14:03:27,953:bridge:DEBUG:Processing AddPlayerAction tab list packet, name: hyperdefined, uuid: 311be5cd-d17c-49b3-bf47-f781fdbcc929
2019-10-15 14:03:27,954:websockets.protocol:DEBUG:client - state = CLOSING
2019-10-15 14:03:27,954:websockets.protocol:DEBUG:client > Frame(fin=True, opcode=8, data=b'\x03\xe8', rsv1=False, rsv2=False, rsv3=False)
2019-10-15 14:03:27,954:bridge:DEBUG:Processing tab list packet
2019-10-15 14:03:27,954:bridge:DEBUG:Processing AddPlayerAction tab list packet, name: DESTROYMCNET, uuid: f27836f5-de58-445e-b004-1667eaa67a44
2019-10-15 14:03:27,954:websockets.protocol:DEBUG:client - event = eof_received()
2019-10-15 14:03:27,954:bridge:DEBUG:Processing tab list packet
2019-10-15 14:03:27,955:bridge:DEBUG:Processing AddPlayerAction tab list packet, name: DESTROYMCNET, uuid: f27836f5-de58-445e-b004-1667eaa67a44
2019-10-15 14:03:27,955:discord.gateway:INFO:Websocket closed with 1000 (), cannot reconnect.
2019-10-15 14:03:27,955:discord.client:DEBUG:Dispatching event disconnect
2019-10-15 14:03:27,955:discord.client:ERROR:Attempting a reconnect in 0.40s
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/discord/gateway.py", line 468, in poll_event
    msg = await self.recv()
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/websockets/protocol.py", line 350, in recv
    yield from self.ensure_open()
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/websockets/protocol.py", line 512, in ensure_open
    self.close_code, self.close_reason) from self.transfer_data_exc
websockets.exceptions.ConnectionClosed: WebSocket connection is closed: code = 1000 (OK), no reason

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/discord/client.py", line 457, in connect
    await self._connect()
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/discord/client.py", line 421, in _connect
    await self.ws.poll_event()
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/discord/gateway.py", line 476, in poll_event
    raise ConnectionClosed(exc, shard_id=self.shard_id) from exc
discord.errors.ConnectionClosed: WebSocket connection is closed: code = 1000 (OK), no reason
2019-10-15 14:03:27,958:websockets.protocol:DEBUG:client - event = connection_lost(None)
2019-10-15 14:03:27,958:websockets.protocol:DEBUG:client - state = CLOSED
2019-10-15 14:03:27,958:websockets.protocol:DEBUG:client x code = 1000, reason = [empty]
2019-10-15 14:03:27,958:websockets.protocol:DEBUG:client x closing TCP connection
2019-10-15 14:03:27,971:bridge:ERROR:A minecraft exception occured! [Errno 32] Broken pipe:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/connection.py", line 544, in run
    self._run()
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/connection.py", line 592, in _run
    raise_(*exc_info)
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/future/utils/__init__.py", line 415, in raise_
    raise exc.with_traceback(tb)
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/connection.py", line 559, in _run
    while not self.interrupt and self.connection._pop_packet():
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/connection.py", line 297, in _pop_packet
    self._write_packet(self._outgoing_packet_queue.popleft())
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/connection.py", line 308, in _write_packet
    packet.write(self.socket, self.options.compression_threshold)
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/packets/packet.py", line 99, in write
    self._write_buffer(socket, packet_buffer, compression_threshold)
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/packets/packet.py", line 89, in _write_buffer
    socket.send(packet_buffer.get_writable())  # Packet Payload
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/encryption.py", line 90, in send
    self.actual_socket.send(self.encryptor.update(data))
BrokenPipeError: [Errno 32] Broken pipe
starcraft66 commented 5 years ago

Thanks for posting the log. I can't help you with this stacktrace since it's just a BrokenPipeError. Watch your log for when the bot crashes due to a KeyError like in your previous stacktrace and I will be able to debug the issue.

starcraft66 commented 4 years ago

Going to close this for now as there has been no activity in over a year. Feel free to re-open if something changes.