Skip to content

fix(browser): let the guest find the WebView devtools socket without /proc/net/unix - #442

Open
yuga-hashimoto wants to merge 1 commit into
mainfrom
fix/guest-browser-devtools-socket
Open

yuga-hashimoto wants to merge 1 commit into
mainfrom
fix/guest-browser-devtools-socket

Conversation

@yuga-hashimoto

Copy link
Copy Markdown
Owner

Problem

browser_status/browser_navigate fail with "WebView devtools socket not found" even though browser_show opens the browser. The MCP server discovers the socket by scanning /proc/net/unix, which SELinux denies to untrusted_app (Permission denied inside the guest), so the scan can never succeed.

Fix

  • App publishes webview_devtools_remote_<pid> to .and-code/browser-devtools.txt in the active workspace, only when the agent-control opt-in is on.
  • MCP server falls back to that file when /proc/net/unix is unreadable, and verifies it with a connect probe, so a closed socket still reports not connected.
  • Test: name is published only after the opt-in.

Test plan

  • CI unit tests
  • Install the PR APK, enable Let the agent control the Guest Browser, browser_show then browser_status reports connected

@yuga-hashimoto yuga-hashimoto added the build-apk Build and comment the Android debug APK label Nov 25, 2026
…/proc/net/unix

Android denies /proc/net/unix to untrusted_app, so the in-guest MCP server could never scan for webview_devtools_remote_<pid> and always reported 'not connected', even with agent control enabled. The app now publishes the socket name to .and-code/browser-devtools.txt (only after the agent-control opt-in) and the MCP server falls back to it, verifying with a connect probe.
@yuga-hashimoto
yuga-hashimoto force-pushed the fix/guest-browser-devtools-socket branch from a21c79c to 9dda011 Compare November 25, 2026 19:31

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-apk Build and comment the Android debug APK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant