Zackriya-Solutions/meetily · error · anyhow::Error
Failed to create Core Audio capture: {}
Error message
Failed to create Core Audio capture: {} What it means
CoreAudioCapture::new() failed while creating the macOS capture object used by AudioStream::new for the system-audio path. This is the first step, before any device stream is opened, so the failure is about creating the Core Audio tap itself - typically a macOS TCC permission or Core Audio subsystem problem, not a specific device.
Source
Thrown at frontend/src-tauri/src/audio/stream.rs:158
})
}
/// Create a Core Audio stream (macOS only)
#[cfg(target_os = "macos")]
async fn create_core_audio_stream(
device: Arc<AudioDevice>,
state: Arc<RecordingState>,
device_type: DeviceType,
recording_sender: Option<mpsc::UnboundedSender<super::recording_state::AudioChunk>>,
) -> Result<Self> {
info!("🔊 Stream: Creating Core Audio stream for device: {}", device.name);
// Create Core Audio capture
info!("🔊 Stream: Calling CoreAudioCapture::new()...");
let capture_impl = CoreAudioCapture::new()
.map_err(|e| {
error!("❌ Stream: CoreAudioCapture::new() failed: {}", e);
anyhow::anyhow!("Failed to create Core Audio capture: {}", e)
})?;
info!("✅ Stream: CoreAudioCapture created, calling stream()...");
let core_stream = capture_impl.stream()
.map_err(|e| {
error!("❌ Stream: capture_impl.stream() failed: {}", e);
anyhow::anyhow!("Failed to create Core Audio stream: {}", e)
})?;
let sample_rate = core_stream.sample_rate();
info!("✅ Stream: Core Audio stream created with sample rate: {} Hz", sample_rate);
// Create audio capture processor for pipeline integration
// CRITICAL: Core Audio tap is MONO (with_mono_global_tap_excluding_processes)
let capture = AudioCapture::new(
device.clone(),
state.clone(),
sample_rate,View on GitHub (pinned to 0281737d87)
Solutions
- Grant Microphone and Screen Recording permission in System Settings > Privacy & Security, then restart the app
- Confirm a default output device exists in System Settings > Sound
- Restart the Core Audio daemon: sudo killall coreaudiod
- Run the app from a normal GUI session, not SSH/headless
Defensive patterns
Strategy: try-catch
Validate before calling
// Cheap preflight: can this process create a Core Audio capture at all?
fn core_audio_available() -> bool {
CoreAudioCapture::new().is_ok()
} Try / catch
match AudioStream::new(device, state, DeviceType::System, None) {
Ok(stream) => { /* attach system stream */ }
Err(e) => {
warn!("System audio unavailable: {e}"); // degrade to mic-only recording
}
} Prevention
- Request mic + screen-recording permission during onboarding before the first recording
- Probe CoreAudioCapture::new() at feature-check time and disable system-audio UI when unavailable
- Never run capture tests from SSH/headless sessions
When it happens
Trigger: Constructing the Core Audio stream for the system device when the process lacks microphone/screen-recording permission, when coreaudiod is wedged, when no audio hardware exists (headless Mac, VM without audio), or when launched from a session without access to the audio server (SSH).
Common situations: First run after install where the user denied the TCC prompt; macOS permissions reset after app re-signing; running from SSH or CI; virtual machines with no audio device.
Related errors
- Failed to get default input config: {}
- Failed to open System Settings: {}
- Failed to create Core Audio stream: {}
- Failed to create temporary WAV file: {}
- Failed to spawn ffmpeg process: {}
AI-assisted analysis of Zackriya-Solutions/meetily@0281737d87 (2026-08-16).
Data as JSON: /api/errors/7b24f80173d0db2f.
Report an issue: GitHub.