kordlib/kord

Kord voice fails because discord seems to have introduced a new EncryptionMode

RamonEelman opened this issue · 2 comments

Hi, while running a discord bot with the M17 build I've observed the following:

2023-01-07 20:33:57.633 ERROR 1 --- [atcher-worker-1] d.k.voice.gateway.DefaultVoiceGateway    : dev.kord.voice.EncryptionMode does not contain element with name 'aead_xchacha20_poly1305_rtpsize' at path $.d.modes[2]

kotlinx.serialization.SerializationException: dev.kord.voice.EncryptionMode does not contain element with name 'aead_xchacha20_poly1305_rtpsize' at path $.d.modes[2]
        at kotlinx.serialization.json.internal.JsonNamesMapKt.getJsonNameIndexOrThrow(JsonNamesMap.kt:63) ~[kotlinx-serialization-json-jvm-1.3.3.jar!/:na]
        at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeEnum(StreamingJsonDecoder.kt:301) ~[kotlinx-serialization-json-jvm-1.3.3.jar!/:na]

This is caused by the following event:
{"op":2,"d":{"streams":[{"type":"video","ssrc":256861,"rtx_ssrc":256862,"rid":"","quality":0,"active":false}],"ssrc":256860,"port":50001,"modes":["aead_aes256_gcm_rtpsize","aead_aes256_gcm","aead_xchacha20_poly1305_rtpsize","xsalsa20_poly1305_lite_rtpsize","xsalsa20_poly1305_lite","xsalsa20_poly1305_suffix","xsalsa20_poly1305"],"ip":"66.22.196.113","experiments":["fixed_keyframe_interval"]}}

It's the same problem as #735, the latest 0.8.x-SNAPSHOT version contains a fix that will also be included in the next release.

Closing this as 0.8.0 should've fixed this, feel free to reopen if not