Skip to content

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

Bump app to v2.4.143, Bump CLI to v0.3.314 — fix(chatgpt-oauth): match the working secret-store open path + surface the real sqlx error — release-app release-cli

Louis Beaumont3499b11503d8
diff --git a/Cargo.toml b/Cargo.toml
index e82c74b91..556623d33 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,7 +6,7 @@ exclude = ["apps/screenpipe-app-tauri/src-tauri", "crates/screenpipe-integration
resolver = "2"
[workspace.package]
-version = "0.3.313"
+version = "0.3.314"
authors = ["louis030195 <[email protected]>"]
description = ""
repository = "https://github.com/screenpipe/screenpipe"
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index 0dc1f542a..d6b49a9ac 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -3416,6 +3416,18 @@ dependencies = [
"once_cell",
]
+[[package]]
+name = "fallible-iterator"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
+
+[[package]]
+name = "fallible-streaming-iterator"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
+
[[package]]
name = "fastrand"
version = "2.3.0"
@@ -9227,6 +9239,20 @@ dependencies = [
"realfft",
]
+[[package]]
+name = "rusqlite"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2"
+dependencies = [
+ "bitflags 2.11.0",
+ "fallible-iterator",
+ "fallible-streaming-iterator",
+ "hashlink",
+ "libsqlite3-sys",
+ "smallvec 1.15.1",
+]
+
[[package]]
name = "russh"
version = "0.57.1"
@@ -9710,10 +9736,12 @@ dependencies = [
"chrono",
"cidre 0.13.1",
"crossbeam-channel",
+ "dirs 5.0.1",
"evdev",
"libc",
"parking_lot",
"regex",
+ "rusqlite",
"screenpipe-core",
"screenpipe-db",
"serde",
@@ -9726,7 +9754,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "2.4.140"
+version = "2.4.143"
dependencies = [
"anyhow",
"arboard",
@@ -9833,7 +9861,7 @@ dependencies = [
[[package]]
name = "screenpipe-audio"
-version = "0.3.311"
+version = "0.3.314"
dependencies = [
"anyhow",
"audiopipe",
@@ -9889,7 +9917,7 @@ dependencies = [
[[package]]
name = "screenpipe-config"
-version = "0.3.311"
+version = "0.3.314"
dependencies = [
"dirs 6.0.0",
"serde",
@@ -9901,7 +9929,7 @@ dependencies = [
[[package]]
name = "screenpipe-connect"
-version = "0.3.311"
+version = "0.3.314"
dependencies = [
"anyhow",
"async-trait",
@@ -9934,7 +9962,7 @@ dependencies = [
[[package]]
name = "screenpipe-core"
-version = "0.3.311"
+version = "0.3.314"
dependencies = [
"accessibility",
"accessibility-sys",
@@ -9982,7 +10010,7 @@ dependencies = [
[[package]]
name = "screenpipe-db"
-version = "0.3.311"
+version = "0.3.314"
dependencies = [
"anyhow",
"chrono",
@@ -10007,7 +10035,7 @@ dependencies = [
[[package]]
name = "screenpipe-engine"
-version = "0.3.311"
+version = "0.3.314"
dependencies = [
"anyhow",
"arc-swap",
@@ -10073,7 +10101,7 @@ dependencies = [
[[package]]
name = "screenpipe-events"
-version = "0.3.311"
+version = "0.3.314"
dependencies = [
"anyhow",
"chrono",
@@ -10089,7 +10117,7 @@ dependencies = [
[[package]]
name = "screenpipe-screen"
-version = "0.3.311"
+version = "0.3.314"
dependencies = [
"accessibility-sys",
"anyhow",
@@ -10142,7 +10170,7 @@ dependencies = [
[[package]]
name = "screenpipe-vault"
-version = "0.3.311"
+version = "0.3.314"
dependencies = [
"argon2",
"chacha20poly1305",
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index 4895bcf49..e6e8c5a26 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "2.4.142"
+version = "2.4.143"
description = "24/7 memory for your desktop. 100% local."
authors = ["you"]
license = ""
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/chatgpt_oauth.rs b/apps/screenpipe-app-tauri/src-tauri/src/chatgpt_oauth.rs
index d685b92a4..a69fd9095 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/chatgpt_oauth.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/chatgpt_oauth.rs
@@ -18,8 +18,6 @@
use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine as _};
use serde::{Deserialize, Serialize};
use sha2::{Digest, Sha256};
-use sqlx::sqlite::SqliteConnectOptions;
-use std::str::FromStr;
use tauri::{AppHandle, Manager};
use tauri_plugin_opener::OpenerExt;
use tokio::io::{AsyncReadExt, AsyncWriteExt};
@@ -50,20 +48,24 @@ pub struct ChatGptOAuthStatus {
}
/// Open a connection to the secrets store (same DB as the screenpipe server).
+///
+/// Uses the same `?mode=rwc` URI pattern as `oauth.rs` and the engine's
+/// `auth_key.rs` — that path is known to coexist with the engine's own
+/// pool on the busy main `db.sqlite`. The previous `SqliteConnectOptions`
+/// builder path failed intermittently with "failed to create secrets
+/// table" against a healthy on-disk schema, hiding the real sqlx error
+/// behind anyhow's single-line Display. Errors here use `{:#}` so the
+/// full chain (e.g. `database is locked`, `connection refused`, `unable
+/// to open database file`) reaches the log instead of the generic
+/// top-level wrapper.
async fn open_secret_store() -> Result<screenpipe_secrets::SecretStore, String> {
let data_dir = screenpipe_core::paths::default_screenpipe_data_dir();
let db_path = data_dir.join("db.sqlite");
+ let db_url = format!("sqlite:{}?mode=rwc", db_path.display());
- // Use SqliteConnectOptions so busy_timeout is set correctly via PRAGMA,
- // not just as an unrecognised query parameter.
- let opts = SqliteConnectOptions::from_str(&format!("sqlite:{}", db_path.display()))
- .map_err(|e| format!("invalid db path: {}", e))?
- .create_if_missing(true)
- .busy_timeout(std::time::Duration::from_secs(10));
-
- let pool = sqlx::SqlitePool::connect_with(opts)
+ let pool = sqlx::SqlitePool::connect(&db_url)
.await
- .map_err(|e| format!("failed to open db: {}", e))?;
+ .map_err(|e| format!("failed to open db at {}: {}", db_path.display(), e))?;
let secret_key = match crate::secrets::get_key_if_encryption_enabled() {
crate::secrets::KeyResult::Found(k) => Some(k),
@@ -72,7 +74,7 @@ async fn open_secret_store() -> Result<screenpipe_secrets::SecretStore, String>
screenpipe_secrets::SecretStore::new(pool, secret_key)
.await
- .map_err(|e| format!("failed to init secret store: {}", e))
+ .map_err(|e| format!("failed to init secret store: {:#}", e))
}
async fn read_tokens_from_store() -> Option<OAuthTokens> {