{"record":{"id":"ffc95bd9f6df2267","repo":"spacedriveapp/spacedrive","slug":"non-local-address-not-supported-for-indexing-yet","errorCode":null,"errorMessage":"Non-local address not supported for indexing yet: {}","messagePattern":"Non-local address not supported for indexing yet: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"apps/cli/src/domains/index/args.rs","lineNumber":81,"sourceCode":"\n\t/// Include hidden files\n\t#[arg(long, default_value_t = false)]\n\tpub include_hidden: bool,\n\n\t/// Persist results to the database instead of in-memory\n\t#[arg(long, default_value_t = false)]\n\tpub persistent: bool,\n}\n\nimpl IndexStartArgs {\n\tpub fn to_input(&self, library_id: Uuid) -> anyhow::Result<IndexInput> {\n\t\tlet mut local_paths: Vec<PathBuf> = Vec::new();\n\t\tfor s in &self.paths {\n\t\t\tlet sd = SdPath::from_uri(s).unwrap_or_else(|_| SdPath::local(s));\n\t\t\tif let Some(p) = sd.as_local_path() {\n\t\t\t\tlocal_paths.push(p.to_path_buf());\n\t\t\t} else {\n\t\t\t\tanyhow::bail!(\"Non-local address not supported for indexing yet: {}\", s);\n\t\t\t}\n\t\t}\n\n\t\tlet persistence = if self.persistent {\n\t\t\tIndexPersistence::Persistent\n\t\t} else {\n\t\t\tIndexPersistence::Ephemeral\n\t\t};\n\n\t\tOk(IndexInput::new(library_id, local_paths)\n\t\t\t.with_mode(IndexMode::from(self.mode.clone()))\n\t\t\t.with_scope(IndexScope::from(self.scope.clone()))\n\t\t\t.with_include_hidden(self.include_hidden)\n\t\t\t.with_persistence(persistence))\n\t}\n}\n\n#[derive(Args, Debug, Clone)]","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/spacedriveapp/spacedrive/blob/6dfeccf2113039e35f2ce735f945e70dc3e4ea45/apps/cli/src/domains/index/args.rs#L63-L99","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Pass plain absolute local paths: `sd-cli index start <lib> /home/me/photos`.","If using the local:// form, use the current device's slug or, simpler, omit the scheme entirely.","Remote/content addressing is explicitly not implemented for indexing yet ('yet' in the message) — track it upstream instead of working around it."],"exampleFix":"# before\nsd-cli index start $LIB content://9f0c...  # -> Non-local address not supported for indexing yet: content://9f0c...\n\n# after\nsd-cli index start $LIB /home/me/photos","handlingStrategy":"type-guard","validationCode":"use sd_core::domain::SdPath;\n\nfn indexable_local_path(s: &str) -> Option<std::path::PathBuf> {\n    SdPath::from_uri(s).ok().and_then(|p| p.as_local_path().map(|p| p.to_path_buf()))\n}\n\nfor p in &args.paths {\n    if indexable_local_path(p).is_none() {\n        anyhow::bail!(\"not a local path: {}\", p);\n    }\n}","typeGuard":"pub fn is_local_indexable(s: &str) -> bool {\n    match SdPath::from_uri(s) {\n        Ok(sd) => sd.as_local_path().is_some(),\n        Err(_) => false,\n    }\n}","tryCatchPattern":"match IndexStartArgs::to_input(&args, library_id) {\n    Err(e) if e.to_string().contains(\"Non-local address not supported\") => { eprintln!(\"pass absolute local paths, not URIs\"); Err(e) }\n    other => other,\n}","preventionTips":["Feed the indexer plain absolute filesystem paths; never paste content:// or remote URIs from other surfaces.","Validate every path with the type guard above before dispatching a batch.","Remember scheme-less strings are treated as local, so the failure only comes from URI-shaped arguments."],"tags":["cli","indexing","sdpath","uri","local-paths"],"backgroundTag":null,"analyzedSha":"6dfeccf2113039e35f2ce735f945e70dc3e4ea45","analyzedAt":"2026-08-16T11:26:17.074Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}