From d45ad457a0b567157a7e795004782b168a02a61d Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Mon, 27 Apr 2026 01:02:29 -0700 Subject: [PATCH] fix(cef): expose CDP port in release builds so embedded webviews navigate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The webview-accounts module spawns each embedded provider webview at an `about:blank#openhuman-acct-` placeholder URL, then drives it to the real provider URL (web.telegram.org / web.whatsapp.com / discord.com / slack.com) via a Chrome DevTools Protocol `Page.navigate` call from the per-account CDP session opener (`cdp::session::run_session_cycle`). That path needs CEF's remote-debugging port reachable on `127.0.0.1:19222` (see `cdp::CDP_HOST` / `cdp::CDP_PORT` and the matching constants in each scanner module). The Tauri shell was only passing `--remote-debugging-port=19222` to CEF inside `cfg!(debug_assertions)`, so release builds never exposed the port. The CDP client then failed at the `/json/version` HTTP probe, `run_session_cycle` returned an error logged at `debug` level, and the webview stayed on `about:blank` — blank panels for every embedded provider in shipped notarized builds. Removing the gate makes the port available in release too. The CDP socket is bound to `127.0.0.1` only and Chromium does not advertise it on the network, so the security exposure is limited to local processes that already share the user's UID. --- app/src-tauri/src/lib.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/src-tauri/src/lib.rs b/app/src-tauri/src/lib.rs index 6918273cf9..d87805af11 100644 --- a/app/src-tauri/src/lib.rs +++ b/app/src-tauri/src/lib.rs @@ -824,9 +824,15 @@ pub fn run() { // silently disappears and huddle/call buttons no-op. ("--enable-features", Some("SharedArrayBuffer")), ]; - if cfg!(debug_assertions) { - args.push(("--remote-debugging-port", Some("19222"))); - } + // Always expose the CDP port, not just in debug. The webview-accounts + // CDP session opener navigates each embedded provider webview from its + // `about:blank#openhuman-acct-...` placeholder to the real provider URL + // via `Page.navigate`. Without this port available in release builds, + // the CDP client can't attach (`browser_ws_url()` 404s on /json/version), + // the navigation never fires, and the embedded webview stays on + // `about:blank` (blank panel for Telegram / WhatsApp / Slack / Discord). + // Same port the `cdp::CDP_HOST`/`cdp::CDP_PORT` constants expect. + args.push(("--remote-debugging-port", Some("19222"))); tauri::Builder::::new().command_line_args::<&str, &str>(args) };