spacedriveapp/spacedrive · error · anyhow::Error
No libraries found on remote device. Use 'Share my library'
Error message
No libraries found on remote device. Use 'Share my library' instead.
What it means
Thrown by the library sync wizard when the user chooses option 1 ('Join remote library') but the discovery result from the remote device contains zero libraries. Joining requires an existing remote library, so the wizard aborts and points you at the 'Share my library' path instead, which creates a library from the local side.
Source
Thrown at apps/cli/src/domains/library/mod.rs:374
let action = match action_idx {
0 => {
// Share local library
let name = libraries[library_idx].name.clone();
println!(
"\n✓ Will share library '{}' to remote device '{}'\n",
name, remote_device.name
);
(
LibrarySyncAction::ShareLocalLibrary { library_name: name },
None,
)
}
1 => {
// Join remote library
if discovery_out.libraries.is_empty() {
anyhow::bail!(
"No libraries found on remote device. Use 'Share my library' instead."
);
}
let remote_lib_choices: Vec<String> = discovery_out
.libraries
.iter()
.map(|lib| {
format!(
"{} ({} entries, {} locations)",
lib.name, lib.statistics.total_files, lib.statistics.location_count
)
})
.collect();
let remote_lib_idx = select("Select remote library to join", &remote_lib_choices)?;
let remote_library = &discovery_out.libraries[remote_lib_idx];
View on GitHub (pinned to 6dfeccf211)
Solutions
- Choose 'Share my library to remote device' (option 0) instead, which creates the shared library from your local library
- Or create a library on the remote device first, then re-run the wizard and join it
- Verify what the remote actually exposes by re-running discovery once the remote has a library
Defensive patterns
Strategy: fallback
Validate before calling
if discovery_out.libraries.is_empty() {
println!("Remote has no libraries; falling back to 'Share my library' flow");
// proceed with LibrarySyncAction::ShareLocalLibrary { library_name }
} Type guard
fn can_join_remote(discovery: &DiscoverRemoteLibrariesOutput) -> bool {
!discovery.libraries.is_empty()
} Prevention
- Inspect the wizard's remote library list (entries/locations counts) before choosing Join
- Create a library on the remote device first if you specifically want to join it
- Treat 'Share my library' as the default path between fresh devices
When it happens
Trigger: Choosing 'Join remote library' after 'sd library sync' with a remote device that has no libraries yet (fresh remote install, or the remote library list is empty).
Common situations: Two fresh devices paired for the first time; remote user deleted all their libraries; testing sync between two dev daemons that were just initialized.
Related errors
- No paired devices found. Pair a device first with: sd networ
- Library merging is not yet implemented
- No library selected. Use 'sd library switch' to select a lib
- Operation aborted by user
- Remote device {} is not online
AI-assisted analysis of spacedriveapp/spacedrive@6dfeccf211 (2026-08-16).
Data as JSON: /api/errors/0b6cd86aa0e00170.
Report an issue: GitHub.