jackwener/OpenCLI · error · CommandExecutionError

Unexpected Dribbble identity response: ${JSON.stringify(resu

Error message

Unexpected Dribbble identity response: ${JSON.stringify(result)}

What it means

A CommandExecutionError raised by verifyDribbbleIdentity when the in-page identity probe returns something other than ok:true or kind:'auth' — i.e. an unexpected response shape from the page script (null/undefined result or an unanticipated kind). The full result is JSON-stringified into the message for diagnosis.

Source

Thrown at clis/dribbble/auth.js:28

    // Dribbble serves an AWS WAF challenge before the real document on fresh
    // tabs. Three seconds is not enough consistently; probing early turns a
    // valid session into a false AUTH_REQUIRED result.
    await page.wait(5);
    const result = await page.evaluate(`(() => {
        const profile = document.querySelector('a[title="Open profile"]');
        const signOut = document.querySelector('form[action$="/session"] input[name="_method"][value="delete"]');
        const href = profile?.getAttribute('href') || '';
        if (!signOut || !/^\\/[^/]+$/.test(href)) {
            return { kind: 'auth', detail: 'Dribbble header does not show a logged-in profile' };
        }
        return {
            ok: true,
            username: href.slice(1),
            profile_url: new URL(href, location.href).href,
        };
    })()`);
    if (result?.kind === 'auth') throw new AuthRequiredError(DRIBBBLE_HOST, result.detail);
    if (!result?.ok) throw new CommandExecutionError(`Unexpected Dribbble identity response: ${JSON.stringify(result)}`);
    return { username: result.username, profile_url: result.profile_url };
}

registerSiteAuthCommands({
    site: 'dribbble',
    domain: DRIBBBLE_HOST,
    loginUrl: `${DRIBBBLE_ORIGIN}/session/new`,
    columns: ['username', 'profile_url'],
    quickCheck: hasDribbbleSessionCookie,
    verify: verifyDribbbleIdentity,
    poll: async (page) => {
        if (!await hasDribbbleSessionCookie(page)) {
            throw new AuthRequiredError(DRIBBBLE_HOST, 'Waiting for Dribbble session cookies');
        }
        return verifyDribbbleIdentity(page);
    },
});

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Inspect the JSON in the error message to see what the page actually returned (null vs unexpected kind).
  2. Retry after a longer wait — if the WAF challenge page is what the probe saw, a slow load is the usual culprit.
  3. Log into dribbble.com manually in the managed browser and confirm the profile page renders normally.
  4. Update the CLI package if the JSON shows selectors/shapes the page no longer produces (Dribbble DOM change).
Defensive patterns

Strategy: retry

Try / catch

async function dribbbleAuthWithRetry(retries = 2) {
  for (let i = 0; i <= retries; i++) {
    try {
      return await run('dribbble auth');
    } catch (e) {
      if (e.name === 'CommandExecutionError' && /Unexpected Dribbble identity response/.test(e.message) && i < retries) {
        await new Promise(r => setTimeout(r, 5000)); // let WAF challenge finish
        continue;
      }
      throw e;
    }
  }
}

Prevention

When it happens

Trigger: Calling `dribbble auth` when the page.evaluate identity script throws, returns null, or returns a novel result shape — e.g. the real document never loaded (WAF block page), a CAPTCHA interstitial, or a Dribbble DOM change breaking the script's assumptions.

Common situations: AWS WAF serving a hard block (not the challenge) so the probe returns null; Dribbble redesign changing the profile-link selector the script reads; browser tab closed/crashed before evaluation completes.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/8e4b796813971000. Report an issue: GitHub.