imayhaveborkedit / discord-ext-voice-recv

Voice receive extension package for discord.py
https://pypi.org/project/discord-ext-voice-recv/
MIT License
117 stars 18 forks source link

NotImplementedError: aead_xchacha20_poly1305_rtpsize #26

Open joshfokis opened 5 days ago

joshfokis commented 5 days ago

I have created a new bot to use this with and I get the error in the title, I have another bot where I don't receive this error. I am under the assumption that this is a different encryption that hasn't been accounted for or implemented. I have it added it to a couple of servers to test, could just be user error but wanted to post this to verify.

Traceback (most recent call last):
  File "C:\Users\joshf\Documents\GitHub\streamaibot\proteusAI\venv\Lib\site-packages\discord\ext\voice_recv\reader.py", line 433, in __init__
    self.decrypt_rtp: DecryptRTP = getattr(self, '_decrypt_rtp_' + mode)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PacketDecryptor' object has no attribute '_decrypt_rtp_aead_xchacha20_poly1305_rtpsize'

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

Traceback (most recent call last):
  File "C:\Users\joshf\Documents\GitHub\streamaibot\proteusAI\venv\Lib\site-packages\discord\ext\commands\core.py", line 235, in wrapped     
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\joshf\Documents\GitHub\streamaibot\proteusAI\cogs\ai.py", line 210, in join
    vc.listen(sink)
  File "C:\Users\joshf\Documents\GitHub\streamaibot\proteusAI\venv\Lib\site-packages\discord\ext\voice_recv\voice_client.py", line 144, in listen
    self._reader = AudioReader(sink, self, after=after)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\joshf\Documents\GitHub\streamaibot\proteusAI\venv\Lib\site-packages\discord\ext\voice_recv\reader.py", line 315, in __init__
    self.decryptor: PacketDecryptor = PacketDecryptor(client.mode, bytes(client.secret_key))
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\joshf\Documents\GitHub\streamaibot\proteusAI\venv\Lib\site-packages\discord\ext\voice_recv\reader.py", line 436, in __init__
    raise NotImplementedError(mode) from e
NotImplementedError: aead_xchacha20_poly1305_rtpsize

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

Traceback (most recent call last):
  File "C:\Users\joshf\Documents\GitHub\streamaibot\proteusAI\venv\Lib\site-packages\discord\ext\commands\bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\joshf\Documents\GitHub\streamaibot\proteusAI\venv\Lib\site-packages\discord\ext\commands\core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\joshf\Documents\GitHub\streamaibot\proteusAI\venv\Lib\site-packages\discord\ext\commands\core.py", line 244, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NotImplementedError: aead_xchacha20_poly1305_rtpsize
joshfokis commented 2 days ago

UPDATE It is partially user error, but this is due to me trying to run the bot on Windows, it works fine on linux. Any help with this would be appreciated. I did find this image to try to start working on writing the missing decryption method. aYVoJvQ