jackwener/OpenCLI · error
Instagram unfollow returned no success evidence
Error message
Instagram unfollow returned no success evidence
What it means
The Instagram unfollow API responded 200 but its JSON body did not contain status:'ok', so the CLI cannot verify the unfollow actually happened. Instagram's web endpoints signal success only via status:'ok'; anything else (fail_status, empty body, HTML) is treated as failure. The CLI refuses to report 'Unfollowed' without that evidence.
Source
Thrown at clis/instagram/unfollow.js:41
const opts = { credentials: 'include', headers };
${buildResolveInstagramUserIdJs()}
const csrf = document.cookie.match(/csrftoken=([^;]+)/)?.[1] || '';
const r2 = await fetch('https://www.instagram.com/api/v1/friendships/destroy/' + userId + '/', {
method: 'POST',
credentials: 'include',
headers: { ...headers, 'X-CSRFToken': csrf, 'Content-Type': 'application/x-www-form-urlencoded' },
});
if (!r2.ok) throw new Error('Failed to unfollow: HTTP ' + r2.status);
let d2;
try {
d2 = await r2.json();
} catch {
throw new Error('Instagram unfollow returned invalid JSON');
}
if (!d2 || typeof d2 !== 'object' || d2.status !== 'ok') {
throw new Error('Instagram unfollow returned no success evidence');
}
return [{ status: 'Unfollowed', username }];
})()
` },
],
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Re-authenticate: log into Instagram in the browser session the CLI uses and refresh cookies (especially sessionid and csrftoken).
- Verify the username exists and you actually follow it before unfollowing.
- Wait and retry later — Instagram rate-limits bulk unfollow actions.
- Run with fewer actions per session to avoid automation throttling.
Example fix
// before
await api.unfollow('someuser');
// after
try {
await api.unfollow('someuser');
} catch (e) {
if (e.message.includes('no success evidence')) {
await refreshInstagramSession(); // re-login, then retry once
await api.unfollow('someuser');
} else throw e;
} Defensive patterns
Strategy: try-catch
Validate before calling
const followed = await checkFriendship(username);
if (!followed) return skip('already unfollowed'); Type guard
const unfollowOk = (d) => !!d && typeof d === 'object' && d.status === 'ok';
Try / catch
try {
await cli.unfollow(username);
} catch (e) {
if (e.message.includes('no success evidence')) {
await refreshSession();
await cli.unfollow(username);
} else throw e;
} Prevention
- Refresh session cookies before batch unfollow runs
- Check friendship status before unfollowing
- Throttle unfollow actions to avoid soft bans
When it happens
Trigger: POST to /api/v1/friendships/destroy/{userId} returns JSON lacking status:'ok' — e.g. rate limiting, login cookie expired, or the target user was already unfollowed/blocked.
Common situations: Stale session cookies after Instagram logs the user out elsewhere; unfollowing a user already unfollowed; Instagram soft-banning automated unfollow bursts; privacy changes where the friendship row never existed.
Related errors
- HTTP ' + res.status + ' - make sure you are logged in to Ins
- Failed to fetch followers: HTTP ' + r2.status
- ' + label + ' returned no success evidence
- Failed to unsave: HTTP ' + r2.status
- HTTP ' + r2.status + ' - make sure you are logged in to Inst
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/3f63b291d309c827.
Report an issue: GitHub.