cjpais/Handy · critical
Failed to initialize recording manager
Error message
Failed to initialize recording manager
What it means
Startup panic when AudioRecordingManager::new returns Err. This manager wires the transcription stream router into a fresh audio recorder; failure means the audio recording subsystem could not be assembled at startup. Missing microphones do NOT fail here — device absence surfaces later at record time as 'No input device found' — so this expect indicates structural init failure.
Solutions
- Get the panic backtrace (RUST_BACKTRACE=1) and map it to the fallible call inside AudioRecordingManager::new
- If running under a container/CI, raise process/thread limits or move to a desktop session with a functioning audio stack
- Verify basic host initialization with handy --list-devices — if that also fails, the audio stack itself is broken
Defensive patterns
Strategy: fallback
Validate before calling
// Sanity-check that the audio host initializes at all before managers depend on it
let host_ok = crate::audio_toolkit::get_cpal_host().default_input_device().is_some()
|| crate::audio_toolkit::get_cpal_host().input_devices().is_ok(); Prevention
- Smoke-test audio host initialization early (e.g. a --list-devices code path) and report a clear environment error before manager construction
- In sandboxes/containers, verify thread limits and audio stack availability before launching
When it happens
Trigger: initialize_core_logic constructing the recording manager at launch; any fallible step inside AudioRecordingManager::new (managers/audio.rs) returning Err, such as audio toolkit initialization or thread spawn.
Common situations: Rare; reported in heavily sandboxed processes or containers where thread creation or audio-host initialization fails, and in custom builds that added fallible init to the recorder.
Related errors
- Failed to initialize transcription manager
- error while building tauri application
- failed to create cancel item
- failed to create menu
- failed to create model item
AI-assisted analysis of cjpais/Handy@ba10ce1943 (2026-08-17).
Data as JSON: /api/errors/50390ba7407929b7.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/src/lib.rs:203
fn initialize_core_logic(app_handle: &AppHandle) {
// Note: Enigo (keyboard/mouse simulation) is NOT initialized here.
// The frontend is responsible for calling the `initialize_enigo` command
// after onboarding completes. This avoids triggering permission dialogs
// on macOS before the user is ready.
// Initialize the managers. The audio recorder receives the streaming router
// explicitly, so always-on microphone startup can wire live-preview frames
// even before Tauri state is populated.
let model_manager =
Arc::new(ModelManager::new(app_handle).expect("Failed to initialize model manager"));
let transcription_manager = Arc::new(
TranscriptionManager::new(app_handle, model_manager.clone())
.expect("Failed to initialize transcription manager"),
);
let recording_manager = Arc::new(
AudioRecordingManager::new(app_handle, transcription_manager.stream_router())
.expect("Failed to initialize recording manager"),
);
let history_manager =
Arc::new(HistoryManager::new(app_handle).expect("Failed to initialize history manager"));
// Initialize the transcribe-cpp native backend (logging + backend module
// registration) once, before any whisper model is loaded.
managers::transcription::init_transcribe_backend();
// Apply accelerator preferences before any model loads
managers::transcription::apply_accelerator_settings(app_handle);
// Add managers to Tauri's managed state
app_handle.manage(recording_manager.clone());
app_handle.manage(model_manager.clone());
app_handle.manage(transcription_manager.clone());
app_handle.manage(history_manager.clone());
app_handle.manage(tray::TrayState::new());
View on GitHub (pinned to ba10ce1943)