{"record":{"id":"f457feec50171c4e","repo":"jackwener/OpenCLI","slug":"chatgpt-did-not-create-a-conversation-url-after-se","errorCode":null,"errorMessage":"ChatGPT did not create a conversation URL after sending the message.","messagePattern":"ChatGPT did not create a conversation URL after sending the message\\.","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/chatgpt/ask.js","lineNumber":35,"sourceCode":"    selectChatGPTTool,\n    isGenerating,\n    startNewChat,\n    navigateToProject,\n    waitForChatGPTResponse,\n} from './utils.js';\n\nasync function waitForConversationUrl(page, timeoutSeconds = 30) {\n    const startTime = Date.now();\n    while (Date.now() - startTime < timeoutSeconds * 1000) {\n        const conversationUrl = await currentChatGPTUrl(page);\n        try {\n            const conversationId = parseChatGPTConversationId(conversationUrl);\n            return { conversationId, conversationUrl };\n        } catch {\n            await page.wait(1);\n        }\n    }\n    throw new CommandExecutionError('ChatGPT did not create a conversation URL after sending the message.');\n}\n\nexport const askCommand = cli({\n    site: 'chatgpt',\n    name: 'ask',\n    access: 'write',\n    description: 'Send a prompt to ChatGPT web and wait for the response',\n    domain: CHATGPT_DOMAIN,\n    strategy: Strategy.COOKIE,\n    browser: true,\n    siteSession: 'persistent',\n    navigateBefore: false,\n    args: [\n        { name: 'prompt', positional: true, required: true, help: 'Prompt to send' },\n        { name: 'timeout', type: 'int', default: 120, help: 'Max seconds to wait for response' },\n        { name: 'new', type: 'boolean', default: false, help: 'Start a new chat before sending' },\n        { name: 'conversation', valueRequired: true, help: 'Continue an existing ChatGPT conversation ID or /c/<id> URL' },\n        { name: 'project', valueRequired: true, help: 'Start a new chat inside a ChatGPT project ID or /g/g-p-<id> URL' },","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/chatgpt/ask.js#L17-L53","documentation":"`chatgpt ask` sends the prompt via browser automation, then waitForConversationUrl (clis/chatgpt/ask.js:24) polls page URL for up to 30 seconds trying to parse a /c/<conversationId> segment. If no conversation URL appears within the timeout (parseChatGPTConversationId keeps throwing), it throws this CommandExecutionError.","triggerScenarios":"Sending a message in the browser session where ChatGPT never navigates to a /c/<id> URL: send failed silently, login/rate-limit wall, Cloudflare challenge, network error, or page stuck generating without navigation within the 30s loop.","commonSituations":"Expired or invalid session cookies causing redirect to login; ChatGPT outage or heavy load; usage-capped accounts; slow networks where navigation lags past 30 seconds.","solutions":["Rerun with a larger timeout and verify the session: open chatgpt.com in the automated browser and confirm you are logged in","Check whether the message actually sent (composer cleared / response appearing); handle login or Cloudflare challenges first","Retry after rate limits/captchas; if the site changed its URL scheme, update the library to a matching version"],"exampleFix":"// before\nawait waitForConversationUrl(page); // 30s default\n// after\nlet result;\nfor (let i = 0; i < 3; i++) {\n  try { result = await waitForConversationUrl(page, 60); break; }\n  catch (e) { if (i === 2) throw e; await sendChatGPTMessage(page, prompt); }\n}","handlingStrategy":"retry","validationCode":"// before asking, confirm an authenticated session\nconst url = await page.url();\nif (url.includes('auth') || url.includes('login')) throw new Error('ChatGPT session expired - re-authenticate');","typeGuard":null,"tryCatchPattern":"try {\n  const { conversationUrl } = await waitForConversationUrl(page);\n} catch (e) {\n  if (String(e.message).includes('did not create a conversation URL')) {\n    await startNewChat(page);\n    await sendChatGPTMessage(page, prompt);\n    const { conversationUrl } = await waitForConversationUrl(page); // one retry\n  } else throw e;\n}","preventionTips":["Ensure the message actually sent (composer cleared) before waiting for the URL","Keep the browser session's ChatGPT cookies fresh; re-login on auth redirects","Use --new to start from a clean conversation when URLs fail to appear","Increase timeout under slow network conditions and watch for rate limits/Cloudflare challenges"],"tags":["browser-automation","timeout","chatgpt-web","session"],"backgroundTag":"browser-automation-timeout","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}