Skip to content

Discord Voice: DAVESession crash causes 'receive error: The operation was aborted' #23105

@daviluisjs

Description

@daviluisjs

Bug Report

Environment

  • OpenClaw version: 2026.2.21-2
  • Node.js: v22.15.0
  • OS: macOS 15.2 (arm64)
  • @discordjs/voice: 0.19.0
  • @snazzah/davey: 0.1.9
  • @discordjs/opus: installed
  • libsodium-wrappers: installed

Description

After enabling Discord Voice (channels.discord.voice.enabled: true) and using /vc join, the bot successfully joins the voice channel and can detect speaking events. However, the DAVESession (Discord Audio/Video Encryption) repeatedly crashes, causing audio receive to fail.

The bot briefly captured and responded to audio once, but subsequent attempts fail with the DAVE protocol error.

Error Logs

at new DAVESession (file:///.../@discordjs/voice/src/networking/DAVESession.ts:140:5)
at Networking.createDaveSession (file:///.../@discordjs/voice/src/networking/Networking.ts:377:15)
at Networking.onWsPacket (file:///.../@discordjs/voice/src/networking/Networking.ts:529:14)
at VoiceWebSocket.onMessage (file:///.../@discordjs/voice/src/networking/VoiceWebSocket.ts:164:2)

2026-02-22T00:42:01.728Z [discord] voice: receive error: The operation was aborted

The DAVESession error repeats multiple times in gateway.err.log.

Steps to Reproduce

  1. Enable voice: channels.discord.voice.enabled: true
  2. Add voice channel to guild allowlist
  3. Install required packages: @snazzah/davey, libsodium-wrappers
  4. /vc join in Discord → bot joins successfully
  5. Speak in the voice channel → DAVESession crashes, audio receive aborted

Expected Behavior

Bot should receive audio, transcribe via Whisper, respond via TTS, and play back in the voice channel.

Actual Behavior

Bot joins the channel but DAVESession crashes repeatedly. Audio capture fails with "The operation was aborted". One brief successful capture was observed before the crashes started.

Additional Context

  • The @snazzah/davey package was manually installed (not bundled with openclaw)
  • Could be a version incompatibility between @discordjs/voice 0.19.0 and @snazzah/davey 0.1.9
  • Bot permissions: Connect + Speak + Use Voice Activity confirmed
  • GuildVoiceStates intent is included by default in the code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions