{"record":{"id":"17ca940cecf67a29","repo":"jackwener/OpenCLI","slug":"waiting-for-jike-login-detail","errorCode":null,"errorMessage":"Waiting for Jike login: ${detail}","messagePattern":"Waiting for Jike login: (.+?)","errorType":"exception","errorClass":"AuthRequiredError","httpStatus":null,"severity":"info","filePath":"clis/jike/auth.js","lineNumber":26,"sourceCode":"// from the /1.0/users/profile endpoint rather than from the token or a cookie.\nasync function verifyJikeIdentity(page) {\n  await page.goto('https://web.okjike.com/');\n  await page.wait(2);\n  return requireJikeIdentity(page);\n}\n\nregisterSiteAuthCommands({\n  site: 'jike',\n  domain: 'web.okjike.com',\n  loginUrl: 'https://web.okjike.com/login',\n  columns: ['user_id', 'screen_name', 'username'],\n  verify: verifyJikeIdentity,\n  poll: async (page) => {\n    try {\n      return await requireJikeIdentity(page);\n    } catch (error) {\n      const detail = error instanceof Error ? error.message : String(error);\n      throw new AuthRequiredError(\n        'web.okjike.com',\n        detail ? `Waiting for Jike login: ${detail}` : 'Waiting for Jike login',\n      );\n    }\n  },\n});\n","sourceCodeStart":8,"sourceCodeEnd":33,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/jike/auth.js#L8-L33","documentation":"AuthRequiredError with domain 'web.okjike.com' thrown by the jike login poll handler. The poll calls requireJikeIdentity(page); if that throws (identity not yet available), the error is converted into an AuthRequiredError whose detail is 'Waiting for Jike login: <original message>'. It signals that the user has not completed login in the automated browser yet.","triggerScenarios":"Running the jike login command while the user has not finished logging in at web.okjike.com; requireJikeIdentity fails each poll tick because the session/identity markers are absent.","commonSituations":"User mid-typing credentials or completing SMS/captcha during interactive login; login completed but identity check runs before the page state updates; browser closed before login finished; Jike session cookie domain/path mismatch.","solutions":["Complete the login in the opened browser window; the poll succeeds once requireJikeIdentity passes","Finish any SMS/captcha verification step that is blocking identity establishment","If login appears done but the error persists, inspect the inner detail message (after 'Waiting for Jike login:') for the exact failing check","Restart the login flow if the browser or page was closed early","Verify the profile retains the Jike session cookie before retrying"],"exampleFix":"// before\nopencli jike login  // poll: AuthRequiredError 'Waiting for Jike login: not signed in'\n// after: user completes login; poll returns identity\n{ ...identity }","handlingStrategy":"try-catch","validationCode":"// before polling, confirm the user can reach the logged-in surface\nawait page.goto('https://web.okjike.com/');\nif (/login|signin/i.test(page.url())) console.log('Not signed in yet — complete login in the browser');","typeGuard":"function isWaitingForJikeLogin(e) {\n  return e instanceof Error && /Waiting for Jike login/.test(e.message);\n}","tryCatchPattern":"try {\n  await poll();\n} catch (e) {\n  if (isWaitingForJikeLogin(e)) {\n    // expected while the user is logging in: keep waiting / prompt user\n    console.warn(e.message.replace('Waiting for Jike login: ', 'hint: '));\n  } else throw e;\n}","preventionTips":["Complete the entire Jike login flow (including any SMS verification) before expecting poll success","Do not close or navigate the automated browser during login","Read the inner detail after 'Waiting for Jike login:' to diagnose persistent failures","Use a persistent profile so a prior Jike session short-circuits the login flow"],"tags":["auth","login-flow","polling","jike"],"backgroundTag":"waiting-for-login","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}