jackwener/OpenCLI · warning · TimeoutError
twitter unblock confirmation
Error message
twitter unblock confirmation
What it means
TimeoutError (code TIMEOUT) with label 'twitter unblock confirmation' and a 1-second window. The in-page write script sets writeStarted when it clicks the unblock control, but the confirmation state was not observed before the script finished, so the library cannot confirm success and throws with a hint to verify the profile manually. The message surfaces the underlying page error (`result.message`) plus a warning that the unblock may already have succeeded.
Source
Thrown at clis/twitter/unblock.js:78
return { ok: false, message: 'Unblock confirmation dialog did not appear.' };
}
writeStarted = true;
confirmBtn.click();
await new Promise(r => setTimeout(r, 1000));
// Verify
const verify = getPrimary()?.querySelector('[data-testid$="-follow"]');
if (verify) {
return { ok: true, message: 'Successfully unblocked @${username}.' };
} else {
return { ok: false, unconfirmed: true, message: 'Unblock action initiated but UI did not update.' };
}
} catch (e) {
return { ok: false, unconfirmed: writeStarted, message: e.toString() };
}
})()`);
if (result.unconfirmed) {
throw new TimeoutError('twitter unblock confirmation', 1, `${result.message} Check the profile before retrying; the unblock may already have succeeded.`);
}
if (!result.ok) {
throw new CommandExecutionError(result.message, 'Nothing changed. Open the profile in the browser and retry.');
}
await page.wait(2);
return [{
status: 'success',
message: result.message
}];
}
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Open the profile at https://x.com/<username> and visually check whether the unblock already took effect before retrying (the hint says retrying blindly may double-fire)
- Retry the command on a faster/stabler connection once the page loads fully before invoking
- If it consistently fails, suspect an X UI/markup change — update or report the library
Example fix
// before
await cli.run(['twitter', 'unblock', 'user']);
// after
try {
await cli.run(['twitter', 'unblock', 'user']);
} catch (e) {
if (e.code === 'TIMEOUT') console.warn('Unconfirmed — verify the profile manually before retrying');
} Defensive patterns
Strategy: try-catch
Validate before calling
// preflight: ensure the profile page loads and you are logged in
await page.goto(`https://x.com/${username}`);
if (await page.$('[data-testid="SideNav_AccountSwitcher_Button"]') === null) {
throw new Error('Not logged in to x.com — log in before unblock');
} Type guard
function isTimeoutError(e) { return e && e.code === 'TIMEOUT'; } Try / catch
try {
await cli.run(['twitter', 'unblock', user]);
} catch (e) {
if (e.code === 'TIMEOUT' && /unblock confirmation/.test(e.message)) {
// DO NOT auto-retry: the write may have landed. Verify manually.
console.warn('Unconfirmed — check the profile before retrying');
} else throw e;
} Prevention
- Never blind-retry after an unconfirmed write — verify the profile first
- Run write commands on a stable connection with the page fully loaded
- Keep the library updated since X markup changes break confirmation detection
- Avoid invoking writes while other tabs/scripts hold the same session busy
When it happens
Trigger: During `twitter unblock`, the evaluate()'d script clicked the unblock button (writeStarted=true) but the post-click confirmation (button state change / UI reflecting 'unblocked') was not detected within the 1s confirmation window, typically because an in-page exception fired after the click.
Common situations: Slow X page rendering or laggy network right after the click; an overlay/toast intercepting the confirmation selector; X markup change for the confirmation state; page threw mid-script (e.g. navigation or detached node) after the click landed.
Related errors
- twitter unbookmark confirmation
- twitter unfollow confirmation
- twitter retweet confirmation
- Unexpected 12306 probe: ${JSON.stringify(probe)}
- twitter follow confirmation
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/bab95764f0557879.
Report an issue: GitHub.