jackwener/OpenCLI · warning · EmptyResultError

No Yuanbao conversations found in the sidebar. Either the ac

Error message

No Yuanbao conversations found in the sidebar. Either the account is logged out, the sidebar is collapsed, or the user truly has no chat history yet.

What it means

The history command scraped the conversation sidebar and found zero rendered items. The library throws EmptyResultError distinguishing 'nothing to show' from a hard failure, listing the three plausible causes: logged-out session, collapsed sidebar, or genuinely empty account.

Source

Thrown at clis/yuanbao/history.js:38

    siteSession: 'persistent',
    navigateBefore: false,
    args: [
        { name: 'limit', type: 'int', default: 20, help: 'Max conversations to list (sidebar virtual scroll caps actual count)' },
    ],
    columns: ['Index', 'Title', 'AgentId', 'SessionId', 'Url'],
    func: async (page, kwargs) => {
        const limit = Number(kwargs.limit ?? 20);
        if (!Number.isInteger(limit) || limit <= 0) {
            throw new ArgumentError('limit', 'must be a positive integer');
        }
        await ensureYuanbaoPage(page);
        if (await hasLoginGate(page)) {
            throw authRequired('Yuanbao opened a login gate when reading the sidebar.');
        }
        await page.wait(1.5);
        const sessions = await getYuanbaoSessionList(page, limit);
        if (!sessions.length) {
            throw new EmptyResultError(
                'yuanbao history',
                'No Yuanbao conversations found in the sidebar. Either the account is logged out, the sidebar is collapsed, or the user truly has no chat history yet.',
            );
        }
        return sessions.map((s, i) => ({
            Index: i + 1,
            Title: s.title || '(untitled)',
            AgentId: s.agentId,
            SessionId: s.cid,
            Url: `${YUANBAO_URL}chat/${s.agentId}/${s.cid}`,
        }));
    },
});

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Open Yuanbao in a browser, verify you are logged in and the sidebar shows conversations, then rerun
  2. Re-run with a longer warm-up or reopen the page (ensureYuanbaoPage) to let the sidebar finish rendering
  3. Confirm the account actually has chat history; if brand new, this error is expected
  4. Check whether the sidebar is collapsed in the automation browser profile and expand it
Defensive patterns

Strategy: fallback

Validate before calling

// cannot pre-validate; but you can check login state first
if (!(await isLoggedIn(page))) await runLoginFlow(page);

Type guard

const hasSessions = (r) => Array.isArray(r) && r.length > 0;

Try / catch

try {
  const sessions = await cli.yuanbaoHistory({ limit: 20 });
} catch (e) {
  if (e.name === 'EmptyResultError') {
    console.warn('No Yuanbao conversations; account may be empty or logged out');
    return [];
  }
  throw e;
}

Prevention

When it happens

Trigger: `yuanbao history` executes, the login gate check passes, getYuanbaoSessionList returns an empty array after 1.5s wait — sidebar DOM (.yb-recent-conv-list__item) has no visible items.

Common situations: Expired Yuanbao session cookies that do not trip the explicit login gate; a fresh account with no chats; narrow browser viewport collapsing the sidebar; slow page load where the 1.5s static wait outpaces the sidebar render.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


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