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

EOFError: Unexpected end of message (on connect()) #237

Open
DAMcraft opened this issue Nov 13, 2021 · 2 comments
Open

EOFError: Unexpected end of message (on connect()) #237

DAMcraft opened this issue Nov 13, 2021 · 2 comments
Labels

Comments

@DAMcraft
Copy link

DAMcraft commented Nov 13, 2021

my client connects to the server but then i get the following error:

  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2288.0_x64__qbz5n2kfra8p0\lib\threading.py", line 973, in _bootstrap_inner
    self.run()
  File "c:\users\damia\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages\pyCraft\minecraft\networking\connection.py", line 589, in run
    self.connection._handle_exception(e, sys.exc_info())
  File "c:\users\damia\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages\pyCraft\minecraft\networking\connection.py", line 532, in _handle_exception      
    raise exc_value.with_traceback(exc_tb)
  File "c:\users\damia\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages\pyCraft\minecraft\networking\connection.py", line 585, in run
    self._run()
  File "c:\users\damia\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages\pyCraft\minecraft\networking\connection.py", line 618, in _run
    packet = self.connection.reactor.read_packet(
  File "c:\users\damia\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages\pyCraft\minecraft\networking\connection.py", line 659, in read_packet
    length = VarInt.read(stream)
  File "c:\users\damia\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages\pyCraft\minecraft\networking\types\basic.py", line 157, in read
    raise EOFError("Unexpected end of message.")
EOFError: Unexpected end of message.

(Edit by @joodicator: use triple backticks to properly format a backtrace.)

I have no idea how to fix it, but this part raises the error:
image
printing byte gives me an empty BYTE-type

@joodicator
Copy link
Collaborator

@DAMcraft Is the server you're trying to connect to a public one? Is it a vanilla server, or is it running any mods? Do you know at what point in the connection process this error occurs? (The --dump-packets flag to start.py might be useful.) It's hard to diagnose the problem from the above, but it sounds like the server may be terminating the connection early due to some kind of protocol error or authentication failure.

@0xseck
Copy link

0xseck commented Mar 17, 2022

I have the same problem. It's a public server with some plugins. Here is the output with --dump-packets flag:

Connecting in offline mode...
<-- 0x00 HandShakePacket(protocol_version=9999, server_address='mc.gamerway.online', server_port=25565, next_state=1)
<-- 0x00 RequestPacket()
--> 0x00 ResponsePacket(json_response='{"version":{"protocol":758,"name":"Velocity 1.7.2-1.18.2"},"players":{"online":14,"max":500,"sample":[{"name":"§7Gamerway\\u0027e hoşgeldin §eUykucuSirin","id":"00000000-0000-0000-0000-000000000000"},{"name":"","id":"00000000-0000-0000-0000-000000000000"},{"name":"  - §aHub: §e0 kişi aktif","id":"00000000-0000-0000-0000-000000000000"},{"name":"  - §aTowny: §e14/100 kişi aktif","id":"00000000-0000-0000-0000-000000000000"},{"name":"  - §aPvP: §e0/100 kişi aktif","id":"00000000-0000-0000-0000-000000000000"},{"name":"","id":"00000000-0000-0000-0000-000000000000"},{"name":"  ","id":"00000000-0000-0000-0000-000000000000"}]},"description":{"extra":[{"text":"           "},{"color":"red","text":"✰ "},{"color":"dark_red","text":"✯ "},{"color":"red","text":"✰ "},{"bold":true,"color":"dark_red","text":"GAMERWAY "},{"color":"red","text":"✰ "},{"color":"dark_red","text":"✯ "},{"color":"red","text":"✰\\n                      "},{"color":"white","text":"Pvp - "},{"color":"white","text":"Towny"}],"text":""},"favicon":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAANq0lEQVR4Xu1aCVQUVxb9rE0jgiACQo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XlZWVHZf9V6iJgJX8tnJYSQTs910fjfV+Au33LXZKFa1xmcVv1/6hqqrK9uzZQ+nR69SpU/coCDZ9N/hDAnB9D1j4ZKPyh/PcFnlSJaispMxv92HAysqKqxSzs7OTLl++/PRdLGC8TSxcGFjyA1aA8bAZmIMO7Z18wAgJCWH6+vqCbdu2rYmIiPhTAsgCMABmCFUEajHdBvHvf5gYP348S01NNbK2tqZFPpWxb8NsZ137vBXOUzvPc/jjP098qKD9wD/6iEf32vnfQRVQQAEFFFBAgf8X/BvYi0jHWdAQwQAAAABJRU5ErkJggg\\u003d\\u003d"}')
<-- 0x00 HandShakePacket(protocol_version=758, server_address='mc.gamerway.online', server_port=25565, next_state=2)
<-- 0x00 LoginStartPacket(name='UykucuSirin')
--> 0x03 SetCompressionPacket(threshold=256)
--> 0x02 LoginSuccessPacket(UUID='4a377999-7c4b-3f19-8331-6e2fb1efb682', Username='UykucuSirin')
Exception in thread Networking Thread:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/home/seck/pyCraft/minecraft/networking/connection.py", line 596, in run
    self.connection._handle_exception(e, sys.exc_info())
  File "/home/seck/pyCraft/minecraft/networking/connection.py", line 539, in _handle_exception
    raise exc_value.with_traceback(exc_tb)
  File "/home/seck/pyCraft/minecraft/networking/connection.py", line 592, in run
    self._run()
  File "/home/seck/pyCraft/minecraft/networking/connection.py", line 625, in _run
    packet = self.connection.reactor.read_packet(
  File "/home/seck/pyCraft/minecraft/networking/connection.py", line 666, in read_packet
    length = VarInt.read(stream)
  File "/home/seck/pyCraft/minecraft/networking/types/basic.py", line 156, in read
    raise EOFError("Unexpected end of message.")
EOFError: Unexpected end of message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants