-
Notifications
You must be signed in to change notification settings - Fork 441
Description
Preliminary Checks
-
I have reviewed the documentation: https://clerk.com/docs
-
I have searched for existing issues: https://github.com/clerk/javascript/issues
-
I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
-
This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
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 — createEmailAddress → prepareVerification → attemptVerification — 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.7clerk-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
- Create a user account using phone number only (no email address on the account)
- Sign in and navigate to an authed page
- 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
- 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(theattempt_verification500)723c164032b9abb2c0a7537dc356598d(earliersession_reverification_required403 — 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, andattemptVerificationhave 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