netlify-templates / kpop-stack

Create a Remix app with Netlify, Tailwind, TypeScript and more!

Home Page:https://kpop-stack.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with creating user, cannot read properties of null

maxcell opened this issue · comments

I can't make it work too. What am I missing here?

node --version: v18.1.0

Running: npm run dev

image

Getting this issue when creating a user:
image

Originally posted by @leofmoura in #49 (comment)

I notice here you've got a 500 error there which seems not so good! What was the UI feedback from Remix you received with the failed creation of the user?

Hi Maxcell. This is what I get when try to signup.
The user is created in supabase. But it doesn't look like it's completing the operation.
When trying to login I get a invalid user/pass.

image

image

When trying from deployed netlify site, I can't make it work too, but error is different:

image

looks like I have wrong configuration, but all I did was set variables copying from supabase settings.

Thanks

@leofmoura No worries at all! Happy to help out. Just one last check, did you perform the necessary SQL queries in the README under the Database section? https://github.com/netlify-templates/kpop-stack#database
CleanShot 2022-06-06 at 10 42 50

Ok, that fixed my local env. I missed that, thanks.

About the netlify site:

I'm getting this error when creating an account:

{
  "errorType": "Runtime.UnhandledPromiseRejection",
  "errorMessage": "FetchError: invalid json response body at https://rktuocznllhvbarshwit.supabase.co/auth/v1/signup reason: Unexpected token M in JSON at position 0",
  "trace": [
    "Runtime.UnhandledPromiseRejection: FetchError: invalid json response body at https://rktuocznllhvbarshwit.supabase.co/auth/v1/signup reason: Unexpected token M in JSON at position 0",
    "    at process.<anonymous> (/var/runtime/index.js:35:15)",
    "    at process.emit (events.js:400:28)",
    "    at process.emit (/var/task/node_modules/source-map-support/source-map-support.js:516:21)",
    "    at processPromiseRejections (internal/process/promises.js:245:33)",
    "    at processTicksAndRejections (internal/process/task_queues.js:96:32)"
  ]
}

Let me know if that also fixed on the Netlify deploy as well, it should resolve well! Or is the error above still after making the migrations?

Yes, it fixed. I had a caching issue, but as soon I've re-deployed everything, it worked fine.
Nice to have you here!

Glad it is all working. Thank you so much for opening the report and working with me on this! Keep us posted on what's next for ya! 😄