{"record":{"id":"9ab9c0011a3316a0","repo":"spacedriveapp/spacedrive","slug":"could-not-resolve-source-device-slug-to-uuid","errorCode":null,"errorMessage":"Could not resolve source device slug '{}' to UUID in library {}. Device may not be registered in this library.","messagePattern":"Could not resolve source device slug '(.+?)' to UUID in library (.+?)\\. Device may not be registered in this library\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"core/src/ops/files/copy/strategy.rs","lineNumber":437,"sourceCode":"\t\t&self,\n\t\tctx: &JobContext<'a>,\n\t\tsource: &SdPath,\n\t\tdestination: &SdPath,\n\t\tverify_checksum: bool,\n\t\tprogress_callback: Option<&ProgressCallback<'a>>,\n\t) -> Result<u64> {\n\t\tlet (source_device_slug, source_path) = source\n\t\t\t.as_physical()\n\t\t\t.ok_or_else(|| anyhow::anyhow!(\"Source must be a physical path for PULL operation\"))?;\n\n\t\tlet local_dest_path = destination\n\t\t\t.as_local_path()\n\t\t\t.ok_or_else(|| anyhow::anyhow!(\"Destination must be local path for PULL operation\"))?;\n\n\t\tlet library = ctx.library();\n\t\tlet source_device_id = library\n\t\t\t.resolve_device_slug(source_device_slug)\n\t\t\t.ok_or_else(|| anyhow::anyhow!(\n\t\t\t\t\"Could not resolve source device slug '{}' to UUID in library {}. Device may not be registered in this library.\",\n\t\t\t\tsource_device_slug,\n\t\t\t\tlibrary.id()\n\t\t\t))?;\n\n\t\tdebug!(\n\t\t\t\"RemoteTransferStrategy PULL: device:{} ({}) -> {}\",\n\t\t\tsource_device_slug,\n\t\t\tsource_device_id,\n\t\t\tlocal_dest_path.display()\n\t\t);\n\n\t\tinfo!(\n\t\t\t\"Initiating PULL transfer: device:{}:{} -> {}\",\n\t\t\tsource_device_slug,\n\t\t\tsource_path.display(),\n\t\t\tlocal_dest_path.display()\n\t\t);","sourceCodeStart":419,"sourceCodeEnd":455,"githubUrl":"https://github.com/spacedriveapp/spacedrive/blob/6dfeccf2113039e35f2ce735f945e70dc3e4ea45/core/src/ops/files/copy/strategy.rs#L419-L455","documentation":"Mirror of the PUSH-side failure: execute_pull resolves the source's device slug through Library::resolve_device_slug (core/src/library/mod.rs:333) and gets None, so the slug is unknown in this library. Without the UUID the transfer cannot proceed to the device registry lookup or network routing.","triggerScenarios":"PULL from a device slug with no row in this library's device table: unpaired peer, slug from another library, stale slug after the peer re-registered its identity, or device rows not yet replicated to this library's DB.","commonSituations":"Copying from a newly added device before its registration syncs; peer re-installed Spacedrive and generated a new identity; confusion between multiple libraries sharing device names.","solutions":["Confirm the source device is paired with and synced in this library, then retry","Verify the slug against the library's device list and correct the source SdPath","Re-pair the device if it re-registered with a new identity","Wait for library/device sync to complete before dispatching the pull job"],"exampleFix":"// before\nlet src = SdPath::physical(\"old-phone\", PathBuf::from(\"DCIM/1.jpg\"));\nremote_strategy.execute_pull(ctx, &src, &dest).await?; // \"Could not resolve source device slug ...\"\n\n// after\nlet slug = \"old-phone\";\nlet Some(device_id) = ctx.library().resolve_device_slug(slug) else {\n    return Err(anyhow::anyhow!(\"device '{}' not registered in library {}\", slug, ctx.library().id()));\n};\ntracing::debug!(%device_id, \"source device resolved\");\nremote_strategy.execute_pull(ctx, &src, &dest).await?;","handlingStrategy":"validation","validationCode":"let (slug, _) = source.as_physical().ok_or_else(|| anyhow::anyhow!(\"source not physical\"))?;\nctx.library().resolve_device_slug(slug).ok_or_else(|| {\n    anyhow::anyhow!(\"device '{}' not registered in library {}; pair it first\", slug, ctx.library().id())\n})?;","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Resolve source slugs against the library before enqueueing PULL jobs","Re-pair devices after identity changes","Gate multi-device copy features on both devices being library members"],"tags":["rust","spacedrive","pull","device-registry","cross-device","copy"],"backgroundTag":null,"analyzedSha":"6dfeccf2113039e35f2ce735f945e70dc3e4ea45","analyzedAt":"2026-08-16T11:26:17.074Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}