-
-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: authListener.unsubscribe is not a function NextJS/React #262
Comments
Ran into this issue myself in React 18, switching off strict mode or running in production works but aren't optimal solutions. |
@Desdaemon Thanks for the reply! This kinda fixed it for me! But still some issues, but thats maybe on me 😅 |
the issue seems to be a breaking changes in supabase-js 2rc, while @supabase/auth-helpers-react still reference versione 1.... |
Can confirm also had this issue and I am on supabase-js 2rc as well. |
I also had this issue, temporary solved by turning off strict mode |
Same issue here! |
Same issue here as well. |
Problem Solved ✔️Found why this error was showing up. The UserProvider component from the @supabase/auth-helpers-react package wasn't unsubscribing the authListener properly : ProblemIt was supposed to be Fixed the issue and created a pull request. #282 Please check and review. |
For usage with supabase-js V2 RC please use the next release You'll want dependencies to look like this: "@supabase/auth-helpers-nextjs": "^0.4.0-next.3",
"@supabase/auth-helpers-react": "^0.3.0-next.2",
"@supabase/supabase-js": "^2.0.0-rc.10", You can find the migration docs here: https://github.com/supabase/auth-helpers/blob/next/packages/nextjs/MIGRATION_GUIDE.md and you can see the changes involved to an existing application here: https://github.com/vercel/nextjs-subscription-payments/pull/128/files |
Bug report
Describe the bug
I'm trying to implmten auth into a Next.js project following the guide. But when I add the UserProvider I get an error.
To Reproduce
I only followed this guide
System information
"@supabase/auth-helpers-nextjs": "^0.2.8",
"@supabase/auth-helpers-react": "^0.2.4",
"@supabase/supabase-js": "^2.0.0-rc.8",
Additional context
Using TypeScript
The text was updated successfully, but these errors were encountered: