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

Error -5 while decompressing data #210

Open
DefinitlyEvil opened this issue Jan 6, 2016 · 7 comments
Open

Error -5 while decompressing data #210

DefinitlyEvil opened this issue Jan 6, 2016 · 7 comments

Comments

@DefinitlyEvil
Copy link

When I try to join ArkhamNetwork, this happened:

[INFO]: > :
Traceback (most recent call last):
  File "example.py", line 84, in <module>
    client.start(SERVER, 25565)
  File "D:\Programs\Python35\lib\site-packages\spockbot-0.1.3-py3.5.egg\spockbot\plugins\helpers\start.py", line 34, in start
  File "D:\Programs\Python35\lib\site-packages\spockbot-0.1.3-py3.5.egg\spockbot\plugins\core\event.py", line 25, in event_loop
  File "D:\Programs\Python35\lib\site-packages\spockbot-0.1.3-py3.5.egg\spockbot\plugins\core\event.py", line 34, in run_continuous
  File "D:\Programs\Python35\lib\site-packages\spockbot-0.1.3-py3.5.egg\spockbot\plugins\core\event.py", line 62, in emit
  File "D:\Programs\Python35\lib\site-packages\spockbot-0.1.3-py3.5.egg\spockbot\plugins\core\net.py", line 192, in tick
  File "D:\Programs\Python35\lib\site-packages\spockbot-0.1.3-py3.5.egg\spockbot\plugins\core\event.py", line 62, in emit
  File "D:\Programs\Python35\lib\site-packages\spockbot-0.1.3-py3.5.egg\spockbot\plugins\core\net.py", line 208, in handle_recv
  File "D:\Programs\Python35\lib\site-packages\spockbot-0.1.3-py3.5.egg\spockbot\plugins\core\net.py", line 132, in read_packet
  File "D:\Programs\Python35\lib\site-packages\spockbot-0.1.3-py3.5.egg\spockbot\mcp\mcpacket.py", line 56, in decode
zlib.error: Error -5 while decompressing data: incomplete or truncated stream
@nickelpro
Copy link
Member

I have literally never seen this error, I'll check it out when I get home

@DefinitlyEvil
Copy link
Author

@nickelpro Maybe because I am using Windows. xD

@nickelpro
Copy link
Member

I can't reproduce this unfortunately, which means it's hard for me to debug. The only thing that can really cause this problem is the packet stream desync but that should cause problems outside of just decompression failing. So I'll leave this open in hopes that more data on the exact circumstances that cause it appear

@DefinitlyEvil
Copy link
Author

@nickelpro Will network lag cause this?

@nickelpro
Copy link
Member

No, you have a truncated stream which means we read an incorrect amount of bytes into a packet buffer, which means we read a packet header incorrectly, which means our packet stream desync'd somehow.

That's a long list of things that went wrong and there is a lot of code that is supposed to detect that happening and apparently didn't. No idea what could cause this.

@DefinitlyEvil
Copy link
Author

@nickelpro xD Okay.

@AlexLamprianidis
Copy link

AlexLamprianidis commented Jun 15, 2017

I am getting a very similiar error

[INFO]: Attempting to authenticate with Mojang session server
[INFO]: Session authentication successful
[INFO]: My position: PlayerPosition(0, 0, 0) pitch: 0.0 yaw: 0.0
[INFO]: Chat message received: [20:52:47] <<< (0x03, 0x02): Chat Message                  {'position': 1, 'json_data': {u'text': u'', u'extra': [{u'color': u'white', u'text': u' '}, {u'color': u'white', u'text': u' '}, {u'color': u'dark_blue', u'text': u' '}, {u'color': u'black', u'text': u' '}, {u'color': u'dark_green', u'text': u' '}, {u'color': u'white', u'text': u' '}, {u'color': u'white', u'text': u' '}, {u'color': u'dark_green', u'text': u' '}, {u'color': u'black', u'text': u' '}, {u'color': u'dark_red', u'text': u' '}, {u'color': u'dark_aqua', u'text': u' '}, {u'color': u'blue', u'text': u' '}, {u'color': u'dark_green', u'text': u' '}, {u'color': u'black', u'text': u' '}, {u'color': u'black', u'text': u' '}, {u'color': u'dark_aqua', u'text': u' '}, {u'color': u'blue', u'text': u' '}, {u'color': u'dark_green', u'text': u' '}, {u'color': u'black', u'text': u' '}, {u'color': u'black', u'text': u' '}, {u'color': u'dark_aqua', u'text': u' '}, {u'color': u'blue', u'text': u' '}, {u'color': u'dark_green', u'text': u' '}, {u'color': u'black', u'text': u' '}, {u'color': u'black', u'text': u' '}, {u'color': u'dark_aqua', u'text': u' '}, {u'color': u'gold', u'text': u' '}, {u'color': u'dark_aqua', u'text': u' '}, {u'color': u'gold', u'text': u' '}, {u'color': u'dark_aqua', u'text': u' '}, {u'color': u'gold', u'text': u' '}, {u'color': u'dark_aqua', u'text': u' '}, {u'color': u'gold', u'text': u' '}, {u'color': u'dark_aqua', u'text': u' '}, {u'color': u'gold', u'text': u' '}, {u'color': u'dark_aqua', u'text': u' '}, {u'color': u'gold', u'text': u' '}]}}
[DEBUG]: EVENTCORE: Exception while emitting select_recv 3
[DEBUG]: EVENTCORE: Exception while emitting event_tick None
Traceback (most recent call last):
  File "example.py", line 52, in <module>
    client.start('play.primemc.org', 25565)
  File "/home/pi/Desktop/SpockBot/spockbot/plugins/helpers/start.py", line 34, in start
    self.event.event_loop()
  File "/home/pi/Desktop/SpockBot/spockbot/plugins/core/event.py", line 29, in event_loop
    self.run_continuous()
  File "/home/pi/Desktop/SpockBot/spockbot/plugins/core/event.py", line 36, in run_continuous
    self.emit('event_tick')
  File "/home/pi/Desktop/SpockBot/spockbot/plugins/core/event.py", line 62, in emit
    if handler(event, d) == EVENT_UNREGISTER:
  File "/home/pi/Desktop/SpockBot/spockbot/plugins/core/net.py", line 160, in tick
    self.net.select.poll()
  File "/home/pi/Desktop/SpockBot/spockbot/plugins/core/select.py", line 70, in poll
    self.event.emit('select_%s' % kind, sock.fileno())
  File "/home/pi/Desktop/SpockBot/spockbot/plugins/core/event.py", line 62, in emit
    if handler(event, d) == EVENT_UNREGISTER:
  File "/home/pi/Desktop/SpockBot/spockbot/plugins/core/net.py", line 176, in handle_recv
    self.net.read_packet(data)
  File "/home/pi/Desktop/SpockBot/spockbot/plugins/core/net.py", line 101, in read_packet
    )).decode(self.rbuff, self.comp_state)
  File "/home/pi/Desktop/SpockBot/spockbot/mcp/mcpacket.py", line 56, in decode
    body_data = zlib.decompress(pbuff.flush(), zlib.MAX_WBITS)
zlib.error: Error -5 while decompressing data: incomplete or truncated stream

I am running it on rasbian btw

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

No branches or pull requests

3 participants