jackwener/OpenCLI · error · CommandExecutionError
${kind} button not visible
Error message
${kind} button not visible What it means
This error is thrown by the kimi chat like/dislike CLI command when the in-page script that locates the Like or Dislike SVG icon on the Kimi conversation page reports it could not find/click the button. The CLI wraps the failure reason in CommandExecutionError, falling back to the message '<kind> button not visible' when the page script returned no specific reason.
Source
Thrown at clis/kimi/chat.js:401
access: 'write',
description: 'Like or dislike the last assistant message. Pass --conv <id> to target a specific chat.',
domain: KIMI_DOMAIN,
strategy: Strategy.COOKIE,
browser: true,
siteSession: 'persistent',
navigateBefore: false,
args: [
{ name: 'kind', positional: true, required: true, help: 'like or dislike' },
{ name: 'conv', required: false, help: 'Chat id or URL' },
],
columns: CHAT_COLUMNS,
func: async (page, kwargs) => {
const kind = String(kwargs?.kind || '').trim().toLowerCase();
if (kind !== 'like' && kind !== 'dislike') throw new ArgumentError('kind', 'must be "like" or "dislike"');
await maybeNavigateConv(page, kwargs?.conv);
const svgName = kind === 'like' ? 'Like' : 'Dislike';
const res = await page.evaluate(clickBySvgNameScript(svgName));
if (!res?.ok) throw new CommandExecutionError(res?.reason || `${kind} button not visible`, '');
return [{ Status: 'clicked', Reaction: kind }];
},
});
// -------- share --------
cli({
site: 'kimi',
name: 'share',
access: 'write',
description: 'Click Share on the last assistant message (opens Kimi\'s share dialog). Pass --conv <id> to target a specific chat.',
domain: KIMI_DOMAIN,
strategy: Strategy.COOKIE,
browser: true,
siteSession: 'persistent',
navigateBefore: false,
args: [
{ name: 'conv', required: false, help: 'Chat id or URL' },
],View on GitHub (pinned to 49907e53dc)
Solutions
- Verify the conv id/URL points to a real conversation that contains at least one assistant reply so the Like/Dislike icons are rendered
- Wait for the page to fully load or retry the command once the conversation is visible
- Inspect the conversation DOM to confirm the SVG name is still 'Like'/'Dislike'; update the svgName in clickBySvgNameScript if Kimi renamed them
- Read res.reason from the error detail for the page's own explanation (e.g. 'svg not found') and act on it
Example fix
// before
await maybeNavigateConv(page, kwargs?.conv);
const res = await page.evaluate(clickBySvgNameScript(svgName));
// after
await maybeNavigateConv(page, kwargs?.conv);
await page.wait(2); // let conversation UI render
const res = await page.evaluate(clickBySvgNameScript(svgName));
if (!res?.ok && /svg not found/i.test(res?.reason || '')) {
// retry after UI settles or open a bug that the SVG name changed
} Defensive patterns
Strategy: try-catch
Validate before calling
// ensure conversation has assistant replies before clicking
const turns = await kimi(['chat', 'read']);
if (!turns.some(t => t.Role === 'Assistant')) throw new Error('no assistant reply to react to'); Type guard
const isClickResult = (r) => !!r && typeof r === 'object' && typeof r.ok === 'boolean';
Try / catch
try {
await kimi(['chat', 'like', '--kind', 'like']);
} catch (e) {
if (/button not visible/.test(e.message)) {
await page.wait(2);
await kimi(['chat', 'like', '--kind', 'like']); // one retry after render
} else throw e;
} Prevention
- Only react on conversations that already contain an assistant reply
- Wait for page load before clicking SVG icons
- Pin/verify SVG names after Kimi UI updates
- Log res.reason to distinguish missing element from click failure
When it happens
Trigger: Calling `kimi chat like --kind like` (or dislike) after `maybeNavigateConv` when the current conversation page does not render the Like/Dislike SVG (clickBySvgNameScript returns ok:false), e.g. wrong conversation id/URL, the reaction buttons only appear after an assistant reply, or Kimi changed the SVG name.
Common situations: Navigating to a conversation with no assistant message yet (reaction icons not rendered), using an outdated selector name after a Kimi UI update, landing on the home page instead of a conversation because the conv argument was wrong, or the page not finished loading when the script runs.
Related errors
- Share button not visible
- Could not switch to ${wantModel} model
- Claude composer is not available on the current page.
- Codex sidebar extraction returned an invalid payload.
- Could not resolve a stable Codex conversation identity.
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/24c6478527e7548d.
Report an issue: GitHub.