https://supabase.com/ logo
Join Discord
Powered by
# help-and-questions
  • seeding users with password in seed.sql
    j

    Jinni

    04/18/2023, 7:54 AM
    Just as the title says, I want to seed users with password in seed.sql
    s
    v
    • 3
    • 8
  • Filter by empty subquery
    l

    laznic

    04/18/2023, 9:07 AM
    Hey, I was wondering if it's possible to filter results with empty subquery with the JS SDK? As in, I'd like to get items that don't have any specific associations attached to them. E.g.
    Copy code
    ts
    supabase.from('table')
      .select('id, subquery(*)')
      .eq('matches', true)
       // Get only table entries where this subquery is an empty, WHERE NOT EXISTS or such
      .filter('subquery.table_id', '???')
      .limit(1)
    g
    • 2
    • 1
  • Feature request: Allow us to have the API docs for a view in postgres.
    l

    lake_mattiato

    04/18/2023, 9:27 AM
    Also maybe show the table name somewhere so we can copy it. Thanks 😄
    g
    • 2
    • 1
  • help setting up local environment for gotrue-py
    h

    hgseo16

    04/18/2023, 9:51 AM
    Hi everyone. I was trying to work on https://github.com/supabase-community/gotrue-py/issues/231 but I'm having trouble setting up my local environment for
    gotrue-py
    . If anyone could help me with this, I would really appreciate it! cc. @User
    j
    • 2
    • 3
  • createClient is not defined with CDN
    j

    Josh឵

    04/18/2023, 9:51 AM
    Hallo, I just started a simple html project that uses supabase, but in this project, it doesn't work. The CDN in html:
    g
    • 2
    • 2
  • getting error while setting up locally for contribution
    l

    Love3000

    04/18/2023, 10:48 AM

    https://cdn.discordapp.com/attachments/1097835936286511184/1097835936475259010/image.png▾

  • Can't connect to supabase sql on port 5432
    z

    zaibyeu

    04/18/2023, 12:11 PM
    Hi, I can suddenly not connect to the sql server on port "5432", I get an errorcode: 08001, port 6543 works fine, tried to restart it, didn't help, any ideas? Long Message: The connection attempt failed. Details:    Type: org.postgresql.util.PSQLException    SQL State: 08001 Stack Trace: java.net.SocketTimeoutException: Connect timed out
    • 1
    • 1
  • Email Confirmation Help?
    m

    Merovingian

    04/18/2023, 12:43 PM
    I want to ask something. In my application, I am having a lot of trouble with email confirmation. Normally, when a user registers, they receive an email with a link. The link looks like this: https://ref.supabase.co/auth/v1/verify?token=&type=signup&redirect_to=com.myapp.app://email-confirmation, and I want to automatically redirect the user to the email-confirmation page using this deep link, but I can't seem to figure it out. I have looked at every repo possible, but still no luck. Is my method wrong? I am trying to check the session with getSession() and then make another request to the session in the context API with role='Authenticated'. If you could help me out with some ideas on how to do this, I would be very grateful.
    g
    • 2
    • 1
  • custom login form issue
    b

    besimon

    04/18/2023, 1:01 PM
    I have the following form attached: I've got some checks in place and I've confirmed that these all work. I have attached the screenshot of what happens when I successfully sign in, however the cookie isn't being set! This is my first time doing signInWithPassword - I previously completed the auth flow using the magic link and want to level up in the world 🤣 any help is appreciated https://cdn.discordapp.com/attachments/1097869581185454172/1097869581382594652/message.txt

    https://cdn.discordapp.com/attachments/1097869581185454172/1097869581823000616/Screenshot_2023-04-18_at_10.57.51_pm.png▾

    g
    • 2
    • 9
  • Supabase for Android Studio?
    r

    Ramboo_018

    04/18/2023, 2:58 PM
    hi, i am implementing a cloud database in my Android Studio project, i started days ago with Firebase, but i dont like it, i read about Supabase and i am more interested in this database than FIrabase. Is there any way i can implement Supabase in Android Studio for Java, i didn't found any information in internet, but ChatGTP and the Supebase AI said that is possible.
  • OTP Token signup confirm email
    m

    MATTI

    04/18/2023, 3:03 PM
    In the signup confirm email, am I just supposed to add the token into the html like this:
    Copy code
    html
    <p>Token: {{ .Token }}</p>
    Or am i supposed to do something else? I am reading through this: https://supabase.com/docs/guides/auth/auth-email-templates#limitations
    g
    • 2
    • 2
  • Unable to edit user_metadata on self hosted studio
    g

    garyaustin

    04/18/2023, 3:34 PM
    Where do you get to edit the auth.users table in the cloud dashboard?
    e
    • 2
    • 2
  • Default Insert Policy for authenticated users not working
    c

    cptCrunch

    04/18/2023, 3:32 PM
    Im using the suggested policy but I still can't insert into the table.
    g
    • 2
    • 30
  • Do Database Webhooks retry on failure?
    s

    Stuster

    04/18/2023, 3:38 PM
    👋 I'm setting up a Database Webhook to call an endpoint on insert and wondering if there is inbuilt retry functionality for if the http endpoint is unavailable or returns a non success code? If there is nothing inbuilt, is there a suggested way to set up retries or see a log/table of failed webhooks?
    g
    • 2
    • 3
  • Auth broken after disabling "confirm email"
    w

    wuh

    04/18/2023, 4:22 PM
    After turning off "Confirm email" in auth providers, I get the following auth error log every 3 seconds. "running db migrations: error executing migrations/20230322519590_add_flow_state_table.up.sql" ": ERROR: relation "idx_auth_code" already exists (SQLSTATE 42P07)" Just to make it clear, this is not my own migration, I think this is something that comes from Supabase. This leads to no users being able to login or create accounts. Based on the logs the error started occurring when I toggled off confirm email. Just before toggling it off the first time I could log in without problems, and auth broke immediately after toggling it off. I've tried turning "Confirm email" on and off again and I've tried restarting the database, but neither made a difference. I would like to avoid having to make a new project if this ever happens again. Is there a way to reset my database entirely without creating a new project to see if that fixes the issue?
    g
    • 2
    • 6
  • Issues Enabling SAML SSO for a supabase project. Could not verify certificate against trusted certs
    i

    irreal

    04/18/2023, 4:36 PM
    Hi, I'm trying to setup Azure AD SSO for my supabase project (for logging into my app, not for logging into the Supabase dashboard). I went step by step and successfully completed the Enterprise app registration in Azure Portal, imported my supabase project-specific XML metadata into azure, configured everything there. Then I used the supabase CLI to add the sso provider to my project, using the metadata url that Azure gave me and my project reference. Everything seems to be setup correctly. When testing a login from the Azure testing tool, it reports a completely successful SAML request and response. Yet the login fails on the supabase side. The sign in response just says:
    {"code":400,"msg":"SAML Assertion is not valid"}
    . looking at auth logs in the supabase dashboard, i see: "error": "cannot validate signature on Assertion: Could not verify certificate against trusted certs" What are my next steps? From reading the docs, it seems that Supabase should see the Certificate Azure AD is using at the point when I setup sso and pass the metadata xml. It should use that certificate to verify incoming requests, but it seems to not be doing that?
    • 1
    • 1
  • 500 Error for local logs
    g

    goetzrobin

    04/18/2023, 5:09 PM
    I set up supabase to run locally with the CLI. I was going to check out the new local logging feature. However in local development when I go to view the logs I get the following error:
    Copy code
    {
      "code": 500,
      "message": "LOGFLARE_API_KEY env variables are not set"
    }
    I cannot find documentation on how to get this API key. I also had hoped to be able to run the logging locally without having to sign up for a “3rd party” solution. Of course, I am willing to do that for a production or if I simply understand better how the integration works and what cost I can expect for running my local environment. The exact issue is also laid out here: https://github.com/supabase/supabase/issues/13729 Thanks already for any help or pointers!
    g
    f
    +2
    • 5
    • 11
  • Trying to create a trigger on user sign up (Prisma multi schema)
    v

    ven

    04/18/2023, 5:33 PM
    I would like to create an entry into my public.profiles table when a user signs up. Would this schema work?
    Copy code
    datasource db {
        provider          = "postgresql"
        url               = env("DATABASE_URL")
        shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
        schemas           = ["public", "auth"]
    }
    
    model User {
        id    String @id
        email String @unique
    
        Profile Profile?
    
        @@schema("auth")
    }
    
    model Profile {
        id           Int     @id @default(autoincrement())
        user         User    @relation(fields: [supabase_uid], references: [id])
        supabase_uid String  @unique
        email        String
        display_name String?
    
        memberships Membership[]
    
        @@map("profile")
        @@schema("public")
    }
    e
    • 2
    • 2
  • 2 relation from one table
    m

    Mirik

    04/18/2023, 6:48 PM
    Hi everyone, i have a question about relations 1. i have a rooms messages and users tables. 2. rooms table has user_one and user_two columns and both of them connected to (related) users -> id. 3. i can select which one i want to select .select("*, users!rooms_user_two_fkey(, messages())") like this. But is it possible to get all users ? i mean to add users!rooms_user_one_fkey also
    g
    • 2
    • 3
  • Is there a way to add AWS SNS as Phone provider?
    s

    Subh

    04/18/2023, 7:26 PM
    The reason I want to stick to AWS SNS as I already have credits there.
  • How i can select last row in python?
    i

    Ilgrand

    04/18/2023, 7:29 PM
    Hi guys i'm using python, but i cannot find out how to select the last row of the DB
    g
    • 2
    • 2
  • HTTP Logs for DB
    e

    Ege

    04/18/2023, 7:33 PM
    In the past 1 month i can see the "API Logs" in database section but now i can't do you know what happend?
    g
    • 2
    • 1
  • How to update the user session after calling `updateUser`?
    a

    Atrox

    04/18/2023, 7:55 PM
    I want to track some
    user_metadata
    but the user session does not reflect changes made via
    updateUser
    . I see the data in the database, but have to log out and back in to have it in the server session.
    g
    j
    • 3
    • 24
  • Filtering on foreign tables
    s

    squallsama

    04/18/2023, 7:56 PM
    I saw that part in docs https://supabase.com/docs/reference/javascript/select But how can I explicitly say on which foreign key I want to filter column ? For example I have
    invites
    tables with
    invite_from
    and
    invite_to
    and
    user_profile
    table with
    user_id
    column that is foreign key for
    invite_from
    and
    invite_to
    . I tried to do something like this:
    Copy code
    .from('user_profile')
            .select('*, invites!inner(invite_from(*))')
            .eq('invites.invite_from', currentUserId)
    But i got an exception:
    Copy code
    Unhandled Exception: PostgrestException(message: Could not embed because more than one relationship was found for 'user_profile' and 'invites'
    
    Try changing 'friendship_invites' to one of the following: 'invites!invites_invite_from_fkey', 'invites!invites_invite_to_fkey'. Find the desired relationship in the 'details' key.
    Could you please explain what is a proper way ?
    g
    • 2
    • 11
  • convo not full loading on one side
    u

    𝕷𝖎𝖌𝖍𝖙𝖇𝖚𝖑𝖇

    04/18/2023, 8:06 PM
    Hey all, can someone help me understand what's going? When clicking on the conversation/user I should be seeing messages but i only see messages for one user and not the other?? here is my code as well for the function:

    https://cdn.discordapp.com/attachments/1097976557500366998/1097976557722685510/image.png▾

    https://cdn.discordapp.com/attachments/1097976557500366998/1097976557991112824/image.png▾

    g
    • 2
    • 45
  • client side error when viewing project
    n

    neiled

    04/18/2023, 9:21 PM
    Currently getting a client side error when I view any project. Tried safari and chrome.

    https://cdn.discordapp.com/attachments/1097995334287904859/1097995334686359663/image.png▾

    s
    • 2
    • 2
  • RLS with direct connection using Prisma
    m

    mushzinho

    04/18/2023, 9:25 PM
    Hi Guys, I'm using NestJS Backend with Prisma, I was wondering if is possible to connect to my database instance using a different user than "postgres", to guarantee that all queries pass through RLS system. Because I read that the table owner bypass the RLS system by default. I tried to uncheck the bypass permission of "postgres" user but it failed with "need to be superuser" message. To summarize, I want that my Prisma Queries hit the RLS system without needing to use hacks like Prisma client "extends" functionality.
    g
    • 2
    • 2
  • I could use some help with auth when transitioning from local to prod.
    m

    MissTitanK3

    04/18/2023, 10:20 PM
    I have built my project enough to deploy it to a domain. But once I did that, and moved away from using vercels domain, I can no longer get auth to go to localhost. Any insight as to why this is happening would be wonderful.
    s
    n
    • 3
    • 7
  • Implementing chunk sizes with lazy loading. [kicking my butt]
    t

    tk

    04/18/2023, 10:24 PM
    Hi Everyone, I have been trying to solve this problem for the last couple of days and it has officially beaten me I show all of a users appearances in a feed that lazy loads onto the screen. The way this is currently working is I am searching for all of the posts that they are in in my getStaticProps function as seen here:
    Copy code
    const { data: appearanceIds, error: appearanceIdsError } = await supabase
        .from('appearance_participants')
        .select('appearance_id')
        .eq('leader_id', person.leader_id)
    
    
      if (appearanceIdsError) {
        console.error('Error fetching appearance IDs:', appearanceIdsError.message);
      }
    I then use these returned appearance_Ids to get details on the appearances. One problem arises when a person has too many appearances and I get the URI is too long. I tried creating chunks of data so that everything loads, but could then get that to work with the load on scroll that is implemented into this page. Does anyone have any idea on how to get this to work? right now this works for users who do not have many appearances but we get URI too long for people with a lot of appearances
    g
    • 2
    • 94
  • Client-side error after creating a new project
    e

    Ebenezer Don

    04/18/2023, 10:26 PM
    I had this client-side error after creating a new project today. I took a screenshot of the console error message but can't find it anymore.

    https://cdn.discordapp.com/attachments/1098011591376646315/1098011591556993045/Screenshot_2023-04-18_at_17.32.12.png▾

    n
    s
    • 3
    • 2
1...184185186...230Latest