spacedriveapp/spacedrive · error

No library selected

Error message

No library selected

What it means

A wrapper error from the thumbstrip processor: super::generate_thumbstrip_for_file returned Err and the processor wraps it with 'Thumbstrip generation failed: {e}'. The real cause is in the appended inner error string — typically ffmpeg invocation failures, unreadable/corrupt video files, or failures writing variant outputs. The wrapping preserves the inner message, so read the text after the colon.

Solutions

  1. Read the inner error after 'Thumbstrip generation failed:' — it names the actual failing step.
  2. Verify ffmpeg (and ffprobe) are installed and reachable from the daemon's environment: run `ffmpeg -version` with the same env/user as sd-daemon.
  3. Check the source file plays: `ffprobe <entry.path>` from the same machine.
  4. Check write permissions and free space in the library's thumbstrip variants directory.
  5. Re-run with RUST_LOG=sd_core::ops::media=debug to get the per-file debug lines (→ Generating thumbstrip for ...) pinpointing the entry.

Example fix

# before
systemctl start sd-daemon   # ffmpeg not on daemon PATH

# after
Environment="PATH=/usr/local/bin:/usr/bin:/bin"  # add dir containing ffmpeg to the daemon unit
systemctl restart sd-daemon
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-flight: file exists, is readable, and ffmpeg is on PATH before processing.
use std::path::Path;

fn can_attempt_thumbstrip(path: &Path) -> bool {
    path.is_file() && which::which("ffmpeg").is_ok()
}

Try / catch

// Per-file isolation: one bad video must not abort the batch.
match generate_thumbstrip_for_file(&library, &uuid, &path, &variants, regenerate).await {
    Ok(n) => tracing::info!(count = n, "thumbstrip ok"),
    Err(e) => {
        tracing::warn!(path = %path.display(), error = %e, "thumbstrip failed, skipping file");
        // record failure against the entry and continue
    }
}

Prevention

When it happens

Trigger: Calling the thumbstrip processor on a video/ entry (MIME starts with video/) where generate_thumbstrip_for_file fails: ffmpeg/ffprobe not found in the daemon's PATH, a truncated or non-decodable video, missing write permissions or full disk at the thumbstrip variants directory.

Common situations: Daemon running in an environment (service, container, launchd) whose PATH lacks ffmpeg; partially downloaded/synced video files; codec unsupported by the installed ffmpeg build; variants cache directory owned by another user.

Related errors


AI-assisted analysis of spacedriveapp/spacedrive@6dfeccf211 (2026-08-16). Data as JSON: /api/errors/03ef3fce57b765db. Report an issue: GitHub.

Appendix: source

Thrown at apps/mobile/src/client/SpacedriveClient.ts:140

    method: string,
    input: unknown = {},
  ): Promise<T> {
    const wireMethod = (WIRE_METHODS.coreQueries as any)[method];
    if (!wireMethod) {
      throw new Error(`Unknown core query: ${method}`);
    }
    return this.transport.request<T>(wireMethod, { input });
  }

  /**
   * Execute a library-level query.
   */
  async libraryQuery<T = unknown>(
    method: string,
    input: unknown = {},
  ): Promise<T> {
    if (!this.currentLibraryId) {
      throw new Error("No library selected");
    }

    const wireMethod = (WIRE_METHODS.libraryQueries as any)[method];
    if (!wireMethod) {
      throw new Error(`Unknown library query: ${method}`);
    }

    return this.transport.request<T>(wireMethod, {
      input,
      library_id: this.currentLibraryId,
    });
  }

  /**
   * Execute a core-level action (mutation).
   */
  async coreAction<T = unknown>(
    method: string,

View on GitHub (pinned to 6dfeccf211)