jackwener/OpenCLI · error · CommandExecutionError
Requires up-to-date Chrome extension (nativeClick).
Error message
Requires up-to-date Chrome extension (nativeClick).
What it means
When the in-page UI flow cannot finish by itself it reports needsNativeInteraction, expecting the host browser page object to expose nativeClick for trusted, OS-level clicks (e.g. on x.com's save/confirm button). If page.nativeClick is not a function, the environment's Chrome extension/bridge is too old, and this CommandExecutionError is thrown. The operation cannot be completed without upgrading.
Source
Thrown at clis/twitter/list-remove-core.js:227
rowClickX: Math.round(rowRect.left + rowRect.width / 2),
rowClickY: Math.round(rowRect.top + rowRect.height / 2),
saveClickX: saveRect ? Math.round(saveRect.left + saveRect.width / 2) : null,
saveClickY: saveRect ? Math.round(saveRect.top + saveRect.height / 2) : null,
mutationsBefore: window.__opencliListMutations.length,
};
} catch (e) {
return { ok: false, message: 'UI error: ' + (e?.message || String(e)) };
}
})()`));
if (!uiResult.ok) {
throw new CommandExecutionError(`Failed to remove @${username} from list ${listId}: ${uiResult.message}`);
}
let verifiedBy = null;
if (uiResult.needsNativeInteraction) {
if (typeof page.nativeClick !== 'function') {
throw new CommandExecutionError('Requires up-to-date Chrome extension (nativeClick).');
}
if (!uiResult.saveClickX) {
throw new CommandExecutionError('Save button not found in dialog.');
}
const memberCountBefore = Number(targetList.members) || 0;
await page.nativeClick(uiResult.rowClickX, uiResult.rowClickY);
await new Promise((r) => setTimeout(r, 800));
await page.nativeClick(uiResult.saveClickX, uiResult.saveClickY);
await new Promise((r) => setTimeout(r, 3500));
const listsAfter = unwrapBrowserResult(await page.evaluate(`async () => {
const r = await fetch(${JSON.stringify(listsUrl)}, { headers: ${headers}, credentials: 'include' });
if (!r.ok) return { __error: 'HTTP ' + r.status };
return await r.json();
}`));
if (listsAfter && listsAfter.__error) {
throw new CommandExecutionError(`Could not verify list removal: ${listsAfter.__error}`);
}
if (!getListsManagementInstructions(listsAfter)) {View on GitHub (pinned to 49907e53dc)
Solutions
- Update the companion Chrome extension to the latest version and reload the browser (chrome://extensions → reload, or restart the browser).
- Verify the page object passed to listRemoveUser comes from the opencli browser strategy (which implements nativeClick), not a raw Puppeteer/Playwright page.
- Confirm extension and CLI versions match — reinstall both if the bridge still reports no nativeClick.
- As a workaround, perform the final save/confirm click manually in the visible browser window while the command waits.
Example fix
// before (raw puppeteer page lacks nativeClick)
await listRemoveUser(await browser.newPage(), { listId, username });
// after
const page = await opencliBrowser.newPage(); // strategy page with nativeClick bridge
await listRemoveUser(page, { listId, username }); Defensive patterns
Strategy: validation
Validate before calling
// Feature-detect the native bridge before running the command
if (typeof page.nativeClick !== 'function') {
throw new Error('Update the companion Chrome extension (or use an opencli strategy page that implements nativeClick).');
}
await listRemoveUser(page, { listId, username }); Type guard
function supportsNativeClick(page) {
return page !== null && typeof page === 'object' && typeof page.nativeClick === 'function';
} Try / catch
try {
await listRemoveUser(page, { listId, username });
} catch (e) {
if (e instanceof CommandExecutionError && e.message.includes('nativeClick')) {
throw new Error('Upgrade the Chrome extension and reload the browser, then retry.');
} else throw e;
} Prevention
- Keep the companion Chrome extension on its latest version.
- Reload or restart the browser after extension updates.
- Only pass opencli strategy pages (not raw Puppeteer/Playwright pages) to commands needing native interaction.
- Feature-detect page.nativeClick at startup and fail fast with a clear message.
When it happens
Trigger: Running listRemoveUser against a browser adapter that lacks nativeClick — an outdated Chrome extension, a generic Puppeteer/Playwright page object instead of the opencli browser strategy, or an extension that was not reloaded after an update.
Common situations: User pinned an old version of the companion Chrome extension; extension updated in the store but the browser was not restarted/reloaded; using the library with a plain automation driver that never implemented nativeClick; mismatched versions of the CLI and the browser extension.
Related errors
- Unexpected 12306 probe: ${JSON.stringify(probe)}
- Waiting for 12306 tk auth cookie
- amazon.com
- Unexpected Amazon probe: ${JSON.stringify(probe)}
- amazon ${action} navigation lost the current browser target
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/a50aa9f090b9619d.
Report an issue: GitHub.