jackwener/OpenCLI · warning · EmptyResultError
No Close svg visible — no banner to dismiss?
Error message
No Close svg visible — no banner to dismiss?
What it means
The kimi dismiss-banner command clicks the first visible SVG named 'Close' to dismiss a sidebar banner. If no Close svg is visible, clickBySvgNameScript returns {ok:false} and the command throws EmptyResultError with the explanatory message 'No Close svg visible — no banner to dismiss?'. This is a soft/informational failure: it usually just means there is nothing to dismiss.
Source
Thrown at clis/kimi/audit-extras.js:122
// -------- dismiss-banner --------
cli({
site: 'kimi',
name: 'dismiss-banner',
access: 'write',
description: 'Close any visible sidebar banner (e.g., "Make a Review & Earn Credit", "获取应用程序") by clicking its Close svg.',
domain: KIMI_DOMAIN,
strategy: Strategy.COOKIE,
browser: true,
siteSession: 'persistent',
navigateBefore: false,
args: [],
columns: AUDIT_EXTRA_COLUMNS,
func: async (page) => {
await ensureOnKimi(page);
const res = await page.evaluate(clickBySvgNameScript('Close', { last: false }));
if (!res?.ok) {
throw new EmptyResultError('kimi dismiss-banner', 'No Close svg visible — no banner to dismiss?');
}
return [{ Status: 'dismissed' }];
},
});
// -------- templates --------
cli({
site: 'kimi',
name: 'templates',
access: 'read',
description: 'List template cards visible on a Kimi mode page (PPT/docs/deep-research/agent). Each mode shows curated example projects organized by category. Pass --mode to navigate first.',
domain: KIMI_DOMAIN,
strategy: Strategy.COOKIE,
browser: true,
siteSession: 'persistent',
navigateBefore: false,
args: [
{ name: 'mode', required: false, help: 'Navigate to mode first: ppt|docs|deep-research|agent|websites|sheets|agent-swarm|code' },View on GitHub (pinned to 49907e53dc)
Solutions
- Treat as benign: if no banner is present the goal is already achieved — catch EmptyResultError and continue
- Retry once after a short wait in case the banner mounts late
- Check in the browser whether a banner is actually visible; if yes but the svg name differs, update the clickBySvgNameScript target
- Make the command idempotent in your script: skip dismiss-banner when a previous run already reported 'dismissed'
Example fix
// before
await runCli('kimi dismiss-banner');
// after
try { await runCli('kimi dismiss-banner'); } catch (e) { if (e.name === 'EmptyResultError') console.log('No banner — nothing to do'); else throw e; } Defensive patterns
Strategy: try-catch
Validate before calling
const hasClose = await page.evaluate(`!!document.querySelector("svg[name='Close']")`);
if (!hasClose) return { skipped: true, reason: 'no banner present' }; Type guard
function isClickResult(res) { return res != null && typeof res === 'object' && typeof res.ok === 'boolean'; } Try / catch
try {
await runCli('kimi dismiss-banner');
} catch (e) {
if (e.name === 'EmptyResultError' || /no banner/i.test(e.message)) return; // nothing to dismiss = success
throw e;
} Prevention
- Treat dismiss-banner as best-effort/idempotent in automation
- Track previously dismissed banners to skip redundant calls
- Retry once after a wait if the banner mounts late
- Verify the Close svg name still matches after Kimi UI changes
When it happens
Trigger: Running `kimi dismiss-banner` when no banner is currently shown: the banner was already dismissed (possibly persisted per-account), no promotional banner exists for this account, the banner renders after the evaluate runs, or Kimi changed the Close svg name.
Common situations: Calling dismiss-banner as part of a cleanup script on a fresh account with no banner; re-running after a previous successful dismissal; slow hydration so the banner svg hasn't mounted yet.
Related errors
- Waiting for 12306 tk auth cookie
- ChatGPT composer is not available on the current page.
- Could not find the ChatGPT model selector in the composer.
- Could not click the ChatGPT ${target.label} model option.
- Could not find the ChatGPT tools menu button in the composer
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/3f6ae7c5c18c1de8.
Report an issue: GitHub.