Zackriya-Solutions/meetily · critical
{error}
Error message
{error} What it means
On Windows, ensure_onnx_runtime_available rethrows a previously recorded ONNX Runtime initialization failure stored in the ONNX_RUNTIME_INIT_ERROR OnceLock. If the ONNX runtime DLL failed to load earlier in the process (e.g. missing onnxruntime.dll or wrong architecture), every later transcription path that calls this guard fails with the saved error string via anyhow::bail!.
Source
Thrown at frontend/src-tauri/src/lib.rs:73
pub mod utils;
pub mod whisper_engine;
use audio::{list_audio_devices, AudioDevice, trigger_audio_permission};
use log::{error as log_error, info as log_info};
use notifications::commands::NotificationManagerState;
use std::sync::Arc;
use tauri::{AppHandle, Manager, Runtime};
use tokio::sync::RwLock;
static RECORDING_FLAG: AtomicBool = AtomicBool::new(false);
#[cfg(target_os = "windows")]
static ONNX_RUNTIME_INIT_ERROR: std::sync::OnceLock<String> = std::sync::OnceLock::new();
pub(crate) fn ensure_onnx_runtime_available() -> anyhow::Result<()> {
#[cfg(target_os = "windows")]
if let Some(error) = ONNX_RUNTIME_INIT_ERROR.get() {
anyhow::bail!("{error}");
}
Ok(())
}
#[cfg(target_os = "windows")]
fn catch_onnx_runtime_init<F, E>(init: F) -> Result<(), String>
where
F: FnOnce() -> Result<(), E>,
E: std::fmt::Display,
{
match std::panic::catch_unwind(std::panic::AssertUnwindSafe(init)) {
Ok(result) => result.map_err(|error| error.to_string()),
Err(payload) => {
let message = payload
.downcast_ref::<&str>()
.copied()
.or_else(|| payload.downcast_ref::<String>().map(String::as_str))View on GitHub (pinned to a2cb62e827)
Solutions
- Read the embedded error string (it names the original DLL/load failure) and fix the root cause: ship the correct onnxruntime.dll beside the executable.
- Match runtime architecture to the binary (x64 vs arm64) and include required provider DLLs (onnxruntime_providers_shared.dll, CUDA deps if enabled).
- Reinstall/repair the app or re-download bundled models/runtime; on dev, rebuild with the matching ort features (e.g. load-dynamic with correct ORT env or default linking).
Defensive patterns
Strategy: try-catch
Try / catch
match ensure_onnx_runtime_available() {
Ok(()) => { /* proceed with transcription */ }
Err(e) => {
log::error!("ONNX runtime unavailable: {e}");
// surface a user-facing 'missing runtime components' dialog
}
} Prevention
- Bundle onnxruntime.dll (correct arch) next to the executable in the installer.
- Smoke-test runtime load at app startup, not at first transcription.
- Pin ort/whisper-rs versions and document required DLLs (incl. CUDA providers if enabled).
- Verify DLL loading with dumpbin /dependencies or Dependencies.exe in CI on Windows.
When it happens
Trigger: Calling any transcription/whisper/parakeet entry point that calls ensure_onnx_runtime_available() on Windows after ONNX runtime init already failed and stored its error in ONNX_RUNTIME_INIT_ERROR.
Common situations: onnxruntime DLL not shipped next to the exe, onnxruntime_dynamic_loading / load-dynamic feature mismatch, x86_64 binary on ARM64 or vice versa, CUDA/TensorRT provider DLLs missing, PATH not containing the runtime directory.
Related errors
- Failed to create WASAPI host: {}
- No compatible input configuration found for device: {}
- Device not found or no compatible configuration available: {
- Parakeet transcription failed on segment {}: {}
- Whisper engine not initialized
AI-assisted analysis of Zackriya-Solutions/meetily@a2cb62e827 (2026-09-12).
Data as JSON: /api/errors/4d3f6f8eb927fca7.
Report an issue: GitHub.