FAQ: Cannot play audio as no valid encryption package is installed (After installing sodium-native)

Can someone help me on this issue? The sodium-native is already installed, but the @discordjs/voice still didn't recognize it :convit:
--------------------------------------------------
Core Dependencies
- @discordjs/voice: 0.17.0
- prism-media: 1.3.5

Opus Libraries
- @discordjs/opus: 0.9.0
- opusscript: not found

Encryption Libraries
- sodium-native: 4.2.1
- sodium: not found
- libsodium-wrappers: not found
- tweetnacl: not found

FFmpeg
- version: 4.3.8-0+deb11u1
- libopus: yes
--------------------------------------------------
210 | close: tweetnacl.secretbox,
211 | random: tweetnacl.randomBytes
212 | })
213 | };
214 | var fallbackError = /* @__PURE__ */ __name(() => {
215 | throw new Error(
^
error: Cannot play audio as no valid encryption package is installed.
- Install sodium, libsodium-wrappers, or tweetnacl.
- Use the generateDependencyReport() function for more information.

at fallbackError (/app/node_modules/@discordjs/voice/dist/index.js:215:9)
at encryptOpusPacket (/app/node_modules/@discordjs/voice/dist/index.js:885:17)
at createAudioPacket (/app/node_modules/@discordjs/voice/dist/index.js:869:69)
at prepareAudioPacket (/app/node_modules/@discordjs/voice/dist/index.js:793:33)
at _preparePacket (/app/node_modules/@discordjs/voice/dist/index.js:1324:18)
at _stepPrepare (/app/node_modules/@discordjs/voice/dist/index.js:1294:14)
at prepareNextAudioFrame (/app/node_modules/@discordjs/voice/dist/index.js:136:14)
at audioCycleStep (/app/node_modules/@discordjs/voice/dist/index.js:125:3)
--------------------------------------------------
Core Dependencies
- @discordjs/voice: 0.17.0
- prism-media: 1.3.5

Opus Libraries
- @discordjs/opus: 0.9.0
- opusscript: not found

Encryption Libraries
- sodium-native: 4.2.1
- sodium: not found
- libsodium-wrappers: not found
- tweetnacl: not found

FFmpeg
- version: 4.3.8-0+deb11u1
- libopus: yes
--------------------------------------------------
210 | close: tweetnacl.secretbox,
211 | random: tweetnacl.randomBytes
212 | })
213 | };
214 | var fallbackError = /* @__PURE__ */ __name(() => {
215 | throw new Error(
^
error: Cannot play audio as no valid encryption package is installed.
- Install sodium, libsodium-wrappers, or tweetnacl.
- Use the generateDependencyReport() function for more information.

at fallbackError (/app/node_modules/@discordjs/voice/dist/index.js:215:9)
at encryptOpusPacket (/app/node_modules/@discordjs/voice/dist/index.js:885:17)
at createAudioPacket (/app/node_modules/@discordjs/voice/dist/index.js:869:69)
at prepareAudioPacket (/app/node_modules/@discordjs/voice/dist/index.js:793:33)
at _preparePacket (/app/node_modules/@discordjs/voice/dist/index.js:1324:18)
at _stepPrepare (/app/node_modules/@discordjs/voice/dist/index.js:1294:14)
at prepareNextAudioFrame (/app/node_modules/@discordjs/voice/dist/index.js:136:14)
at audioCycleStep (/app/node_modules/@discordjs/voice/dist/index.js:125:3)
1 Reply
d.js toolkit
d.js toolkit4w ago
- What are your intents? GuildVoiceStates is required to receive voice data! - Show what dependencies you are using -- generateDependencyReport() is exported from @discordjs/voice. - Try looking at common examples: https://github.com/discordjs/voice-examples. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
Want results from more Discord servers?
Add your server