fix(launch): warn when launching a debug-port Chrome while the relay is up (#32)
The connect-mode diagnostic (1.5.5) proved the 'Allow remote debugging?' modal is NOT Chrome 149 UX (my earlier hypothesis) — it's chrome-use launching a fresh debug-port Chrome on session=default while the ab-connect relay is up (32 logged CONSENT-MODAL-RISK launches), almost always from a stray --launch/--no-auto-connect. A launch now warns loudly when the relay is available, naming the modal and how to avoid it (drop --launch/--new, don't pass --no-auto-connect), so the modal is self-explained and the offending caller is fixable.
This commit is contained in:
@@ -1369,6 +1369,20 @@ fn main() {
|
|||||||
&& flags.provider.is_none()
|
&& flags.provider.is_none()
|
||||||
&& (flags.force_launch || !flags.auto_connect)
|
&& (flags.force_launch || !flags.auto_connect)
|
||||||
{
|
{
|
||||||
|
// Launching a debug-port Chrome pops Chrome's "Allow remote debugging?"
|
||||||
|
// consent modal (Chrome 136+). When the ab-connect relay is already up,
|
||||||
|
// this is almost always unintended — the relay drives the user's real
|
||||||
|
// Chrome with NO modal. Warn so the modal is self-explained and the
|
||||||
|
// caller (often a stray --launch / --no-auto-connect) is fixable (#32).
|
||||||
|
if !flags.json && connect::relay_url().is_some() {
|
||||||
|
eprintln!(
|
||||||
|
"{} launching a new Chrome with a debug port — this pops Chrome's \
|
||||||
|
\"Allow remote debugging?\" modal.\n The ab-connect relay is up; \
|
||||||
|
drop --launch/--new (and don't pass --no-auto-connect) to drive your \
|
||||||
|
real Chrome with no modal.",
|
||||||
|
color::warning_indicator()
|
||||||
|
);
|
||||||
|
}
|
||||||
let mut launch_cmd = json!({
|
let mut launch_cmd = json!({
|
||||||
"id": gen_id(),
|
"id": gen_id(),
|
||||||
"action": "launch",
|
"action": "launch",
|
||||||
|
|||||||
Reference in New Issue
Block a user