From f38d4a35c49f9533a64cd8341aaee8c6e8599de7 Mon Sep 17 00:00:00 2001 From: Martin Dimitrov Date: Sat, 27 Jun 2026 08:52:26 -0700 Subject: [PATCH 1/2] stub methods in chrome plugin and use native tls --- Cargo.toml | 3 ++- src/plugins/chrome.rs | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1c63369..a415f76 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,8 @@ features = ["sqlite"] [dependencies.reqwest] version = "0.13.4" -features = ["gzip", "json"] +default-features = false +features = ["gzip", "json", "native-tls"] [features] pym = ["pyo3"] diff --git a/src/plugins/chrome.rs b/src/plugins/chrome.rs index 27d6d74..6e940d1 100644 --- a/src/plugins/chrome.rs +++ b/src/plugins/chrome.rs @@ -180,3 +180,14 @@ fn encryption_key() -> Result> { // Windows users should set `csrf`/`session` in the config manually. Err(Error::ChromeNotLogin) } + +// for headless installations stub functions are defined +#[cfg(any(target_os = "android"))] +fn cookie_db_path() -> Option { + None +} + +#[cfg(any(target_os = "android"))] +fn encryption_key() -> Result> { + Err(Error::ChromeNotLogin) +} From 92280a9efd778dd870748e6a3c8b0fa227b11868 Mon Sep 17 00:00:00 2001 From: Martin Dimitrov Date: Sat, 27 Jun 2026 08:59:21 -0700 Subject: [PATCH 2/2] fix lint --- src/plugins/chrome.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/chrome.rs b/src/plugins/chrome.rs index 6e940d1..d948a13 100644 --- a/src/plugins/chrome.rs +++ b/src/plugins/chrome.rs @@ -182,12 +182,13 @@ fn encryption_key() -> Result> { } // for headless installations stub functions are defined -#[cfg(any(target_os = "android"))] +// can add to stubs with cfg(any(...)) +#[cfg(target_os = "android")] fn cookie_db_path() -> Option { None } -#[cfg(any(target_os = "android"))] +#[cfg(target_os = "android")] fn encryption_key() -> Result> { Err(Error::ChromeNotLogin) }