fix(cef): expose CDP port in release builds so embedded webviews navigate#960
Merged
Merged
Conversation
…gate The webview-accounts module spawns each embedded provider webview at an `about:blank#openhuman-acct-<id>` 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.
Contributor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe CEF runtime startup now unconditionally includes the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
11 tasks
AusAgentSmith
pushed a commit
to AusAgentSmith/openhuman
that referenced
this pull request
May 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Embedded provider webviews (Telegram / WhatsApp / Slack / Discord panels) ship as blank panels in every notarized release build. The webview opens, the React UI shows the side rail, but the panel where the third-party page should render stays on
about:blank. Reproduces against any signed/notarized build ofmain.Root cause
webview_accountsopens each panel at anabout:blank#openhuman-acct-<id>placeholder URL, thencdp::session::run_session_cycleis supposed to attach to CEF over the Chrome DevTools Protocol and callPage.navigateto the real provider URL. That cycle needs CEF's remote-debugging port reachable on127.0.0.1:19222(seecdp::CDP_HOST/cdp::CDP_PORTand the matching constants inwhatsapp_scanner/telegram_scanner/discord_scanner/slack_scanner).app/src-tauri/src/lib.rswas only passing--remote-debugging-port=19222to CEF insidecfg!(debug_assertions). Release builds never exposed the port. The CDP client then 404'd on/json/version,run_session_cyclereturnedErr, the error was logged atdebuglevel (silently lost in release), the webview never receivedPage.navigate, and the panel stayed onabout:blank.This has been broken since #629 introduced the
cfg!(debug_assertions)gate — the multi-provider CEF webview accounts have never worked in shipped builds.Fix
Drop the gate. The flag is now passed unconditionally.
The CDP socket binds to
127.0.0.1only and Chromium doesn't advertise it on the network, so the exposure is limited to local processes that already share the user's UID.Diagnosis
Launch log from a notarized release build, after clicking on Telegram in the sidebar:
[cdp-session] upfires but no subsequentattaching to target/navigating to ...follow — confirmingrun_session_cycleerrored silently.Test plan
https://web.telegram.org/k/and rendered the page (previously: blank panel).Out of scope (follow-up)
app/src-tauri/src/webview_accounts/mod.rs:615—teardown_account_scannerscallstokio::spawnfromRunEvent::ExitRequested(no current Tokio runtime), causingthread 'main' panicked at ... there is no reactor running, must be called from the context of a Tokio 1.x runtimeon shutdown. Cosmetic (process is exiting anyway) but should be cleaned up.Summary by CodeRabbit