PerformanC / NodeLink

Performant LavaLink alternative written with Node.Js
BSD 2-Clause "Simplified" License
38 stars 23 forks source link

[BUG]: Crash on Voice WS send #28

Closed clapann closed 7 months ago

clapann commented 7 months ago

NodeLink version

2.0.0

Description

When you speak using audioType ogg/opus the application instantly crashes.

file:///<redacted>/src/prism-media.js:65
    const head = Buffer.alloc(8 + (4 + this.vendor.length) + 4)
                                                   ^

TypeError: Cannot read properties of undefined (reading 'length')
    at OpusTags.toBuffer (file:///<redacted>/src/prism-media.js:65:52)
    at new OggLogicalBitstream (file:///<redacted>/src/prism-media.js:147:78)
    at Object.handleStartSpeaking (file:///<redacted>/src/connection/inputHandler.js:43:23)
    at Connection.<anonymous> (file:///<redacted>/src/connection/voiceHandler.js:50:69)
    at Connection.emit (node:events:527:28)
    at WebSocket.<anonymous> (file:///<redacted>/node_modules/@performanc/voice/index.js:269:16)
    at WebSocket.emit (node:events:527:28)
    at TLSSocket.<anonymous> (file:///<redacted>/node_modules/@performanc/voice/ws.js:126:18)
    at TLSSocket.emit (node:events:527:28)
    at addChunk (node:internal/streams/readable:324:12)

Node.js v17.9.1

Client

lavalink-client

Steps to reproduce

Talk using voiceType ogg/opus

Example code

No response

Confirmations

Code of Conduct

ThePedroo commented 7 months ago

Fix landed on https://github.com/PerformanC/NodeLink/commit/0f1ca160c198028c33b2472c00cfd224928d83b9.