jackwener/OpenCLI · warning · EmptyResultError
No items in tab '${tabLabel}'.
Error message
No items in tab '${tabLabel}'. What it means
After switching to the requested automation tab and scraping rows from the page, the command throws EmptyResultError when zero items are found (after applying the limit slice). The library treats 'no rows' as an error so callers can distinguish an empty tab from a successful listing.
Source
Thrown at clis/trae-solo/automation.js:93
const t = (el.innerText || '').replace(/\\s+/g, ' ').trim();
if (!t || t.length < 3 || seen.has(t)) continue;
// Filter UI chrome (tabs / heading / 'Create manually' / etc.)
if (/^(Configured|Run History|Task Template|Create manually|Create in chat|Automation|Create from a template)$/.test(t)) continue;
seen.add(t);
const lines = t.split('\\n');
out.push({ title: lines[0].slice(0, 60), summary: (lines.slice(1).join(' ') || '').slice(0, 120) });
}
// If nothing matched, fall back to a quick text dump of the main panel.
if (!out.length) {
const fallback = (main.innerText || '').trim();
if (fallback) out.push({ title: '(empty)', summary: fallback.slice(0, 300) });
}
return out;
})()`);
const limit = Number.isInteger(kwargs.limit) && kwargs.limit > 0 ? kwargs.limit : 50;
const rows = (items || []).slice(0, limit);
if (!rows.length) {
throw new EmptyResultError('trae-solo automation-list', `No items in tab '${tabLabel}'.`);
}
return rows.map((r, i) => ({ Index: i + 1, Title: r.title, Summary: r.summary }));
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Verify the tab actually has items by opening Trae SOLO and looking at it manually
- Switch to a different tab (e.g. 'configured') that you know has entries
- Ensure the Trae SOLO window is fully loaded/on the automation view before listing
- If items are visible but the scrape returns nothing, the DOM selectors may be stale — update the library or file an issue
Example fix
// before
const items = await traeSoloCli.automationList({ tab: 'run-history' }); // throws when empty
// after
let items;
try {
items = await traeSoloCli.automationList({ tab: 'run-history' });
} catch (e) {
if (e.name === 'EmptyResultError') items = [];
else throw e;
} Defensive patterns
Strategy: try-catch
Try / catch
try {
rows = await traeSoloCli.automationList({ tab });
} catch (e) {
if (e instanceof EmptyResultError) rows = [];
else throw e;
} Prevention
- Treat EmptyResultError as 'no data', not a crash — handle it explicitly
- Confirm the tab has content in the Trae SOLO UI when results should exist
- Keep the Trae SOLO window loaded/on-screen before scraping
- If visible items return empty results, suspect stale DOM selectors and update the library
When it happens
Trigger: Listing automation tasks in a tab that genuinely has no entries, or where the page's DOM containers (.task-list-base-content / main) rendered nothing recognizable as rows.
Common situations: New Trae SOLO install with no configured/run-history/task-template entries; wrong tab chosen (e.g. run-history before ever running a task); UI language or version change broke the DOM selectors so rows are invisible to the scraper; list not yet loaded when scraping ran.
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
- No Codex projects matched "${kwargs.project}". / No Codex pr
- Model dropdown opened but no options detected.
- qoder history
- No projects matched "${kwargs.project}". Try without --proje
- Mode toggle did not reach requested state "${want}".
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/09412a3b2117452a.
Report an issue: GitHub.