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 {
|
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));
|
return Err(format!("Navigation failed: {}", error_text));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3577,6 +3577,9 @@ iOS Simulator (requires Xcode and Appium):
|
|||||||
chrome-use -p ios device list # List simulators
|
chrome-use -p ios device list # List simulators
|
||||||
chrome-use -p ios swipe up # Swipe gesture
|
chrome-use -p ios swipe up # Swipe gesture
|
||||||
chrome-use -p ios tap @e1 # Touch element
|
chrome-use -p ios tap @e1 # Touch element
|
||||||
|
|
||||||
|
Hit a bug or rough edge? A 30-second issue genuinely sharpens this tool:
|
||||||
|
https://github.com/leeguooooo/chrome-use/issues
|
||||||
"#
|
"#
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -3659,6 +3662,7 @@ fn print_screenshot_diff(data: &serde_json::Map<String, serde_json::Value>) {
|
|||||||
|
|
||||||
pub fn print_version() {
|
pub fn print_version() {
|
||||||
println!("chrome-use {}", env!("CARGO_PKG_VERSION"));
|
println!("chrome-use {}", env!("CARGO_PKG_VERSION"));
|
||||||
|
println!("report bugs / rough edges: https://github.com/leeguooooo/chrome-use/issues");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|||||||
Reference in New Issue
Block a user