spacedriveapp/spacedrive · error · anyhow::Error

Failed to finish stream: {}

Error message

Failed to finish stream: {}

What it means

Error "Failed to finish stream: {}" thrown in spacedriveapp/spacedrive.

Source

Thrown at core/src/service/network/protocol/sync/transport.rs:95

			})?;

		// Open a unidirectional stream and send the message
		let mut send = conn
			.open_uni()
			.await
			.map_err(|e| anyhow::anyhow!("Failed to open stream: {}", e))?;

		send.write_all(&bytes).await.map_err(|e| {
			warn!(
				device_uuid = %target_device,
				error = %e,
				"Failed to write sync message to stream"
			);
			anyhow::anyhow!("Failed to write message: {}", e)
		})?;

		send.finish()
			.map_err(|e| anyhow::anyhow!("Failed to finish stream: {}", e))?;

		debug!(
			device_uuid = %target_device,
			node_id = %node_id,
			bytes_sent = bytes.len(),
			"Sync message sent successfully"
		);

		Ok(())
	}

	/// Send a sync request and wait for response
	///
	/// Uses bidirectional streams for proper request/response pattern (Iroh best practice)
	async fn send_sync_request(
		&self,
		target_device: Uuid,
		request: SyncMessage,

View on GitHub (pinned to 6dfeccf211)

When it happens

Trigger: Thrown at core/src/service/network/protocol/sync/transport.rs:95 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/ed63d125ddc3c998. Report an issue: GitHub.