garrytan/gstack · error · Error
Usage: browse attrs <selector>
Error message
Usage: browse attrs <selector>
What it means
Error "Usage: browse attrs <selector>" thrown in garrytan/gstack.
Source
Thrown at browse/src/read-commands.ts:349
(el, prop) => getComputedStyle(el).getPropertyValue(prop),
property
);
return value;
}
const value = await target.evaluate(
([sel, prop]) => {
const el = document.querySelector(sel);
if (!el) return `Element not found: ${sel}`;
return getComputedStyle(el).getPropertyValue(prop);
},
[resolved.selector, property]
);
return value;
}
case 'attrs': {
const selector = args[0];
if (!selector) throw new Error('Usage: browse attrs <selector>');
const resolved = await session.resolveRef(selector);
if ('locator' in resolved) {
const attrs = await resolved.locator.evaluate((el) => {
const result: Record<string, string> = {};
for (const attr of el.attributes) {
result[attr.name] = attr.value;
}
return result;
});
return JSON.stringify(attrs, null, 2);
}
const attrs = await target.evaluate((sel: string) => {
const el = document.querySelector(sel);
if (!el) return `Element not found: ${sel}`;
const result: Record<string, string> = {};
for (const attr of el.attributes) {
result[attr.name] = attr.value;
}View on GitHub (pinned to 94993f7401)
When it happens
Trigger: Thrown at browse/src/read-commands.ts:349 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of garrytan/gstack@94993f7401 (2026-08-12).
Data as JSON: /api/errors/62bcee9569e8a782.
Report an issue: GitHub.