YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix: cloud sync download — remove nonexistent device_name column, add S3 error diagnostics
Louis Beaumont0782bea1e2aa
diff --git a/crates/screenpipe-core/src/sync/client.rs b/crates/screenpipe-core/src/sync/client.rsindex d066c73e2..65fed960b 100644--- a/crates/screenpipe-core/src/sync/client.rs+++ b/crates/screenpipe-core/src/sync/client.rs@@ -344,9 +344,16 @@ impl SyncClient {let response = self.http.get(download_url).send().await?;if !response.status().is_success() {+ let status = response.status();+ let body = response+ .text()+ .await+ .unwrap_or_default();+ // Truncate body to avoid flooding logs with large XML error responses+ let body_preview = if body.len() > 500 { &body[..500] } else { &body };return Err(SyncError::Server(format!(- "S3 download failed with status: {}",- response.status()+ "S3 download failed with status: {} body: {}",+ status, body_preview)));}diff --git a/crates/screenpipe-server/src/sync_provider.rs b/crates/screenpipe-server/src/sync_provider.rsindex f0e6e78c8..0136d439d 100644--- a/crates/screenpipe-server/src/sync_provider.rs+++ b/crates/screenpipe-server/src/sync_provider.rs@@ -580,15 +580,16 @@ impl ScreenpipeSyncProvider {}// Create audio chunk for synced transcription+ // Note: audio_chunks has no device_name column — device info is on the+ // audio_transcriptions row (the `device` column) inserted below.let audio_chunk_id: i64 = sqlx::query_scalar(r#"- INSERT INTO audio_chunks (file_path, device_name, sync_id, machine_id)- VALUES ('cloud://' || ?, ?, ?, ?)+ INSERT INTO audio_chunks (file_path, sync_id, machine_id)+ VALUES ('cloud://' || ?, ?, ?)RETURNING id"#,).bind(&trans.sync_id)- .bind(&trans.device).bind(&trans.sync_id).bind(&chunk.machine_id).fetch_one(pool)