jackwener/OpenCLI · warning

NO_DIALOG

NO_DIALOG

Error message

NO_DIALOG

What it means

After deciding the session is authenticated, collectHistory clicks the 'Show all / View all' history launcher and then polls for up to 30 attempts (250ms each) for a [role="listbox"] containing conversation links (a[href^="/c/"]). If no such dialog appears, it returns { ok:false, code:'NO_DIALOG' }: the history list UI never opened, so there is nothing to scrape.

Source

Thrown at clis/grok/export-all.js:94

        .filter((node) => node instanceof HTMLElement && isVisible(node));
      const target = buttons.find((node) => /^(查看全部|show all|view all)$/i.test((node.textContent || '').trim()));
      if (!target) return false;
      target.click();
      return true;
    };

    if (!document.querySelector('[role="listbox"] a[href^="/c/"]')) {
      clickAllHistory();
    }

    let listbox = null;
    for (let attempt = 0; attempt < 30; attempt += 1) {
      listbox = document.querySelector('[role="listbox"]');
      if (listbox && listbox.querySelector('a[href^="/c/"]')) break;
      await sleep(250);
    }
    if (!listbox || !listbox.querySelector('a[href^="/c/"]')) {
      return { ok: false, code: 'NO_DIALOG' };
    }

    const scroller = Array.from(listbox.querySelectorAll('*'))
      .find((node) => node.scrollHeight > node.clientHeight + 20) || listbox;
    const seen = new Map();
    const collect = () => {
      for (const a of Array.from(listbox.querySelectorAll('a[href^="/c/"]'))) {
        const href = a.getAttribute('href') || '';
        const match = href.match(/^\\/c\\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/i);
        if (!match) continue;
        const id = match[1].toLowerCase();
        const option = a.closest('[role="option"]') || a.parentElement;
        const lines = (option?.innerText || option?.textContent || a.textContent || '')
          .split(/\\n+/)
          .map((line) => line.trim())
          .filter(Boolean);
        seen.set(id, {
          id,

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Confirm the account actually has conversation history visible in the grok.com sidebar
  2. Re-run on a faster/stable connection, or retry — the dialog may just have loaded slower than 7.5s
  3. Dismiss any onboarding/cookie modals in the browser that could swallow the 'Show all' click, then retry
  4. If the UI changed (selector drift), update or report the selectors ('[role="listbox"]', 'a[href^="/c/"]', 'show all' labels)

Example fix

// before
// dialog never found; exports fail on new accounts
// after
guard: if (!hasAnyConversationLinks(document)) skip export instead of clicking 'show all'
Defensive patterns

Strategy: retry

Validate before calling

const hasHistory = await page.evaluate(() => Boolean(document.querySelector('a[href^="/c/"]')));
if (!hasHistory) console.warn('No visible conversations — export may return NO_DIALOG');

Try / catch

try {
  await grokExportAll();
} catch (e) {
  if (String(e.message).trim() === 'NO_DIALOG' || /NO_DIALOG/.test(e.code ?? e.message)) {
    console.error('History dialog never appeared — check the account has conversations and the UI has not changed; retry once.');
  } else throw e;
}

Prevention

When it happens

Trigger: The 'Show all' launcher was clicked but no listbox with conversation links appeared within ~7.5 seconds — slow page load, the button click silently failed because the UI changed, or the account genuinely has no conversation history despite passing the AUTH check.

Common situations: New accounts with zero conversations; very slow networks or heavy page JS delaying the dialog; grok.com UI redesign moving the history list out of a [role="listbox"]; popup/dialog blocked by page state such as an onboarding modal overlaying the launcher.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/5b099e7a910c3aa1. Report an issue: GitHub.