cjpais/Handy · critical

Failed to initialize transcription manager

Error message

Failed to initialize transcription manager

What it means

Startup panic when TranscriptionManager::new returns Err. In the current implementation the constructor only assembles the manager struct and spawns the idle-watcher thread, returning Ok on the shown path — so this expect firing means a modified/future constructor added fallible work, or a fork changed init semantics. The panic occurs after ModelManager is already built.

Solutions

  1. Read the panic backtrace to identify which added fallible step returned Err in your build
  2. Check the constructor for newly ?-propagated calls (settings store access, thread spawn) and fix the underlying failure
  3. If thread creation is failing, raise thread limits (ulimit -u) or reduce background threads in the environment
Defensive patterns

Strategy: fallback

Prevention

When it happens

Trigger: initialize_core_logic calling TranscriptionManager::new(app_handle, model_manager) and receiving Err — only reachable if the constructor gains fallible steps (store access, thread spawn under thread limits) in your build.

Common situations: Practically unseen in stock builds; appears in forks or custom builds where the constructor was extended with fallible initialization, or in environments that exhaust thread creation.

Related errors


AI-assisted analysis of cjpais/Handy@ba10ce1943 (2026-08-17). Data as JSON: /api/errors/0b637dc1c5627e65. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/src/lib.rs:199

    }

    false
}

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());

View on GitHub (pinned to ba10ce1943)