jackwener/OpenCLI · error · CommandExecutionError
subscribed failed: ${result.detail}
Error message
subscribed failed: ${result.detail} What it means
When the browser-side script throws, it returns {kind:'exception', detail}; subscribed.js rethrows it as CommandExecutionError(`subscribed failed: ${result.detail}`). This wraps any in-page JavaScript exception (failed fetch, DOM API missing, script error) that occurred while scraping the subscribed list. It is a catch-all converting page exceptions into a typed CLI error.
Source
Thrown at clis/reddit/subscribed.js:154
} catch (e) {
return { kind: 'exception', detail: String(e && e.message || e) };
}
})()`));
if (result?.kind === 'login-wall') {
// Convert the browser-side sentinel into a typed LoginWallError on the Node side.
throwIfLoginWall(result.sentinel, { url: result.where });
}
if (result?.kind === 'auth') {
throw new AuthRequiredError('reddit.com', result.detail);
}
if (result?.kind === 'http') {
throw new CommandExecutionError(`HTTP ${result.httpStatus} from ${result.where}`);
}
if (result?.kind === 'malformed') {
throw new CommandExecutionError(result.detail);
}
if (result?.kind === 'exception') {
throw new CommandExecutionError(`subscribed failed: ${result.detail}`);
}
if (result?.kind !== 'ok' || !Array.isArray(result.entries)) {
throw new CommandExecutionError(`Unexpected result from reddit subscribed: ${JSON.stringify(result)}`);
}
const rows = result.entries.slice(0, limit).map((entry, index) => mapSubredditRow(entry, index));
if (rows.length === 0) {
throw new EmptyResultError('Reddit returned no subscribed subreddits for the logged-in account.');
}
return rows;
}
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Read `detail` in the message to identify the underlying in-page exception.
- Reload reddit.com in the attached browser and retry — transient fetch/network failures are the most common cause.
- If detail indicates missing fields/selectors, update the CLI or its scraper to match current Reddit markup.
- Verify network connectivity and that the browser tab stays on reddit.com for the duration of the command.
Defensive patterns
Strategy: try-catch
Try / catch
try {
await run(['reddit', 'subscribed']);
} catch (e) {
if (e.message.startsWith('subscribed failed:')) {
const detail = e.message.slice('subscribed failed:'.length);
log.error('in-page exception', detail); // then retry or report
} else throw e;
} Prevention
- Keep the browser tab on reddit.com for the whole command duration
- Keep CLI and scraper code updated against Reddit markup changes
- Check network connectivity before batch runs
- Disable interfering extensions in the automation profile
When it happens
Trigger: page.evaluate script throws inside reddit.com: fetch rejection (network error), JSON.parse on unexpected body, DOM selectors absent because Reddit's markup changed.
Common situations: Browser offline or proxy failure during fetch; Reddit DOM/API changes breaking the injected scraper; extensions interfering with page scripts; navigation interrupted mid-evaluate.
Related errors
- LinkedIn whoami failed: ${result.detail}
- LinkedIn people search extraction failed: ${error?.message |
- Maimai whoami failed: ${probe.detail}
- Pixiv whoami failed: ${probe.detail}
- reddit.com
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/18ac55a0ae50bdd5.
Report an issue: GitHub.