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

Random crashes when joining voice channel #19

Open
Fabus1184 opened this issue Nov 6, 2022 · 1 comment
Open

Random crashes when joining voice channel #19

Fabus1184 opened this issue Nov 6, 2022 · 1 comment

Comments

@Fabus1184
Copy link

Fabus1184 commented Nov 6, 2022

Sometimes when joining a voice channel i get this error:

"2022-11-06 22:32:10 366379639000 ThreadId 1111 !!! Voice Websocket Error - First packet after Select Protocol not Opcode 4 Session Description Ready 
(ReadyPayload {readyPayloadSSRC = 1320121, readyPayloadIP = \"35.214.233.28\", readyPayloadPort = 50001, readyPayloadModes = 
[\"aead_aes256_gcm_rtpsize\",\"aead_aes256_gcm\",\"xsalsa20_poly1305_lite_rtpsize\",\"xsalsa20_poly1305_lite\",\"xsalsa20_poly1305_suffix\",\"xsalsa20_poly1305\"]})"

It happens quite often but seemingly without any cause, disconnecting and connecting again usually throws the same error again.

I found that this barely happens when the voice channel is empty and happens almost everytime when the channel is quite full.

This might have been already thought of here:

-- TODO: currently, we await the Opcode 4 SD right after
-- Select Protocol, blocking the start of heartbeats until
-- eventStream. This means there's a delay, so TODO to check
-- if this delay causes any problems. If it does, keep the
-- sending here, but receive the SD event in eventStream.
sessionDescPacket <- ExceptT $
over _Left ((<> "Failed to get Opcode 4 SD: ") . tshow) <$>
sendSelectProtocol conn ip port (udpLaunchOpts ^. mode)
(modeCheck, key) <- ExceptT $ pure $
maybeToRight ("First packet after Select Protocol " <>
"not Opcode 4 Session Description " <>
tshow readyPacket) $
sessionDescPacket ^? _SessionDescription

@yutotakano
Copy link
Owner

yutotakano commented Nov 7, 2022

Thanks! I'll take a look at this when I get home. I appreciate the info you've attached as well.

I did realise when I quickly glanced through the mentioned segment that I'm logging the wrong variable haha (it should log the sessionDescPacket, not readyPacket), hopefully this mistake won't make it harder to debug.

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

2 participants