spacedriveapp/spacedrive · error · anyhow::Error
Could not resolve source device slug '{}' to UUID in library
Error message
Could not resolve source device slug '{}' to UUID in library {}. Device may not be registered in this library. What it means
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.
Source
Thrown at core/src/ops/files/copy/strategy.rs:437
&self,
ctx: &JobContext<'a>,
source: &SdPath,
destination: &SdPath,
verify_checksum: bool,
progress_callback: Option<&ProgressCallback<'a>>,
) -> Result<u64> {
let (source_device_slug, source_path) = source
.as_physical()
.ok_or_else(|| anyhow::anyhow!("Source must be a physical path for PULL operation"))?;
let local_dest_path = destination
.as_local_path()
.ok_or_else(|| anyhow::anyhow!("Destination must be local path for PULL operation"))?;
let library = ctx.library();
let source_device_id = library
.resolve_device_slug(source_device_slug)
.ok_or_else(|| anyhow::anyhow!(
"Could not resolve source device slug '{}' to UUID in library {}. Device may not be registered in this library.",
source_device_slug,
library.id()
))?;
debug!(
"RemoteTransferStrategy PULL: device:{} ({}) -> {}",
source_device_slug,
source_device_id,
local_dest_path.display()
);
info!(
"Initiating PULL transfer: device:{}:{} -> {}",
source_device_slug,
source_path.display(),
local_dest_path.display()
);View on GitHub (pinned to 6dfeccf211)
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
Example fix
// before
let src = SdPath::physical("old-phone", PathBuf::from("DCIM/1.jpg"));
remote_strategy.execute_pull(ctx, &src, &dest).await?; // "Could not resolve source device slug ..."
// after
let slug = "old-phone";
let Some(device_id) = ctx.library().resolve_device_slug(slug) else {
return Err(anyhow::anyhow!("device '{}' not registered in library {}", slug, ctx.library().id()));
};
tracing::debug!(%device_id, "source device resolved");
remote_strategy.execute_pull(ctx, &src, &dest).await?; Defensive patterns
Strategy: validation
Validate before calling
let (slug, _) = source.as_physical().ok_or_else(|| anyhow::anyhow!("source not physical"))?;
ctx.library().resolve_device_slug(slug).ok_or_else(|| {
anyhow::anyhow!("device '{}' not registered in library {}; pair it first", slug, ctx.library().id())
})?; Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Could not resolve destination device slug '{}' to UUID in li
- Source must be a physical path for PULL operation
- Destination must be local path for PULL operation
- Source must be local path for PUSH operation
- Could not find node_id for device {} (slug: {}). Device may
AI-assisted analysis of spacedriveapp/spacedrive@6dfeccf211 (2026-08-16).
Data as JSON: /api/errors/9ab9c0011a3316a0.
Report an issue: GitHub.