Skip to content

attempt_verification on EmailAddressResource returns 500 Internal Server Error after Core 3 upgrade #8205

@mantey-github

Description

@mantey-github

Preliminary Checks

Reproduction

Check -> Steps to reproduce

Publishable key

pk_test_ZGlzdGluY3QtZmVycmV0LTUuY2xlcmsuYWNjb3VudHMuZGV2JA

Description

After upgrading from @clerk/tanstack-react-start@0.29.6 (Core 2) to @clerk/tanstack-react-start@1.0.7 (Core 3), calling attemptVerification({ code }) on an EmailAddressResource returns a 500 Internal Server Error from the Clerk API.

The full flow — createEmailAddressprepareVerificationattemptVerification — is used on a profile page where an authenticated user adds or changes their email address. The first two steps succeed; only attemptVerification fails.

Environment

  • @clerk/tanstack-react-start: 1.0.7
  • clerk-js (loaded from CDN): 6.3.3
  • Clerk Backend API version: 2025-11-10
  • Framework: TanStack Start (React 19)
  • Node.js: 22

Steps to reproduce

  1. Create a user account using phone number only (no email address on the account)
  2. Sign in and navigate to an authed page
  3. Enter a new email address and submit — this triggers:
    const emailResource = await clerkUser.createEmailAddress({ email }); // ✅ succeeds
    await emailResource.prepareVerification({ strategy: 'email_code' }); // ✅ succeeds, OTP sent
  4. Enter the OTP code received via email and submit — this triggers:
    await emailResource.attemptVerification({ code: otp }); // ❌ 500 Internal Server Error

Note: Session reverification (session_reverification_required) was handled prior to the createEmailAddress call using the useReverification hook, and completed successfully.

Failing request

POST /v1/me/email_addresses/idn_3BgAbhJl9jT8puFbYooJWx7kw21/attempt_verification
  ?__clerk_api_version=2025-11-10
  &_clerk_js_version=6.3.3

Status: 500 Internal Server Error

Error response

{
  "errors": [
    {
      "message": "Oops, an unexpected error occurred",
      "long_message": "There was an internal error on our servers. We've been notified and are working on fixing it.",
      "code": "internal_clerk_error"
    }
  ],
  "clerk_trace_id": "592eec76b1d3d0797d93d0c5017bdfe4"
}

Clerk trace IDs

  • 592eec76b1d3d0797d93d0c5017bdfe4 (the attempt_verification 500)
  • 723c164032b9abb2c0a7537dc356598d (earlier session_reverification_required 403 — handled successfully)

User context

The affected user was created with phone-only sign-up (no email address on the account). This is the first email address being added to the account. Relevant user state from the API response:

{
  "email_addresses": [],
  "primary_email_address_id": null,
  "phone_numbers": [{ "phone_number": "+12135550198" }] Clerk Test email
}

Expected behavior

attemptVerification({ code }) should verify the OTP and return the updated EmailAddressResource with verification.status === 'verified', as it did prior to the Core 3 upgrade.

Workaround

None currently. The 500 is a server-side error that cannot be handled client-side.

Additional context

  • This flow worked correctly with @clerk/tanstack-react-start@0.29.6 (Core 2)
  • The API types for createEmailAddress, prepareVerification, and attemptVerification have not changed between Core 2 and Core 3
  • The same code path may also affect PhoneNumberResource.attemptVerification (not yet tested)

Environment

System:
    OS: macOS 26.4
    CPU: (8) arm64 Apple M1 Pro
    Memory: 135.28 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.17.1 - /Users/****/.nvm/versions/node/v22.17.1/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 10.9.2 - /Users/****/.nvm/versions/node/v22.17.1/bin/npm
    pnpm: 10.28.1 - /opt/homebrew/bin/pnpm
  Browsers:
    Chrome: 146.0.7680.165
    Firefox: 148.0.2
    Safari: 26.4
  npmPackages:
    @clerk/tanstack-react-start: 1.0.7
    @clerk/themes: 2.4.57
    turbo: catalog: => 2.8.21

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageA ticket that needs to be triaged by a team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions