Hi everyone!
Very novice developer here, making the jump from completely no-code tools to WeWeb + Supabase to build my first “real” side project. Please keep in mind I might be lacking some very basic notions that are obvious to more experienced folks.
I’ve been taking the first level WeWeb Academy course and it’s been great so far, except for one thing. The issue I’m having has to do with auth, and specifically accessing Supabase data in WeWeb in order to bind database properties to WeWeb elements.
The video that covers how to do this (Get and Display Supabase Data in WeWeb) talks about row-level security, and I guess for the purposes of the exercise says to set up an “everyone can access” policy in Supabase to be able to pull the data in WeWeb. Obviously that’s not a viable approach for a production project, or even for development purposes.
Next I followed the instructions in this WeWeb documentation article (down to the profiles vs roles section). As far as I’m aware, I did everything as instructed.
Next, following advice I received in response to a comment I posted on the above video, I tried signing up with my own email address with the intent of giving myself an admin role in order to be able to access the Supabase data I need to continue development in WeWeb. I received the signup confirmation email, but clicking the confirmation link led me to an error page.
Now I can see that the corresponding user has been created in the Supabase auth schema users table, but it doesn’t show up in WeWeb
And if I try creating the user in WeWeb directly it throws an error saying the email address is already in use.
Trying to log into my WeWeb app with the user account also fails with a variety of errors:
Error 1
name: "TypeError"
stack: "TypeError: Cannot read properties of null (reading 'map') at Object.getUserRoles (https://cdn.weweb.io/components/1fa0dd68-5069-436c-9a7d-3b54c340f1fa/8f2eff85-1c3f-4c12-bc94-0f338c0ccbfa/dist/manager.js:1:106786) at async Object.refreshAuthUser (https://cdn.weweb.io/components/1fa0dd68-5069-436c-9a7d-3b54c340f1fa/8f2eff85-1c3f-4c12-bc94-0f338c0ccbfa/dist/manager.js:1:106229) at async Object.signInEmail (https://cdn.weweb.io/components/1fa0dd68-5069-436c-9a7d-3b54c340f1fa/8f2eff85-1c3f-4c12-bc94-0f338c0ccbfa/dist/manager.js:1:103738) at async eval (eval at executeCode (https://editor-cdn.weweb.io/public/js/index.8ad6d39a.js:1:309705), :1:28) at async executeCode (https://editor-cdn.weweb.io/public/js/index.8ad6d39a.js:1:309699) at async xt (https://editor-cdn.weweb.io/public/js/index.8ad6d39a.js:1270:34919) at async Pt (https://editor-cdn.weweb.io/public/js/index.8ad6d39a.js:1270:23982) at async Dt (https://editor-cdn.weweb.io/public/js/index.8ad6d39a.js:1270:22768)"
message: "Cannot read properties of null (reading 'map')"
Error 2
name: "TypeError"
stack: "TypeError: Cannot read properties of null (reading 'map') at Object.getUserRoles (https://cdn.weweb.io/components/1fa0dd68-5069-436c-9a7d-3b54c340f1fa/8f2eff85-1c3f-4c12-bc94-0f338c0ccbfa/dist/manager.js:1:106786) at async Object.refreshAuthUser (https://cdn.weweb.io/components/1fa0dd68-5069-436c-9a7d-3b54c340f1fa/8f2eff85-1c3f-4c12-bc94-0f338c0ccbfa/dist/manager.js:1:106229) at async Object.signInEmail (https://cdn.weweb.io/components/1fa0dd68-5069-436c-9a7d-3b54c340f1fa/8f2eff85-1c3f-4c12-bc94-0f338c0ccbfa/dist/manager.js:1:103738) at async eval (eval at executeCode (https://editor-cdn.weweb.io/public/js/index.8ad6d39a.js:1:309705), :1:28) at async executeCode (https://editor-cdn.weweb.io/public/js/index.8ad6d39a.js:1:309699) at async xt (https://editor-cdn.weweb.io/public/js/index.8ad6d39a.js:1270:34919) at async Pt (https://editor-cdn.weweb.io/public/js/index.8ad6d39a.js:1270:23982) at async Dt (https://editor-cdn.weweb.io/public/js/index.8ad6d39a.js:1270:22768)"
message: "Cannot read properties of null (reading 'map')"```
Error 3
name: "Error"
stack: "Error: Variable not found. at xt (https://editor-cdn.weweb.io/public/js/index.8ad6d39a.js:1270:25757) at Pt (https://editor-cdn.weweb.io/public/js/index.8ad6d39a.js:1270:23988) at Dt (https://editor-cdn.weweb.io/public/js/index.8ad6d39a.js:1270:23209)"
message: "Variable not found."
So yeah, I don’t really know what do to with this and would appreciate any help anyone can offer!
Thank you,
GD