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

Could not decompress, Error -3 while decompressing data: invalid stored block lengths #565

Closed
3 tasks done
xabaddonx1 opened this issue Aug 31, 2023 · 10 comments
Closed
3 tasks done
Labels
invalid This doesn't seem right

Comments

@xabaddonx1
Copy link

Summary

Getting could not decompress error from selfcord randomly

Reproduction Steps

Every once in awhile after selfcord has been connected for awhile, I will get this error. I am running the selfcord named version of discord.py-self

Code

@bot.on("ready")
async def on_ready(time):
  ...

@bot.on("message")
async def on_message(message):
  ...

@bot.run(TOKEN)

Expected Results

I do not see this error.

Actual Results

Every once in awhile after selfcord has been connected for awhile, I will get this error.

Could not decompress. With exception "Error -3 while decompressing data: invalid stored block lengths"

stack:
recv_msg, gateway.py:339
start, gateway.py:580
runner, bot.py:93
_run, events.py:80
_run_once, base_events.py:1881
run_forever, base_events.py:595
run_forever, windows_events.py:316
run_until_complete, base_events.py:628
run, runners.py:44
run, bot.py:102

System Information

  • Python v3.10.0-final
  • discord.py v2.3.2-final
  • aiohttp v3.8.2
  • system info: Windows 10 10.0.19045

Checklist

  • I have searched the open issues for duplicates.
  • I have shared the entire traceback.
  • I am using a user token (and it isn't visible in the code).

Additional Information

No response

@xabaddonx1 xabaddonx1 added the unconfirmed bug Unconfirmed bug label Aug 31, 2023
@Levcqh
Copy link

Levcqh commented Sep 1, 2023

i have the same issues
and i want to fix it

Traceback (most recent call last):
File "C:\Users\gamer\Desktop\Transe Tool\selfbot.py", line 56, in
bot.run("MY TOKEN")
File "C:\Users\gamer\Desktop\Transe Tool\discord.py-self\discord\client.py", line 907, in run
asyncio.run(runner())
File "C:\Users\gamer\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Users\gamer\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gamer\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\gamer\Desktop\Transe Tool\discord.py-self\discord\client.py", line 904, in runner
await self.start(*args, **kwargs)
File "C:\Users\gamer\Desktop\Transe Tool\discord.py-self\discord\client.py", line 878, in start
await self.login(token)
File "C:\Users\gamer\Desktop\Transe Tool\discord.py-self\discord\client.py", line 749, in login
data = await state.http.static_login(token.strip())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gamer\Desktop\Transe Tool\discord.py-self\discord\http.py", line 726, in static_login
await self.startup()
File "C:\Users\gamer\Desktop\Transe Tool\discord.py-self\discord\http.py", line 391, in startup
self.user_agent, self.browser_version, self.client_build_number = ua, bv, bn = await utils._get_info(session)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gamer\Desktop\Transe Tool\discord.py-self\discord\utils.py", line 1351, in _get_info
bn = await _get_build_number(session)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gamer\Desktop\Transe Tool\discord.py-self\discord\utils.py", line 1360, in _get_build_number
login_page = await login_page_request.text()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gamer\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\client_reqrep.py", line 1076, in text
await self.read()
File "C:\Users\gamer\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\client_reqrep.py", line 1032, in read
self._body = await self.content.read()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gamer\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\streams.py", line 370, in read
block = await self.readany()
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gamer\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\streams.py", line 392, in readany
await self._wait("readany")
File "C:\Users\gamer\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\streams.py", line 306, in _wait
await waiter
aiohttp.client_exceptions.ClientPayloadError: 400, message='Can not decode content-encoding: br'

@xabaddonx1
Copy link
Author

Btw, after i get this error, although the program is still running it looks like I am not receiving any more discord messages.

@dolfies
Copy link
Owner

dolfies commented Sep 1, 2023

i have the same issues and i want to fix it

Traceback (most recent call last): File "C:\Users\gamer\Desktop\Transe Tool\selfbot.py", line 56, in bot.run("MY TOKEN") File "C:\Users\gamer\Desktop\Transe Tool\discord.py-self\discord\client.py", line 907, in run asyncio.run(runner()) File "C:\Users\gamer\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "C:\Users\gamer\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\gamer\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\gamer\Desktop\Transe Tool\discord.py-self\discord\client.py", line 904, in runner await self.start(*args, **kwargs) File "C:\Users\gamer\Desktop\Transe Tool\discord.py-self\discord\client.py", line 878, in start await self.login(token) File "C:\Users\gamer\Desktop\Transe Tool\discord.py-self\discord\client.py", line 749, in login data = await state.http.static_login(token.strip()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\gamer\Desktop\Transe Tool\discord.py-self\discord\http.py", line 726, in static_login await self.startup() File "C:\Users\gamer\Desktop\Transe Tool\discord.py-self\discord\http.py", line 391, in startup self.user_agent, self.browser_version, self.client_build_number = ua, bv, bn = await utils._get_info(session) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\gamer\Desktop\Transe Tool\discord.py-self\discord\utils.py", line 1351, in _get_info bn = await _get_build_number(session) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\gamer\Desktop\Transe Tool\discord.py-self\discord\utils.py", line 1360, in _get_build_number login_page = await login_page_request.text() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\gamer\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\client_reqrep.py", line 1076, in text await self.read() File "C:\Users\gamer\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\client_reqrep.py", line 1032, in read self._body = await self.content.read() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\gamer\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\streams.py", line 370, in read block = await self.readany() ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\gamer\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\streams.py", line 392, in readany await self._wait("readany") File "C:\Users\gamer\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\streams.py", line 306, in _wait await waiter aiohttp.client_exceptions.ClientPayloadError: 400, message='Can not decode content-encoding: br'

This is a completely different error; upgrade aiohttp or install brotli.

@TheKidThatCodes
Copy link

#564
the code looks like its from the other one on pypi

@dolfies
Copy link
Owner

dolfies commented Sep 4, 2023

@TheKidThatCodes I cannot reproduce this. Can you send a complete traceback so I can look into this further?

@TheKidThatCodes
Copy link

?

@dolfies
Copy link
Owner

dolfies commented Sep 4, 2023

Sorry, mentioned the wrong person :)
Meant to mention @xabaddonx1

@xabaddonx1
Copy link
Author

xabaddonx1 commented Sep 4, 2023

Sorry I posted the stack above but I don't know how to get a complete traceback if that is not complete.

I hit another one here where it showed a different exception beforehand (I have seen this "ConnectionClosedOk" exception only a couple times. Not sure if it is related.

`
Task exception was never retrieved
future: <Task finished name='Task-12' coro=<gateway.heartbeat() done, defined at C:\Users\Jason\PycharmProjects\option-strat\venv\lib\site-packages\selfcord\api\gateway.py:540> exception=ConnectionClosedOK(Close(code=1000, reason=''), Close(code=1000, reason=''), False)>
Traceback (most recent call last):
File "C:\Users\Jason\PycharmProjects\option-strat\venv\lib\site-packages\selfcord\api\gateway.py", line 550, in heartbeat
await self.send_json(heartbeatJSON)
File "C:\Users\Jason\PycharmProjects\option-strat\venv\lib\site-packages\selfcord\api\gateway.py", line 468, in send_json
await self.ws.send(ujson.dumps(payload))
File "C:\Users\Jason\PycharmProjects\option-strat\venv\lib\site-packages\websockets\legacy\protocol.py", line 619, in send
await self.ensure_open()
File "C:\Users\Jason\PycharmProjects\option-strat\venv\lib\site-packages\websockets\legacy\protocol.py", line 920, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedOK: sent 1000 (OK); then received 1000 (OK)
Reconnect websocket
Could not decompress
Error -3 while decompressing data: invalid stored block lengths
Could not decompress
Error -3 while decompressing data: invalid stored block lengths

Process finished with exit code 0
`

@dolfies
Copy link
Owner

dolfies commented Sep 4, 2023

This is not discord.py-self's renamed branch. You have probably accidentally installed a different selfcord library.

@dolfies dolfies closed this as not planned Won't fix, can't repro, duplicate, stale Sep 4, 2023
@dolfies dolfies added invalid This doesn't seem right and removed unconfirmed bug Unconfirmed bug labels Sep 4, 2023
@xabaddonx1
Copy link
Author

So sorry you are right, my mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants