Skip to content

ChatGPT run aborts when the signed-in email cannot be scraped #22

Description

@tnunamak

A restored ChatGPT session with perfectly good credentials can still fail the run, because the connector insists on scraping your email address first. connectors/openai/chatgpt-playwright.js:820-824:

if (!email) {
  await page.setData('error', 'Could not extract email');
  return { error: 'Could not extract email' };
}

extractEmail (L113-136) regex-matches "email":"([^"]+)" out of inline <script> tags, which is exactly the sort of thing that breaks when a page changes. Note this check runs before getAuthCredentials() at L830, so the connector gives up before it even looks at the access token and device ID that collection actually uses.

Email is not part of anything we export. The manifest declares two scopes, chatgpt.memories and chatgpt.conversations (chatgpt-playwright.json:14-25), and scopePayloads at L613-616 has no email key. It is used at L827 and L840 for a status line. Display metadata should not be able to fail a run.

So let collection continue when the lookup fails, and show the email only when there is one. Status and completion copy need to read sensibly without it.

While you are here, the description is wrong in the same way. connectors/openai/chatgpt-playwright.json:8 says:

"Exports your email, memories, and all conversations from ChatGPT."

We do not export the email. That string is copied into connector-index.json at lines 43, 84, and 120, and into registry.json:12. Regenerate the index with npm run connector-index:generate and check with connector-index:check. Heads up that registry.json has no generator script, so it looks hand-maintained. Flag it in the PR if you are unsure rather than guessing.

Do not change how email is collected during interactive login. That path is fine and people expect to see it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions