{"record":{"id":"e9562f64d7251cc1","repo":"Zackriya-Solutions/meetily","slug":"no-audio-streams-could-be-created","errorCode":null,"errorMessage":"No audio streams could be created","messagePattern":"No audio streams could be created","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"critical","filePath":"frontend/src-tauri/src/audio/stream.rs","lineNumber":423,"sourceCode":"            info!(\"🔊 Creating system audio stream: {} (backend: {:?})\", sys_device.name, backend);\n            match AudioStream::create(sys_device.clone(), self.state.clone(), DeviceType::System, recording_sender.clone()).await {\n                Ok(stream) => {\n                    self.state.set_system_device(sys_device);\n                    self.system_stream = Some(stream);\n                    info!(\"✅ System audio stream created with {:?} backend\", backend);\n                }\n                Err(e) => {\n                    warn!(\"⚠️ Failed to create system audio stream: {}\", e);\n                    // Don't fail if only system audio fails\n                }\n            }\n        } else {\n            info!(\"ℹ️ No system device specified, skipping system audio stream\");\n        }\n\n        // Ensure at least one stream was created\n        if self.microphone_stream.is_none() && self.system_stream.is_none() {\n            return Err(anyhow::anyhow!(\"No audio streams could be created\"));\n        }\n\n        Ok(())\n    }\n\n    /// Stop all audio streams\n    pub fn stop_streams(&mut self) -> Result<()> {\n        info!(\"Stopping all audio streams\");\n\n        let mut errors = Vec::new();\n\n        // Stop microphone stream\n        if let Some(mic_stream) = self.microphone_stream.take() {\n            if let Err(e) = mic_stream.stop() {\n                error!(\"Failed to stop microphone stream: {}\", e);\n                errors.push(e);\n            }\n        }","sourceCodeStart":405,"sourceCodeEnd":441,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/audio/stream.rs#L405-L441","documentation":"start_streams finished with neither microphone_stream nor system_stream set: every stream it tried to create failed or none was requested. This is the final guard before Ok(()), so recording cannot proceed at all.","triggerScenarios":"start_recording invoked with device names that match no enumerated device (names change with OS locale/renaming), both mic and system stream creation erroring (permissions, unplugged hardware), or both mic_device_name and system_device_name being None/skipped.","commonSituations":"UI passes a stale device name cached from a previous session; devices unplugged between selection and record start; macOS permissions denied so both stream opens fail into this guard; default device changed and the stored name no longer matches.","solutions":["Verify at least one valid device name is passed and matches an enumerated device exactly","Re-enumerate devices at record time instead of using cached names","On macOS grant mic/screen-recording permission first (underlying stream creation fails into this guard)","Surface the per-stream warnings (mic error, system warn) to the UI so the user sees which device failed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before start_streams: confirm at least one requested device exists\nfn validate_devices(mic: &Option<String>, sys: &Option<String>, known: &[String]) -> Result<(), String> {\n    if mic.is_none() && sys.is_none() {\n        return Err(\"Select at least one audio device\".into());\n    }\n    for name in mic.iter().chain(sys.iter()) {\n        if !known.iter().any(|k| k == name) {\n            return Err(format!(\"Device not found: {name}\"));\n        }\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Populate the device picker from live enumeration right before recording","Treat device names as opaque identifiers where the platform allows","Show per-stream failures to the user instead of only the aggregate 'no streams' error"],"tags":["audio","stream","device-selection","recording"],"backgroundTag":"no-audio-device-available","analyzedSha":"0281737d87d26352fb0adc78c8c0975f691b23d1","analyzedAt":"2026-08-16T20:57:52.567Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}