jackwener/OpenCLI · warning · EmptyResultError
No keys match "${flt}".
Error message
No keys match "${flt}". What it means
EmptyResultError from the trae-solo `storage-keys` command when, after enumerating all keys in the chosen Web Storage area, the optional lowercase substring `filter` matches zero keys. The library throws it instead of returning an empty table so callers can distinguish 'no match' from success.
Source
Thrown at clis/trae-solo/renderer-storage.js:59
{ name: 'limit', type: 'int', required: false, default: 100, help: 'Max rows to return' },
],
columns: ['Index', 'Key', 'Bytes', 'Name', 'Preview', 'Database', 'Version'],
func: async (page, kwargs) => {
const store = pickStore(kwargs);
const raw = await page.evaluate(`(() => {
const s = ${store};
const out = [];
for (let i = 0; i < s.length; i++) {
const k = s.key(i);
const v = s.getItem(k) || '';
out.push({ k, bytes: v.length });
}
return out;
})()`);
const flt = kwargs?.filter ? String(kwargs.filter).toLowerCase() : null;
const filtered = flt ? raw.filter((r) => r.k.toLowerCase().includes(flt)) : raw;
if (!filtered.length) {
throw new EmptyResultError('trae-solo storage-keys', flt ? `No keys match "${flt}".` : `${store} is empty.`);
}
filtered.sort((a, b) => a.k.localeCompare(b.k));
const limit = Number.isInteger(kwargs?.limit) && kwargs.limit > 0 ? kwargs.limit : 100;
return filtered.slice(0, limit).map((r, i) => ({
Index: i + 1,
Key: r.k,
Bytes: r.bytes,
Name: '',
Preview: '',
Database: '',
Version: '',
}));
},
});
// -------- storage-get --------
cli({
site: 'trae-solo',View on GitHub (pinned to 49907e53dc)
Solutions
- Drop the `filter` kwarg to list all keys, then search the output manually.
- Try a shorter or alternative substring (e.g. 'auth', 'user', the app's prefix).
- Switch `storage` to 'session' in case the key lives in sessionStorage.
- Confirm the Trae page state — log in / trigger the feature that writes the key before enumerating.
Example fix
// before
await cli('trae-solo', 'storage-keys', { filter: 'jwt' });
// after
const keys = await cli('trae-solo', 'storage-keys', {}); // no filter
console.log(keys.map(k => k.Key)); // pick the real name, then filter Defensive patterns
Strategy: fallback
Validate before calling
const all = await cli('trae-solo', 'storage-keys', {});
const matches = all.filter(k => k.Key.toLowerCase().includes(flt));
if (!matches.length) console.warn(`No key contains '${flt}'. All keys:`, all.map(k => k.Key)); Type guard
const hasKeyMatching = (rows, flt) => Array.isArray(rows) && rows.some(r => typeof r.Key === 'string' && r.Key.toLowerCase().includes(flt.toLowerCase()));
Try / catch
try {
rows = await cli('trae-solo', 'storage-keys', { filter: flt });
} catch (e) {
if (/No keys match/.test(e.message)) {
rows = await cli('trae-solo', 'storage-keys', {}); // unfiltered fallback
} else throw e;
} Prevention
- List all keys unfiltered first, then pick the substring from real output.
- Try progressively shorter filter substrings.
- Check both storage areas (local and session).
- Confirm the app state (logged in, feature used) that writes the key.
When it happens
Trigger: Running storage-keys with a `filter` substring that no key in localStorage/sessionStorage contains (case-insensitive), e.g. filtering for 'token' when only 'theme' and 'lang' keys exist.
Common situations: Hunting for an auth/token key that the app stores under a different name; filtering in the wrong storage area (local vs session); keys were cleared by logout or a recent app update renamed them; filter substring typo.
Related errors
- antigravity storage-keys: No keys match "${flt}".
- antigravity state-keys: No keys match "${flt}".
- hf models
- storage
- is required
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/0b4d64985e9bad3b.
Report an issue: GitHub.