spacedriveapp/spacedrive · error · anyhow::Error

Non-local address not supported for indexing yet: {}

Error message

Non-local address not supported for indexing yet: {}

What it means

When converting `sd-cli index start <library> <path>...` arguments into an IndexInput, each string is parsed with `SdPath::from_uri` (core/src/domain/addressing.rs:419): scheme-less strings become local paths, but scheme URIs (e.g. `content://<uuid>` or remote peer/cloud schemes) become non-physical variants. Indexing requires a local filesystem path, so any argument whose `as_local_path()` is None bails with this message naming the offending argument.

Source

Thrown at apps/cli/src/domains/index/args.rs:81

	/// Include hidden files
	#[arg(long, default_value_t = false)]
	pub include_hidden: bool,

	/// Persist results to the database instead of in-memory
	#[arg(long, default_value_t = false)]
	pub persistent: bool,
}

impl IndexStartArgs {
	pub fn to_input(&self, library_id: Uuid) -> anyhow::Result<IndexInput> {
		let mut local_paths: Vec<PathBuf> = Vec::new();
		for s in &self.paths {
			let sd = SdPath::from_uri(s).unwrap_or_else(|_| SdPath::local(s));
			if let Some(p) = sd.as_local_path() {
				local_paths.push(p.to_path_buf());
			} else {
				anyhow::bail!("Non-local address not supported for indexing yet: {}", s);
			}
		}

		let persistence = if self.persistent {
			IndexPersistence::Persistent
		} else {
			IndexPersistence::Ephemeral
		};

		Ok(IndexInput::new(library_id, local_paths)
			.with_mode(IndexMode::from(self.mode.clone()))
			.with_scope(IndexScope::from(self.scope.clone()))
			.with_include_hidden(self.include_hidden)
			.with_persistence(persistence))
	}
}

#[derive(Args, Debug, Clone)]

View on GitHub (pinned to 6dfeccf211)

Solutions

  1. Pass plain absolute local paths: `sd-cli index start <lib> /home/me/photos`.
  2. If using the local:// form, use the current device's slug or, simpler, omit the scheme entirely.
  3. Remote/content addressing is explicitly not implemented for indexing yet ('yet' in the message) — track it upstream instead of working around it.

Example fix

# before
sd-cli index start $LIB content://9f0c...  # -> Non-local address not supported for indexing yet: content://9f0c...

# after
sd-cli index start $LIB /home/me/photos
Defensive patterns

Strategy: type-guard

Validate before calling

use sd_core::domain::SdPath;

fn indexable_local_path(s: &str) -> Option<std::path::PathBuf> {
    SdPath::from_uri(s).ok().and_then(|p| p.as_local_path().map(|p| p.to_path_buf()))
}

for p in &args.paths {
    if indexable_local_path(p).is_none() {
        anyhow::bail!("not a local path: {}", p);
    }
}

Type guard

pub fn is_local_indexable(s: &str) -> bool {
    match SdPath::from_uri(s) {
        Ok(sd) => sd.as_local_path().is_some(),
        Err(_) => false,
    }
}

Try / catch

match IndexStartArgs::to_input(&args, library_id) {
    Err(e) if e.to_string().contains("Non-local address not supported") => { eprintln!("pass absolute local paths, not URIs"); Err(e) }
    other => other,
}

Prevention

When it happens

Trigger: Passing a content-addressed URI (`sd-cli index start <lib> content://<uuid>`), a remote/p2p style URI, or a `local://<device-slug>/...` URI whose device slug is not the current machine.

Common situations: Copy-pasting URIs produced by other parts of Spacedrive (library exports, UI deep links) into the indexer; scripts that take 'the same path the desktop shows', which is URI-shaped for non-local devices.

Related errors


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