jackwener/OpenCLI · error · CommandExecutionError
Unexpected Coupang probe: ${JSON.stringify(probe)}
Error message
Unexpected Coupang probe: ${JSON.stringify(probe)} What it means
CommandExecutionError thrown by verifyCoupangIdentity when the in-page probe returns something that is neither {kind:'auth'} nor {ok:true} — e.g. null/undefined (evaluate returned nothing, page crashed, navigation failed) or an unexpected shape. Unlike the auth cases, this indicates an unexpected runtime state, not a clean 'not logged in' answer.
Source
Thrown at clis/coupang/auth.js:32
await page.wait(3);
const probe = await page.evaluate(`
(() => {
if (/login\\.coupang\\.com\\/login/.test(location.href)) {
return { kind: 'auth', detail: 'Coupang mypage redirected to login — anonymous' };
}
if (/Access Denied/i.test(document.title)) {
return { kind: 'auth', detail: 'Coupang Access Denied — anti-bot or non-KR IP' };
}
const el = document.querySelector('.my-nickname, .member-name, .mp-user-info-name, [class*=memberName]');
const name = (el?.textContent || '').trim();
if (!name) {
return { kind: 'auth', detail: 'Coupang mypage 200 but no member-name surface' };
}
return { ok: true, name };
})()
`);
if (probe?.kind === 'auth') throw new AuthRequiredError('coupang.com', probe.detail);
if (!probe?.ok) throw new CommandExecutionError(`Unexpected Coupang probe: ${JSON.stringify(probe)}`);
return { name: probe.name };
}
registerSiteAuthCommands({
site: 'coupang',
domain: 'coupang.com',
loginUrl: 'https://login.coupang.com/login/login.pang',
columns: ['name'],
verify: verifyCoupangIdentity,
poll: async (page) => {
if (!await hasCoupangSessionCookie(page)) {
throw new AuthRequiredError('coupang.com', 'Waiting for Coupang session cookies');
}
return verifyCoupangIdentity(page);
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Read the JSON.dumped probe in the message to see the actual value and diagnose from there
- Retry verification — transient slowness is the most common cause
- Increase the wait after page.goto('/np/mypage') (currently page.wait(3)) if mypage loads slowly
- Verify evaluate snippet executes correctly in Chrome DevTools on mypage; fix escaping/marker mismatch if probe is null
Example fix
// before
await page.goto('https://www.coupang.com/np/mypage');
await page.wait(3);
// after
await page.goto('https://www.coupang.com/np/mypage', { waitUntil: 'networkidle' });
await page.wait(5); Defensive patterns
Strategy: retry
Validate before calling
// ensure mypage loaded before probing
await page.goto('https://www.coupang.com/np/mypage', { waitUntil: 'networkidle' });
if (!/mypage|쿠팡/.test(await page.evaluate(() => document.title))) {
throw new Error('mypage did not load as expected');
} Type guard
function isOkProbe(probe) {
return probe != null && typeof probe === 'object' && probe.ok === true && typeof probe.name === 'string' && probe.name.length > 0;
} Try / catch
try {
const identity = await coupangVerify(page);
} catch (err) {
if (/Unexpected Coupang probe/.test(err.message)) {
const raw = err.message.match(/Unexpected Coupang probe: (.*)$/)?.[1];
console.warn(`probe=${raw} — retrying once`);
await sleep(3000);
return coupangVerify(page);
}
throw err;
} Prevention
- Retry verification on flaky networks before treating it as fatal
- Increase the post-navigation wait when mypage loads slowly
- Parse the JSON probe dump in the error message to diagnose exact cause
- Keep the evaluate snippet tested against current Coupang mypage markup
When it happens
Trigger: page.evaluate returning null/undefined (navigation interrupted, page.goto failed silently, evaluate sandbox error); probe object with unexpected structure after Coupang markup/JS changes; the 3-second page.wait being insufficient so the probe ran against an intermediate page.
Common situations: Flaky network or slow mypage load; Coupang serving a challenge/interstitial page that returns an unrecognized shape; regression in the evaluate snippet string (escaping errors); browser tab closed mid-verification.
Related errors
- Unexpected Amazon probe: ${JSON.stringify(probe)}
- Unexpected Claude probe: ${JSON.stringify(result)}
- Either --product-id or --url is required
- coupang add-to-cart navigation failed: ${error?.message || e
- coupang add-to-cart evaluation failed: ${error?.message || e
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/5e7cdac3b4f7e2fc.
Report an issue: GitHub.