feat(dx): guide users to file issues; clear error for data: URLs over the relay
#5: the CLI never pointed users at the issue tracker. `--help` and `--version` now print the issues URL (https://github.com/leeguooooo/chrome-use/issues), so agents hitting a rough edge know where to report it (the skill already nudges). #1: navigating to a `data:` URL over the extension relay fails with a cryptic `net::ERR_ABORTED` on an about:blank tab (chrome.debugger/chrome.tabs can't drive a top-frame data: navigation; it works fine under --launch). Detect that case and explain it — use a real http(s)://file:// URL or --launch — instead of leaking the raw code. (Surfaced while stress-testing 5 concurrent agents.)
This commit is contained in:
@@ -1116,6 +1116,17 @@ impl BrowserManager {
|
||||
};
|
||||
|
||||
if let Some(ref error_text) = nav_result.error_text {
|
||||
// `data:` URLs abort over the extension relay: chrome.debugger /
|
||||
// chrome.tabs can't drive a top-frame data: navigation, so it comes
|
||||
// back net::ERR_ABORTED on an about:blank tab. Explain it instead of
|
||||
// leaking the cryptic code (data: works fine under `--launch`).
|
||||
if url.starts_with("data:") && error_text.contains("ERR_ABORTED") {
|
||||
return Err(format!(
|
||||
"Navigation failed: {error_text}. Chrome blocks top-frame `data:` URLs over \
|
||||
the extension relay — use a real http(s):// or file:// URL, or run with \
|
||||
`--launch` (where data: URLs work)."
|
||||
));
|
||||
}
|
||||
return Err(format!("Navigation failed: {}", error_text));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user