jackwener/OpenCLI · error · Error
Instagram follow returned no success evidence
Error message
Instagram follow returned no success evidence
What it means
After successfully parsing the response JSON from /api/v1/friendships/create/, the CLI validates that the payload proves the follow succeeded: it must be an object with status === 'ok', a friendship_status object. If the JSON parses but lacks that shape (e.g. status 'fail' with a message field), this error is thrown. It indicates Instagram rejected or did not confirm the follow despite returning HTTP 200.
Source
Thrown at clis/instagram/follow.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/create/' + 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 follow: HTTP ' + r2.status);
let d2;
try {
d2 = await r2.json();
} catch {
throw new Error('Instagram follow returned invalid JSON');
}
if (!d2 || typeof d2 !== 'object' || d2.status !== 'ok' || !d2.friendship_status || typeof d2.friendship_status !== 'object') {
throw new Error('Instagram follow returned no success evidence');
}
const status = d2.friendship_status.following ? 'Following' : d2.friendship_status.outgoing_request ? 'Request sent' : '';
if (!status) throw new Error('Instagram follow returned no success evidence');
return [{ status, username }];
})()
` },
],
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Read the response's message/status fields (log d2 in a wrapper) to see Instagram's stated reason (rate limit, action block).
- Wait and retry later if the account is action-blocked; follow limits reset over time.
- Re-login to refresh session/cookies if Instagram is returning degraded responses.
- Check the friendship status separately (GET /api/v1/friendships/show/<id>/) to see if the follow actually took effect.
Example fix
// before
const res = await cli.follow(username);
// after
try {
const res = await cli.follow(username);
} catch (e) {
if (String(e.message).includes('no success evidence')) {
// inspect raw API response / check action block before retrying
}
} Defensive patterns
Strategy: type-guard
Type guard
function isFollowSuccess(d) {
return !!d && typeof d === 'object' && d.status === 'ok' &&
!!d.friendship_status && typeof d.friendship_status === 'object' &&
(d.friendship_status.following === true || d.friendship_status.outgoing_request === true);
}
// usage: if (!isFollowSuccess(d2)) { /* surface d2.message before retrying */ } Try / catch
try {
const res = await followUser(username);
} catch (e) {
if (String(e.message).includes('no success evidence')) {
// check action-block: inspect raw API message, back off before retry
} else throw e;
} Prevention
- Respect follow-rate limits; space out write actions to avoid action blocks.
- Capture and log the full response envelope (status/message) for diagnosis.
- Verify friendship state independently via friendships/show after failures.
- Handle private accounts: expect outgoing_request semantics.
When it happens
Trigger: POST to friendships/create returns JSON that is not an object, has status !== 'ok', or omits/mistypes friendship_status — e.g. {status:'fail', message:'Please wait a few minutes...'} from rate limiting or an action block.
Common situations: Account hit action-block/temporary follow limit; private account where the request silently didn't register; Instagram API contract changed and renamed friendship_status; response is a spammed-likes/bot-detection error envelope.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Instagram followers returned malformed users payload
- Bilibili creator comparison API returned a malformed envelop
- Bilibili creator comparison API returned malformed list data
- Instagram did not keep the ${shouldLike ? 'like' : 'unlike'}
- ${label} failed: HTTP ${response.status}
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/6482285ebda33967.
Report an issue: GitHub.