jackwener/OpenCLI · error · CommandExecutionError
Nothing changed. Open the tweet in the browser and retry.
Error message
Nothing changed. Open the tweet in the browser and retry.
What it means
CommandExecutionError raised when the retweet script completed but reported ok:false — the operation failed cleanly with no side effects. The library passes the underlying script's message as the error message and appends the hint that nothing changed and the user should retry in the browser if needed.
Source
Thrown at clis/twitter/retweet.js:91
await new Promise(r => setTimeout(r, 1000));
// Verify success by checking if the 'unretweet' button appeared
const verifyArticle = findTargetArticle() || targetArticle;
const verifyBtn = verifyArticle?.querySelector('[data-testid="unretweet"]');
if (verifyBtn) {
return { ok: true, message: 'Tweet successfully retweeted.' };
} else {
return { ok: false, unconfirmed: true, message: 'Retweet action was initiated but UI did not update as expected.' };
}
} catch (e) {
return { ok: false, unconfirmed: writeStarted, message: e.toString() };
}
})()`);
if (result.unconfirmed) {
throw new TimeoutError('twitter retweet confirmation', 1, `${result.message} Check the tweet before retrying; the retweet may already have succeeded.`);
}
if (!result.ok) {
throw new CommandExecutionError(result.message, 'Nothing changed. Open the tweet in the browser and retry.');
}
await page.wait(2);
return [{
status: 'success',
message: result.message
}];
}
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Read the underlying result.message for the root cause
- Open the tweet in a browser and retry the retweet manually to confirm it is retweetable
- Re-authenticate (refresh cookies / opencli login) if logged out
- Verify the tweet exists and your account is allowed to retweet it
Example fix
// before await opencli.twitter.retweet(badUrl); // after const parsed = parseTweetUrl(url); // validate first if (parsed) await opencli.twitter.retweet(url);
Defensive patterns
Strategy: try-catch
Validate before calling
const parsed = parseTweetUrl(url); // throws ArgumentError early if malformed // check the tweet exists/reachable before retweeting
Type guard
function isCommandExecutionError(e) { return e && e.name === 'CommandExecutionError'; } Try / catch
try {
await opencli.twitter.retweet(url);
} catch (e) {
if (isCommandExecutionError(e)) {
console.error('Retweet failed, nothing changed:', e.message); // safe to retry after fixing cause
} else throw e;
} Prevention
- Validate the tweet URL and existence before invoking
- Confirm your account can retweet the target (not protected/deleted)
- Re-authenticate if the session lapsed
- Read result.message to identify the root cause before retrying
When it happens
Trigger: The in-page retweet script returns { ok:false } — e.g. the retweet button was not found, the click was rejected, or the confirmation step reported definitive failure (not a timeout).
Common situations: Tweet deleted or protected, account restricted from retweeting, not logged in so the retweet button is absent, or X API/DOM changes breaking the script flow.
Related errors
- Waiting for 12306 tk auth cookie
- twitter retweet confirmation
- 12306 tk auth cookie missing
- ${probe.detail}
- 12306 whoami failed: ${probe.detail}
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/48e153a58b63ff25.
Report an issue: GitHub.