{"record":{"id":"95fa2ef551d8a38f","repo":"jackwener/OpenCLI","slug":"nothing-changed-open-the-profile-in-the-browser-a-95fa2e","errorCode":null,"errorMessage":"Nothing changed. Open the profile in the browser and retry.","messagePattern":"Nothing changed\\. Open the profile in the browser and retry\\.","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/twitter/unfollow.js","lineNumber":73,"sourceCode":"            confirmBtn.click();\n            await new Promise(r => setTimeout(r, 1000));\n\n            // Verify\n            const verify = document.querySelector('[data-testid$=\"-follow\"]');\n            if (verify) {\n                return { ok: true, message: 'Successfully unfollowed @${username}.' };\n            } else {\n                return { ok: false, unconfirmed: true, message: 'Unfollow action initiated but UI did not update.' };\n            }\n        } catch (e) {\n            return { ok: false, unconfirmed: writeStarted, message: e.toString() };\n        }\n    })()`);\n        if (result.unconfirmed) {\n            throw new TimeoutError('twitter unfollow confirmation', 1, `${result.message} Check the profile before retrying; the unfollow may already have succeeded.`);\n        }\n        if (!result.ok) {\n            throw new CommandExecutionError(result.message, 'Nothing changed. Open the profile in the browser and retry.');\n        }\n        await page.wait(2);\n        return [{\n                status: 'success',\n                message: result.message\n            }];\n    }\n});\n","sourceCodeStart":55,"sourceCodeEnd":82,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/twitter/unfollow.js#L55-L82","documentation":"CommandExecutionError (code COMMAND_EXEC) from `twitter unfollow` when the in-page script completed with ok:false and no pending write (unconfirmed=false): the unfollow definitively did not occur. The message is the page script's failure text and the hint 'Nothing changed. Open the profile in the browser and retry.' confirms state is untouched and retrying is safe.","triggerScenarios":"The evaluate()'d unfollow script threw before any click (writeStarted=false) — e.g. follow-state button not found on the profile — returning {ok:false, unconfirmed:false}, so CommandExecutionError wraps the script's message.","commonSituations":"You were not actually following the user so the 'Following' toggle is absent; X profile markup change breaking selectors; page rendered a login wall or error state; protected/suspended profile rendering a different layout.","solutions":["Read the underlying result.message in the error output to see which in-page step failed","Open https://x.com/<username> in the browser to confirm the profile loads, you are logged in, and you actually follow the account, then retry","If selectors consistently fail, suspect an X markup change — update or report the library"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// preflight: profile loads and the Following toggle exists\nawait page.goto(`https://x.com/${username}`);\nawait page.waitForSelector('[data-testid=\"primaryColumn\"]', { timeout: 10000 });\n// if the Following button is absent, you are not following this account","typeGuard":"function isCommandExecError(e) { return e && e.code === 'COMMAND_EXEC'; }","tryCatchPattern":"try {\n  await cli.run(['twitter', 'unfollow', user]);\n} catch (e) {\n  if (e.code === 'COMMAND_EXEC' && /Nothing changed/.test(e.hint || '')) {\n    // clean failure — safe to retry after fixing the cause\n    console.error(`Unfollow failed cleanly: ${e.message}`);\n  } else throw e;\n}","preventionTips":["Verify you actually follow the account — the toggle is absent otherwise","Inspect result.message to find which in-page step failed","Confirm logged-in browsing works on the profile page before scripting","Update the library when X changes profile markup; report persistent selector failures"],"tags":["twitter","command-execution","browser-write","selector"],"backgroundTag":"browser-write-failed","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}