-
Notifications
You must be signed in to change notification settings - Fork 538
Open
Labels
auth-jsRelated to the auth-js library.Related to the auth-js library.bugSomething isn't workingSomething isn't working
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
In React Native, calling supabase.auth.signInWithPassword throws an unhandled error ReferenceError: Property 'structuredClone' doesn't exist:
try {
const { data, error } = await supabase.auth.signInWithPassword({ email, password })
console.log('signInWithPassword data', data)
console.log('signInWithPassword error', error)
} catch (error) {
console.log('error', error) // ReferenceError: Property 'structuredClone' doesn't exist
}Reverting to @supabase/supabase-js 2.50.3 which depends on @supabase/auth-js 2.70.0 solves the issue.
I also tried installing the @ungap/structured-clone polyfill, but that did not work.
To Reproduce
- Setup a basic RN Expo project
- Install @supabase/supabase-js 2.51.0
- basic Supabase client setup
- call
supabase.auth.signInWithPasswordwrapping it in a try/catch - get the error
Expected behavior
- if success: return session data (login)
- if error: return error param
After experiencing this issue, I was surprised to see that signInWithPassword throws if it encounters an unexpected error. This makes the error filed on the response kind of misleading, although I can understand the rational.
System information
- OS: macOS
- react-native: 0.79.5
- expo: ~53.0.17
- Version of supabase-js: 2.51.0
- Version of Node.js: 24.3.0
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
auth-jsRelated to the auth-js library.Related to the auth-js library.bugSomething isn't workingSomething isn't working