jackwener/OpenCLI · error · EmptyResultError
'gemini read','No Gemini conversation links were visible in
Error message
'gemini read','No Gemini conversation links were visible in the sidebar. Open the sidebar and confirm at least one chat is listed under Recents.'
What it means
After validating limit, gemini history reads the sidebar conversation list; if it is empty the command throws EmptyResultError stating no conversation links were visible and suggesting the sidebar/Recents be checked. The library throws instead of returning an empty table so a UI render problem is not mistaken for 'no history'.
Source
Thrown at clis/gemini/history.js:50
description: 'List visible Gemini web conversation history from the sidebar',
domain: GEMINI_DOMAIN,
strategy: Strategy.COOKIE,
browser: true,
siteSession: 'persistent',
navigateBefore: false,
args: [
{ name: 'limit', type: 'int', default: 20, help: 'Max conversations to show' },
],
columns: ['Index', 'Id', 'Title', 'Url'],
func: async (page, kwargs) => {
const rawLimit = Number(kwargs?.limit ?? 20);
if (!Number.isInteger(rawLimit) || rawLimit < 1 || rawLimit > 200) {
throw new ArgumentError('limit', 'must be a positive integer ≤ 200');
}
await ensureGeminiPage(page);
const conversations = await getGeminiConversationList(page);
if (!conversations.length) {
throw new EmptyResultError(
'gemini history',
'No Gemini conversation links were visible in the sidebar. Open the sidebar and confirm at least one chat is listed under Recents.',
);
}
// The sidebar mixes a "New chat" affordance (URL = /app, no id) into
// the same link list; drop entries that don't resolve to a real
// conversation id so callers get a clean conversation list.
const rows = conversations
.map((row) => ({ id: extractGeminiId(row.Url), title: row.Title || '', url: row.Url || '' }))
.filter((row) => row.id);
return rows.slice(0, rawLimit).map((row, idx) => ({
Index: idx + 1,
Id: row.id,
Title: row.title,
Url: row.url,
}));
},
});View on GitHub (pinned to 49907e53dc)
Solutions
- Open Gemini in the browser and confirm at least one chat appears under Recents, then retry
- Start a first conversation in Gemini so the sidebar has an entry, then run history again
- Re-authenticate if the page is not signed in (ensureGeminiPage should surface this, but verify)
- Retry after a short wait if the sidebar was still loading
Example fix
// before opencli gemini history // fresh account, sidebar empty // after # create at least one Gemini chat first, then: opencli gemini history
Defensive patterns
Strategy: try-catch
Validate before calling
const convos = await run(['gemini','history','--limit','1']);
if (!convos.length) console.warn('No sidebar chats visible; create a Gemini conversation first'); Type guard
function hasConversations(list){ return Array.isArray(list) && list.length > 0; } Try / catch
try {
return await run(['gemini','history']);
} catch (e) {
if (String(e.message).includes('No Gemini conversation links were visible')) {
console.error('Sidebar empty: sign in and/or create at least one Gemini chat, then retry.');
return [];
}
throw e;
} Prevention
- Ensure the account has at least one prior Gemini conversation
- Verify sign-in state before scraping history
- Retry after a short wait if the sidebar was still loading
When it happens
Trigger: Calling `opencli gemini history` when the Gemini sidebar shows no chats: brand-new account with zero conversations, sidebar collapsed/not loaded in time, signed-out state, or a Gemini UI change hiding Recents at scrape time.
Common situations: Freshly created Google account; incognito browser profile without prior chats; slow page load where Recents render after the extraction; temporary Gemini outage or A/B UI variant.
Related errors
- No turns were visible after navigating to ${target}.
- No prices returned for train_no=${trainNo} ${fromStation.nam
- No 12306 stations match "${keyword}"
- No posts found in this Band
- chatgpt history
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/2730c8605a76e95d.
Report an issue: GitHub.