{"record":{"id":"054956451fbe997c","repo":"spacedriveapp/spacedrive","slug":"device-config-not-found-please-run-the-daemon-fir","errorCode":null,"errorMessage":"Device config not found. Please run the daemon first to initialize device config.","messagePattern":"Device config not found\\. Please run the daemon first to initialize device config\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"apps/cli/src/domains/library/mod.rs","lineNumber":263,"sourceCode":"\t\t\t\t});\n\t\t\t}\n\t\t},\n\t}\n\tOk(())\n}\n\nasync fn run_interactive_sync_setup(ctx: &Context) -> Result<LibrarySyncSetupInput> {\n\tuse crate::util::confirm::{select, text};\n\tuse sd_core::ops::network::devices::{\n\t\toutput::ListPairedDevicesOutput, query::ListPairedDevicesInput,\n\t};\n\n\tprintln!(\"\\n=== Library Sync Setup ===\\n\");\n\n\t// Get local device ID from config\n\tlet config_path = ctx.data_dir.join(\"device.json\");\n\tif !config_path.exists() {\n\t\tanyhow::bail!(\n\t\t\t\"Device config not found. Please run the daemon first to initialize device config.\"\n\t\t);\n\t}\n\tlet config_data = std::fs::read_to_string(&config_path)?;\n\tlet device_config: sd_core::device::DeviceConfig = serde_json::from_str(&config_data)?;\n\tlet local_device_id = device_config.id;\n\n\t// Step 1: Select local library\n\tlet libraries: Vec<sd_core::ops::libraries::list::output::LibraryInfo> = execute_core_query!(\n\t\tctx,\n\t\tsd_core::ops::libraries::list::query::ListLibrariesInput {\n\t\t\tinclude_stats: false\n\t\t}\n\t);\n\n\tif libraries.is_empty() {\n\t\tanyhow::bail!(\n\t\t\t\"No libraries found. Create a library first with:\\n  sd library create <name>\"","sourceCodeStart":245,"sourceCodeEnd":281,"githubUrl":"https://github.com/spacedriveapp/spacedrive/blob/6dfeccf2113039e35f2ce735f945e70dc3e4ea45/apps/cli/src/domains/library/mod.rs#L245-L281","documentation":"Error \"Device config not found. Please run the daemon first to initialize device config.\" thrown in spacedriveapp/spacedrive.","triggerScenarios":"Thrown at apps/cli/src/domains/library/mod.rs:263 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6dfeccf2113039e35f2ce735f945e70dc3e4ea45","analyzedAt":"2026-08-16T11:26:17.074Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}