Zackriya-Solutions/meetily · info

Import cancelled

Error message

Import cancelled

What it means

First cancellation checkpoint in run_import (import.rs:338): the global IMPORT_CANCELLED flag was set (by cancel_import, invoked from the frontend cancel control) before the meeting folder was created, so the import aborts with this sentinel error. It is control flow, not a malfunction - the same string is used at every checkpoint (lines 338, 370, ~400, ~426) so the UI can recognize cancellation uniformly. Because the check sits before create_meeting_folder, no artifacts exist yet on this path.

Source

Thrown at frontend/src-tauri/src/audio/import.rs:338

    // Validate source file
    if !source.exists() {
        return Err(anyhow!("Source file not found: {}", source.display()));
    }

    info!(
        "Starting import for '{}' from {} with language {:?}, model {:?}, provider {:?}",
        title, source_path, language, model, provider
    );

    // Determine which provider to use (default to whisper)
    let use_parakeet = provider.as_deref() == Some("parakeet");

    emit_progress(&app, "copying", 5, "Creating meeting folder...");

    // Check for cancellation
    if IMPORT_CANCELLED.load(Ordering::SeqCst) {
        return Err(anyhow!("Import cancelled"));
    }

    // Create meeting folder
    let base_folder = get_default_recordings_folder();
    let meeting_folder = create_meeting_folder(&base_folder, &title, false)?;

    // Copy audio file to meeting folder
    emit_progress(&app, "copying", 10, "Copying audio file...");

    let dest_filename = format!(
        "audio.{}",
        source
            .extension()
            .and_then(|e| e.to_str())
            .unwrap_or("mp4")
    );
    let dest_path = meeting_folder.join(&dest_filename);

View on GitHub (pinned to 0281737d87)

Solutions

  1. No fix needed for the error itself - verify the UI treats 'Import cancelled' as an info state (dismiss, return to picker), not a red error toast.
  2. If cancellation was unexpected, check for stray cancel_import invokes in the frontend (unmount handlers, abort controllers, dev double-mounts of React effects).
  3. If cancellation seems impossible yet occurs, remember IMPORT_CANCELLED is process-global: a cancel in any window cancels imports in all of them.
  4. Callers that auto-retry on Err must exclude this sentinel - retrying a user-cancelled import is wrong.
  5. For cleaner matching, compare on a typed flag or distinct error kind rather than string equality.

Example fix

// frontend: before - every failure shown as an error
await invoke('import_audio_file', ...).catch(e => showError(e));

// frontend: after - recognize the cancellation sentinel
await invoke('import_audio_file', ...).catch(e => {
  if (String(e).includes('Import cancelled')) setStatus('cancelled');
  else showError(e);
});
Defensive patterns

Strategy: try-catch

Try / catch

// Recognize the sentinel and treat as info, not failure
try { await invoke('import_audio_file', payload); }
catch (e) {
  const msg = String(e);
  if (msg.includes('Import cancelled')) setStatus('cancelled');
  else showError(msg);
}

Prevention

When it happens

Trigger: User clicks Cancel during the early copying stage before the folder exists; a frontend timeout/abort controller calls the cancel command; double-firing start_import where the UI cancels the stale one; any other window calling cancel_import (the flag is process-global).

Common situations: User picks the wrong file and cancels immediately; slow disk makes Creating-meeting-folder linger and the user bails; automated flows cancelling long imports on navigation.

Related errors


AI-assisted analysis of Zackriya-Solutions/meetily@0281737d87 (2026-08-16). Data as JSON: /api/errors/b34b7e81534144f5. Report an issue: GitHub.