Zackriya-Solutions/meetily · error
Failed to get output config: {}
Error message
Failed to get output config: {} What it means
Wrapped cpal error from Device::default_output_config() in the macOS branch of get_cpal_device (configuration.rs:148). On macOS, output devices are enumerated from the default host for later system-audio capture; when the named output device is found but its default output config cannot be queried, the ? operator aborts the entire lookup. The comment notes actual capture uses the cidre/Core Audio backend, so this query only serves capability matching.
Source
Thrown at frontend/src-tauri/src/audio/devices/configuration.rs:148
let default_config = device
.default_input_config()
.map_err(|e| anyhow!("Failed to get default input config: {}", e))?;
return Ok((device, default_config));
}
}
}
}
DeviceType::Output => {
#[cfg(target_os = "macos")]
{
// Use default host for all macOS output devices
// Core Audio backend uses direct cidre API for system capture, not cpal
for device in host.output_devices()? {
if let Ok(name) = device.name() {
if name == audio_device.name {
let default_config = device
.default_output_config()
.map_err(|e| anyhow!("Failed to get output config: {}", e))?;
return Ok((device, default_config));
}
}
}
}
#[cfg(target_os = "linux")]
{
// For Linux, we use PulseAudio monitor sources for system audio
if let Ok(pulse_host) = cpal::host_from_id(cpal::HostId::Alsa) {
for device in pulse_host.input_devices()? {
if let Ok(name) = device.name() {
if name == audio_device.name {
let default_config = device
.default_input_config()
.map_err(|e| anyhow!("Failed to get default input config: {}", e))?;
return Ok((device, default_config));
}View on GitHub (pinned to 0281737d87)
Solutions
- Refresh the device list (list_audio_devices) and re-select the output device; stale names are the most common cause.
- If using a virtual device for system capture, reinstall/verify it (BlackHole: check Audio MIDI Setup) and restart the app.
- Confirm the display/speaker is actually connected and playing (test with a system sound).
- Fall back to the default output device or start recording with system audio disabled (system_device_name: null).
- Structurally: skip failing devices instead of aborting, same as the input branch.
Example fix
// before: config failure on macOS output device aborts lookup
let default_config = device.default_output_config()
.map_err(|e| anyhow!("Failed to get output config: {}", e))?;
// after: log and continue enumerating remaining output devices
match device.default_output_config() {
Ok(cfg) => return Ok((device, cfg)),
Err(e) => { warn!("Skipping output device '{}': {}", name, e); continue; }
} Defensive patterns
Strategy: fallback
Validate before calling
// Verify the output device exists right before capture
let listed = list_audio_devices()?;
if !listed.iter().any(|d| d.name == target_name && d.device_type == DeviceType::Output) {
// stale selection: re-pick or record mic-only
} Try / catch
// Degrade to mic-only recording when the system-audio lookup fails
match get_cpal_device(&system_dev) {
Ok(found) => start_with_system_audio(found),
Err(e) if e.to_string().starts_with("Failed to get output config") => {
warn!("System audio device unavailable: {}", e);
start_mic_only() // system_device_name: None path
}
Err(e) => Err(e),
} Prevention
- Reinstall/verify virtual loopback drivers (BlackHole etc.) after OS updates.
- Re-select system-audio devices each session rather than persisting across restarts.
- Prefer skip-and-continue enumeration over aborting on the first failing device.
When it happens
Trigger: macOS only, DeviceType::Output: a device matches by name but default_output_config() fails - device unplugged (HDMI/USB DAC disconnected), a virtual driver (BlackHole/Loopback) uninstalled or misconfigured since it was listed, an AirPlay device vanishing when the target disconnected, or a Bluetooth speaker that dropped its connection.
Common situations: User picks BlackHole 2ch for system audio then removes the BlackHole driver without refreshing the list; selecting an HDMI/DisplayPort output that disappears when the display sleeps or switches inputs; stale cached device list from a previous session; Bluetooth speaker power-off between selection and record start.
Related errors
- No default output device found
- Failed to get default input config: {}
- Device not found: {}
- No default input device found
- Unsupported sample format: {:?}
AI-assisted analysis of Zackriya-Solutions/meetily@0281737d87 (2026-08-16).
Data as JSON: /api/errors/96e3bbaf872e959f.
Report an issue: GitHub.