spacedriveapp/spacedrive · error

Invalid sync mode

Error message

Invalid sync mode

What it means

Error "Invalid sync mode" thrown in spacedriveapp/spacedrive.

Source

Thrown at core/src/service/file_sync/mod.rs:93

	pub async fn sync_now(&self, conduit_id: i32) -> Result<SyncHandle> {
		// Load conduit
		let conduit = self.conduit_manager.get_conduit(conduit_id).await?;

		if !conduit.enabled {
			return Err(anyhow::anyhow!("Conduit is disabled"));
		}

		// Check if already syncing
		if self.active_syncs.read().await.contains_key(&conduit_id) {
			return Err(anyhow::anyhow!("Sync already in progress for this conduit"));
		}

		// Calculate sync operations
		info!("Calculating sync operations for conduit {}", conduit_id);
		let operations = self.resolver.calculate_operations(&conduit).await?;

		let mode = sync_conduit::SyncMode::from_str(&conduit.sync_mode)
			.ok_or_else(|| anyhow::anyhow!("Invalid sync mode"))?;

		let copy_count = operations.source_to_target.to_copy.len()
			+ operations
				.target_to_source
				.as_ref()
				.map(|ops| ops.to_copy.len())
				.unwrap_or(0);
		let delete_count = operations.source_to_target.to_delete.len()
			+ operations
				.target_to_source
				.as_ref()
				.map(|ops| ops.to_delete.len())
				.unwrap_or(0);

		info!(
			"Sync plan for {:?} mode: {} to copy, {} to delete",
			mode, copy_count, delete_count
		);

View on GitHub (pinned to 6dfeccf211)

When it happens

Trigger: Thrown at core/src/service/file_sync/mod.rs:93 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of spacedriveapp/spacedrive@6dfeccf211 (2026-08-16). Data as JSON: /api/errors/6332b9eef694ce1c. Report an issue: GitHub.