jackwener/OpenCLI · error · CommandExecutionError
settings click failed
Error message
settings click failed
What it means
CommandExecutionError thrown by the 'settings' command when its clickFirstScript over the selectors '[data-testid="settings-button"]' and 'button[aria-label="Settings"]' reports `ok: false`. The fallback message 'settings click failed' appears when the page-side script gives no `reason`. It means the settings button could not be located or clicked in the current page state.
Source
Thrown at clis/antigravity/audit-extras.js:191
});
// -------- settings --------
cli({
site: 'antigravity',
name: 'settings',
access: 'write',
description: 'Click the Antigravity settings button (matched by data-testid="settings-button").',
domain: '127.0.0.1',
strategy: Strategy.UI,
browser: true,
args: [],
columns: ['Status'],
func: async (page) => {
const res = unwrapEvaluateResult(await page.evaluate(clickFirstScript([
'[data-testid="settings-button"]',
'button[aria-label="Settings"]',
])));
if (!res?.ok) throw new CommandExecutionError(res?.reason || 'settings click failed', '');
await page.wait(0.6);
return [{ Status: `clicked via ${res.sel}` }];
},
});
// -------- sidebar-toggle --------
cli({
site: 'antigravity',
name: 'sidebar-toggle',
access: 'write',
description: 'Click Toggle Sidebar (collapses/expands the Antigravity sidebar).',
domain: '127.0.0.1',
strategy: Strategy.UI,
browser: true,
args: [],
columns: ['Status'],
func: async (page) => {
const res = unwrapEvaluateResult(await page.evaluate(clickFirstScript(['button[aria-label="Toggle Sidebar"]'])));View on GitHub (pinned to 49907e53dc)
Solutions
- Wait for the app to fully load, then re-run the command.
- Confirm the settings button exists in the DOM (devtools) and check its current data-testid / aria-label.
- Log in to Antigravity if the app shell did not render.
- Add the new selector to the clickFirstScript selector list in audit-extras.js.
- On success the command reports 'clicked via <sel>' — use that to confirm which selector worked.
Example fix
// before clickFirstScript(['[data-testid="settings-button"]', 'button[aria-label="Settings"]']) // after clickFirstScript(['[data-testid="settings-button"]', 'button[aria-label="Settings"]', 'button[aria-label="Open settings"]'])
Defensive patterns
Strategy: validation
Validate before calling
const hasSettings = await page.evaluate(
"!!document.querySelector('[data-testid=\"settings-button\"], button[aria-label=\"Settings\"]')"
);
if (!hasSettings) throw new Error('Settings button not rendered — wait for app shell to load.'); Type guard
function clickSucceeded(res) {
return res != null && typeof res === 'object' && res.ok === true && typeof res.sel === 'string';
} Try / catch
try {
await runCmd('antigravity settings');
} catch (e) {
if (e.code === 'EXEC' && /settings click failed/i.test(e.message)) {
await sleep(1000); // allow app shell to mount
await runCmd('antigravity settings');
} else throw e;
} Prevention
- Wait for full app initialization before clicking chrome buttons.
- Verify data-testid/aria-label after Antigravity updates.
- Confirm login state — unauthenticated pages lack the settings button.
- Log the successful selector ('clicked via <sel>') to detect drift early.
When it happens
Trigger: `page.evaluate(clickFirstScript([...]))` returns { ok: false } or null: neither selector matched, the button is inside a closed menu, the page hasn't finished loading, or evaluate failed (navigation, crash).
Common situations: Antigravity redesigned its settings entry point (data-testid/aria-label changed); the command runs before the app shell mounts; user not logged in so the main UI (with settings) never renders; the button is behind a hover-revealed menu.
Related errors
- sidebar-toggle failed
- ${label} click failed
- Copy button click failed
- Prompt Enhance button not found
- Open Editor button not found
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/1b97371a6f92635e.
Report an issue: GitHub.