Skip to content

Auth.signUp Error in Local Env with Supabase CLI #9

@alteredorange

Description

@alteredorange

Bug report

Describe the bug

supabase.auth.signup on local setup gives 'Database error finding user'.

A clear and concise description of what the bug is.

Installed supabase cli, set up a local project, and then tried to do a simple user signup. On signup I get a status: 500 with message: Database error finding user.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. supabase init
  2. localhost:8000
  3. postgres port 5477 (only thing different from default)
  4. create index.js with the following:
import { createClient } from '@supabase/supabase-js'
const SUPABASE_URL = 'http://localhost:8000'
const SUPABASE_ANON_KEY = 'key-here'
const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY)

const main = async () => {
  const { user, session, error } = await supabase.auth.signUp({
    email: 'hi@gmail.com',
    password: 'superpasswordtighty',
  })
  console.log(user)       //null
  console.log(session)  //null
  console.log(error)     //{ message: 'Database error finding user', status: 500 }
}
main()

Expected behavior

A user would be created in the database. I can connect to postgres just fine, and it looks like everything is there (as far as I know). I also tried the auth.signIn method, and I get the same error (which makes sense since there's no user yet). Not sure if the signUp method is getting it's wires crossed with singIn?

Screenshots

postgres database:
image

System information

  • OS: Windows running Ubuntu and Docker Desktop through WSL2

  • Version of supabase-js: 1.7.6, cli: 0.3.3

  • Version of Node.js: 15.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions