Issue with open saas and supabase

Hi, I'm using 0.13.2 version of Wasp and am trying to use the Open SAAS starter kit with Supabase to handle authentication and user data. I believe I was able to get the authentication working correctly earlier, however now when I try to sign up a user I get an error on the frontend "Request failed with status code 500" In the console, I get the following message:
GET http://localhost:3001/auth/me 401 (Unauthorized)
_0x2ad823.toString._0x21226a.<computed>.<computed> @ VM30:1
dispatchXhrRequest @ axios.js?v=e936e7fc:1513
xhr @ axios.js?v=e936e7fc:1373
dispatchRequest @ axios.js?v=e936e7fc:1590
Promise.then (async)
_request @ axios.js?v=e936e7fc:1854
request @ axios.js?v=e936e7fc:1776
Axios.<computed> @ axios.js?v=e936e7fc:1891
wrap @ axios.js?v=e936e7fc:8
getMe @ useAuth.ts:20
queryFn @ core.ts:41
fetchFn @ @tanstack_react-query.js?v=e936e7fc:974
run @ @tanstack_react-query.js?v=e936e7fc:639
createRetryer @ @tanstack_react-query.js?v=e936e7fc:673
fetch @ @tanstack_react-query.js?v=e936e7fc:1013
executeFetch @ @tanstack_react-query.js?v=e936e7fc:2100
fetch @ @tanstack_react-query.js?v=e936e7fc:2090
refetch @ @tanstack_react-query.js?v=e936e7fc:2075
onFocus @ @tanstack_react-query.js?v=e936e7fc:864
(anonymous) @ @tanstack_react-query.js?v=e936e7fc:1255
(anonymous) @ @tanstack_react-query.js?v=e936e7fc:1254
batch @ @tanstack_react-query.js?v=e936e7fc:706
onFocus @ @tanstack_react-query.js?v=e936e7fc:1253
(anonymous) @ @tanstack_react-query.js?v=e936e7fc:1701
(anonymous) @ @tanstack_react-query.js?v=e936e7fc:475
onFocus @ @tanstack_react-query.js?v=e936e7fc:472
(anonymous) @ @tanstack_react-query.js?v=e936e7fc:460
listener @ @tanstack_react-query.js?v=e936e7fc:429
Show 24 more frames
Show less
VM30:1


POST http://localhost:3001/auth/email/signup 500 (Internal Server Error)
GET http://localhost:3001/auth/me 401 (Unauthorized)
_0x2ad823.toString._0x21226a.<computed>.<computed> @ VM30:1
dispatchXhrRequest @ axios.js?v=e936e7fc:1513
xhr @ axios.js?v=e936e7fc:1373
dispatchRequest @ axios.js?v=e936e7fc:1590
Promise.then (async)
_request @ axios.js?v=e936e7fc:1854
request @ axios.js?v=e936e7fc:1776
Axios.<computed> @ axios.js?v=e936e7fc:1891
wrap @ axios.js?v=e936e7fc:8
getMe @ useAuth.ts:20
queryFn @ core.ts:41
fetchFn @ @tanstack_react-query.js?v=e936e7fc:974
run @ @tanstack_react-query.js?v=e936e7fc:639
createRetryer @ @tanstack_react-query.js?v=e936e7fc:673
fetch @ @tanstack_react-query.js?v=e936e7fc:1013
executeFetch @ @tanstack_react-query.js?v=e936e7fc:2100
fetch @ @tanstack_react-query.js?v=e936e7fc:2090
refetch @ @tanstack_react-query.js?v=e936e7fc:2075
onFocus @ @tanstack_react-query.js?v=e936e7fc:864
(anonymous) @ @tanstack_react-query.js?v=e936e7fc:1255
(anonymous) @ @tanstack_react-query.js?v=e936e7fc:1254
batch @ @tanstack_react-query.js?v=e936e7fc:706
onFocus @ @tanstack_react-query.js?v=e936e7fc:1253
(anonymous) @ @tanstack_react-query.js?v=e936e7fc:1701
(anonymous) @ @tanstack_react-query.js?v=e936e7fc:475
onFocus @ @tanstack_react-query.js?v=e936e7fc:472
(anonymous) @ @tanstack_react-query.js?v=e936e7fc:460
listener @ @tanstack_react-query.js?v=e936e7fc:429
Show 24 more frames
Show less
VM30:1


POST http://localhost:3001/auth/email/signup 500 (Internal Server Error)
I'm running supabase locally at the moment, but in the cloud I still have the same issue Does anyone have any examples of the saas/stripe kit with supabase?
5 Replies
kapa.ai
kapa.ai•6mo ago
Hi @Liam Arbuckle. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the knowledge sources provided, there isn't a specific example of using the Open SaaS starter kit with Supabase. However, it's worth noting that a community member was able to use Supabase database via DATABASE_URL and it worked fine source (https://github.com/wasp-lang/wasp/issues/1265). The error you're encountering seems to be related to the signup process. There's a similar issue reported on Github where a 500 error is returned when trying to sign up with an email that already exists source (https://github.com/wasp-lang/wasp/issues/100). The error handling for this scenario should be improved in the Wasp framework. As for the 401 error, it seems to be related to the authentication process. A community member reported a similar issue on Discord where the auth/me endpoint was returning a 401 error during Stripe testing source (https://discord.com/channels/686873244791210014/1202542916321681448). Unfortunately, without more specific information or examples related to your use case, it's hard to provide a more detailed solution. I would recommend checking the Wasp documentation and community forums for more information. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Liam Arbuckle, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Liam Arbuckle
Liam ArbuckleOP•6mo ago
@kapa.ai I'm signing up a user/email that has never been registered before, on a fresh install/instance of the open-saas template
kapa.ai
kapa.ai•6mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- Based on the provided knowledge sources, there isn't enough information to diagnose the specific issue you're encountering with the Open SaaS template and Supabase. The sources do not provide a direct solution or workaround for a 500 error during the signup process on a fresh install/instance of the Open SaaS template with a new user/email. However, there are a few general steps you can take to debug this issue: 1. Check the server logs: The server logs can provide more detailed information about what's causing the 500 error. 2. Verify your Supabase configuration: Ensure that your Supabase instance is correctly configured and that the Open SaaS template is correctly set up to use it. 3. Update Wasp and the Open SaaS template: Make sure you're using the latest versions of Wasp and the Open SaaS template. There may have been bug fixes or improvements that could resolve your issue. 4. Reach out to the Wasp community: The Wasp community can be a great resource for troubleshooting issues. You can reach out to them through the Wasp Discord server (https://discord.com/invite/rzdnErX) or the Wasp Github (https://github.com/wasp-lang/wasp). Remember, it's always important to handle sensitive data, like user emails and passwords, securely. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Liam Arbuckle, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
martinsos
martinsos•6mo ago
@Wasp Team any ideas? Maybe something specific to supabase? Or potentially to how we serialize JSON (I don't know why I tought of this but got a hunch)? Any other ideas?
miho
miho•6mo ago
@Liam Arbuckle it's hard to say without you sharing a bit more code with us 😄
with Supabase to handle authentication and user data.
How are you doing this? Could you please share your Wasp file and snippets of code that's related to Supabase?
In the console, I get the following message:
Do you get any errors in the terminal? (Possibly server errors)
Want results from more Discord servers?
Add your server