https://supabase.com/ logo
Join Discord
Powered by
# help-and-questions
  • self-hosted supabase
    k

    Kjell

    01/24/2023, 8:13 AM
    With the transition to cloud, will self-hosted supabase images still be updated every now and then? Especially, the UI; as right now there still exists a couple of bugs.
  • Create new schema for selfhosted
    k

    Kjell

    01/24/2023, 9:01 AM
    Hi all, I can't seem to add a new schema in self-hosted supabase environment. I ended up doing this via postgres directly but now the api isnt updated accordingly. Any clue how this can be done? {'message': 'The schema must be one of the following: public, storage, graphql_public'} Is my studio perhaps outdated? as i read there should be a settings wheel in the bottom left. I did try to pull latest studio version from github though.
  • Recovery mode
    a

    ATorres

    01/24/2023, 9:17 AM
    Been trying to connect to database from my svelte project and couldn't managed to
    v
    • 2
    • 3
  • About json and rpc
    i

    iWeeti

    01/24/2023, 9:37 AM
    I have a plpgsql function that returns jsonb, when I call it in the sql editor of the studio, it works fine, but when I call it from the js client, it doesn't return some values, I wonder what's wrong.
    g
    • 2
    • 9
  • Can't get file_options working to upload file to storage bucket.
    z

    ZacBytes

    01/24/2023, 10:22 AM
    This is the python code I'm using:
    Copy code
    py
    supabase.storage().from_('avatars').upload(filepath, filepath, file_options={"upsert":"true", "contentType":"image/jpeg"})
    However, the file is still being uploaded as a plain/text file and does not overwrite existing files.
    • 1
    • 2
  • Facet search
    w

    wiesson

    01/24/2023, 10:34 AM
    Has anyone build a facet search with supabase? I'm looking for a brief tutorial. My issue is that if I have 6-10 filters (e.g. price, date from, to, relations (countries), ...) I have to fetch the results and the updated filters which results in like 10 queries. I'm used to do that with algolia, but it would be nice to use supabase as well 🙂 I haven't tried GraphQL with supabase, but I guess this would be a usecase!
  • Can you set up a local version of your production DB? Meaning; clone an already deployed DB.
    h

    H3

    01/24/2023, 11:05 AM
    I would like to have a mirror version of my DB locally during development. I've set up a local DB but when I try to link my DB on supabase with my local docker ist just throws an error: I find it very strange that there is no mention of how to achieve this in the docs, is it not common practice to have a local version when developing and then migrate/push changes?
    Copy code
    bash
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x2 addr=0x8 pc=0x104c32bdc]
    s
    l
    • 3
    • 8
  • Auth Redirect URL from Chrome Extension
    d

    Dbugger

    01/24/2023, 11:35 AM
    So, I recently learned that I can decide the URLs that the application is allowed to redirect, after authentication (Pic related). But if I am trying to authenticate inside a Chrome extension... does anyone know what URL I should input, to allow this?
    s
    r
    • 3
    • 2
  • Type safety on payload on real-time subscription to a table
    t

    Tonting Kaloy

    01/24/2023, 12:25 PM
    i have typesafety for almost everything but the realtime subscription. am i doing something wrong or that just the way it is? is there a solution to that? i want to use the type generated by supabase so its sync but idk if its possible
  • Does rls policies override?
    t

    topperspal

    01/24/2023, 12:48 PM
    I created two policies for a table. In the first, I restricted all users for all types of operations using (false) with check(false). In the second, I allowed authorised users to select. Now supabase only allow authorised users to only select from the table and all other operations are restricted. So my question is how policy override works.
    i
    g
    • 3
    • 2
  • client auth with custom JWT
    b

    bitnock

    01/24/2023, 1:32 PM
    Hi, I am trying to authenticate a user on the client with a custom jwt. but session is always null.
    Copy code
    ts
    export const supabase = createClient(supabaseUrl, supabaseAnonKey, {
        global: {
          headers: {
            Authorization: `Bearer ${test_token}`,
          },
        },
      })
    firebase version```js signInWithCustomToken(auth, token)
    Copy code
    my payload 
    ```json
    {
      "sub": "e6870286-5378-4cc5-8641-af2b60051b56",
      "exp": 1674570524,
      "role": "anon",
      "iat": 1674566924
    }
    g
    • 2
    • 6
  • Restricting domains for username/password authentication
    i

    Idicious

    01/24/2023, 1:48 PM
    With the third party auth providers you limit which domains can authorise against your website through the redirect url list. Is there any way to do this for password authentication? I checked, and a signed up user can login via username/password with public api key client library from a non registered domain.
    d
    • 2
    • 2
  • `supabase link` throwing error [panic: runtime error: invalid memory address or nil pointer...]
    h

    H3

    01/24/2023, 1:58 PM
    supabase link --project-ref ********************
    Results in:
    Copy code
    bash
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x2 addr=0x8 pc=0x104bdabdc]
    
    goroutine 1 [running]:
    github.com/jackc/pgx/v4.(*Conn).Config(0x1054ff2b8?)
        /home/runner/go/pkg/mod/github.com/jackc/pgx/v4@v4.17.2/conn.go:382 +0x1c
    github.com/supabase/cli/internal/utils.ConnectRemotePostgres({0x105506720, 0x140006a88c0}, {0x1050bd92b, 0x8}, {0x14000350010, 0x10}, {0x1050bd92b, 0x8}, {0x14000432810, 0x23}, ...)
        /home/runner/work/cli/cli/internal/utils/connect.go:39 +0x234
    github.com/supabase/cli/internal/link.linkDatabase({0x105506720, 0x140006a88c0}, {0x1050bd92b?, 0x14?}, {0x14000350010?, 0x10545ae60?}, {0x1050bd92b?, 0x10478ac28?}, {0x14000432810?, 0x1050a170c?}, ...)
        /home/runner/work/cli/cli/internal/link/link.go:123 +0x48
    github.com/supabase/cli/internal/link.Run({0x105506720, 0x140006a88c0}, {0x16b71f7dc, 0x14}, {0x1050bd92b, 0x8}, {0x14000350010, 0x10}, {0x1050bd92b, 0x8}, ...)
        /home/runner/work/cli/cli/internal/link/link.go:43 +0xac
    github.com/supabase/cli/cmd.glob..func29(0x105b6a880?, {0x1050a9a1d?, 0x2?, 0x2?})
        /home/runner/work/cli/cli/cmd/link.go:32 +0x10c
    github.com/spf13/cobra.(*Command).execute(0x105b6a880, {0x14000880540, 0x2, 0x2})
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:916 +0x5f4
    github.com/spf13/cobra.(*Command).ExecuteC(0x105b6e200)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x35c
    github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968
    github.com/supabase/cli/cmd.Execute()
        /home/runner/work/cli/cli/cmd/root.go:67 +0x2c
    main.main()
        /home/runner/work/cli/cli/main.go:8 +0x20
    s
    • 2
    • 13
  • flutter and 1 to 1 relations
    g

    goldyman

    01/24/2023, 2:00 PM
    I'm a bit struggling to understand how to deal with 1 to 1 relations. more specifically parsing the json from supabase to dart objects. I got that I can make a select like this
    Copy code
    dart
    final response = await _supabaseClient
              .from('gifts')
              .select<List<Map<String, dynamic>>>('*, users:owner(*)')
              .neq(
                'owner',
                _supabaseClient.auth.currentUser?.id,
              )
              .order('created_at', ascending: false);
    and then
    Copy code
    dart response.map(SupabaseGift.fromJson).toList();
    then when using json_serializer i can parse individual fields with specific parsing logic. So I think users in the result will be a list. But I don't want a list of users, I want one user in my gift object. Is there a way to define this in the supabase query? Or this is done automatically? btw owner is a uuid foreign key in the gifts table pointing to users table.
    v
    • 2
    • 4
  • Supabase GUI not showing JSON as type for column?
    p

    pickwickian

    01/24/2023, 5:11 PM
    I have a column I previously created as JSON. But when creating/editing in the select area only JSONB is allowed now. When I edit this column it's blank, because JSON isn't in the list anymore.. Is this a bug or intentional?
    g
    • 2
    • 12
  • Attempting to insert data via read_csv Python Dataframe into Supabase
    k

    KemiteSoul

    01/24/2023, 5:26 PM
    I am attempting to insert data from a csv file into Supabase via a Python dataframe (read_csv). Has anyone attempted this successfully?
    m
    • 2
    • 2
  • Realtime not working with next.js + prisma
    j

    jcurbelo

    01/24/2023, 5:39 PM
    I've followed all the instructions and even read this troubleshoot page for prisma: https://docs-ol21ts3im-supabase.vercel.app/docs/guides/integrations/prisma#troubleshooting but im not receiving any events. * I've enabled Replication to my desired tables * I've enabled Row Level Security to my tables * I also used https://realtime.supabase.co/inspector to see events but still, im not seeing them there this is a snippet of what im trying to do:
    Copy code
    const [channel, setChannel] = React.useState<RealtimeChannel>();
    
      React.useEffect(() => {
        if (channel) {
          return;
        }
        setChannel(
          supabase
            .channel('collections-db-changes')
            .on(
              REALTIME_LISTEN_TYPES.POSTGRES_CHANGES,
              {
                event: REALTIME_POSTGRES_CHANGES_LISTEN_EVENT.ALL,
                schema: 'public',
                table: 'Collection',
                filter: `owner=eq.${uid}`,
              },
              (payload) => {
                console.log({ payload });
                fetchCollections();
              }
            )
            .subscribe()
        );
    
        return () => {
          if (channel) {
            supabase.removeChannel(channel);
            setChannel(undefined);
          }
        };
      }, [channel, fetchCollections, uid]);
    But im not getting any events, even all ws messages seems to be working fine:
    Copy code
    {
      "event": "system",
      "payload": {
        "channel": "collections-db-changes",
        "extension": "postgres_changes",
        "message": "Subscribed to PostgreSQL",
        "status": "ok"
      },
      "ref": null,
      "topic": "realtime:collections-db-changes"
    }
    Am i missing something?
    g
    i
    n
    • 4
    • 70
  • reset password
    e

    eloahsam

    01/24/2023, 6:41 PM
    Hi I need some guidance I’m trying to implement resetpasswordforemail in Nextjs Currently user opens the /forgotpassword route and enters email and submits then I call “resetpasswordforemail” and then email is received and when I click the link I’m ideally suppose to be redirected to “https://localhost:3000/resetpassword” but it redirects to /resetpassword#access
. Is there something I’m missing ? Or methods missing ?
    g
    s
    • 3
    • 11
  • How can I send emails to a service like mailtrap when a user registers?
    c

    Chris.

    01/24/2023, 7:07 PM
    Once a user is registered, a confirmation email is set. Is it possible to send those to Mailtrap.io?
    g
    • 2
    • 3
  • Insert if not Exists?
    l

    luke90275

    01/24/2023, 7:24 PM
    Hi is it possible to insert a row if it doesn't already exist. I.E. insert a user ({username, name, email}) if it that combination does not exist in the users table already? Would that be through an upsert?
    g
    • 2
    • 13
  • can i return the row's data that i just performed a delete on?
    d

    Domcario

    01/24/2023, 7:28 PM
    seems counterintuitive, but just wanted to ask. same way we use
    { data, error}
    when inserting or updating a row
    g
    s
    • 3
    • 8
  • Synchronize Firebase auth with Supabase. How to use both alongside each other in a Flutter app?
    m

    Motivator0732

    01/24/2023, 7:48 PM
    I have a flutter app with >10k sign ups currently using firebase auth. Now I want to add functionality to the app using Supabase. Long term I am planning to migrate everything. But for now, I would like to sign in the users to both Firebase and Supabase so that I can use both in the Flutter app. Has anyone done something like that? A stupid & simple idea would be to create a Supabase account when a user signs in for the first time with the new app version using email+password: {FIREBASE_USER_ID}@dummyemail.com, PW: randomPW (stored in Firestore) Is it possible to synchronize both auth systems? Or is it possible to tell supabase: "Here is a user with the following UserID that's already authenticated using firebase. Please let me use him"?
    g
    i
    m
    • 4
    • 19
  • Error: The "host" request header is not available
    r

    rchrdnsh

    01/24/2023, 7:56 PM
    Using the latest versions of everything in Svelte Kit and getting the following error in the console:
    Copy code
    bash
    Error: The "host" request header is not available
        at isSecureEnvironment (/Users/rchrdnsh/Code/Svelte/RYKR-kit/node_modules/@supabase/auth-helpers-shared/dist/index.js:226:11)
        at Object.setItem (/Users/rchrdnsh/Code/Svelte/RYKR-kit/node_modules/@supabase/auth-helpers-shared/dist/index.js:404:47)
        at /Users/rchrdnsh/Code/Svelte/RYKR-kit/node_modules/@supabase/gotrue-js/dist/main/lib/helpers.js:89:19
        at Generator.next (<anonymous>)
        at /Users/rchrdnsh/Code/Svelte/RYKR-kit/node_modules/@supabase/gotrue-js/dist/main/lib/helpers.js:31:71
        at new Promise (<anonymous>)
        at __awaiter (/Users/rchrdnsh/Code/Svelte/RYKR-kit/node_modules/@supabase/gotrue-js/dist/main/lib/helpers.js:27:12)
        at setItemAsync (/Users/rchrdnsh/Code/Svelte/RYKR-kit/node_modules/@supabase/gotrue-js/dist/main/lib/helpers.js:88:46)
        at SupabaseAuthClient._persistSession (/Users/rchrdnsh/Code/Svelte/RYKR-kit/node_modules/@supabase/gotrue-js/dist/main/GoTrueClient.js:894:43)
        at SupabaseAuthClient.<anonymous> (/Users/rchrdnsh/Code/Svelte/RYKR-kit/node_modules/@supabase/gotrue-js/dist/main/GoTrueClient.js:889:28)
    ...any thoughts as to why this is happening? Thanks XD
    s
    • 2
    • 3
  • Can you connect Supabase/Hasura to Wordpress?
    a

    AntDX316

    01/24/2023, 8:36 PM
    Can you connect Supabase/Hasura to Wordpress? I don't mean just GET requests but the other stuff too like delete and create?
    s
    • 2
    • 50
  • How do I perform a not in query in supabase-py?
    m

    mohnish

    01/24/2023, 8:47 PM
    Using the javascript library, it's very easy to do a 
    not('columnName', 'in', '(values)')
     to perform a 
    not in
     query, however, I haven't been able to do so using the python client. I know that we can perform an 
    in
     query using 
    in_
    , but I would love to be able to perform a not in query too so that our users can query more easily. Any ideas?
    g
    r
    • 3
    • 4
  • Auth emails take time to be shown in the inbox
    k

    karankartikeya07

    01/24/2023, 9:12 PM
    I have integrated the Supabase auth in my website, but the authentication mails take time to be delivered to the user mail inbox. However I checked through the logs and auth database also, confirmation mails are sent immediately from Supabase but doesn't get shown in the inbox. Also the time of receiving in the gmail inbox shows the same as Supabase but it doesn't show upto 3 mins after sending the confirmation link to the user. I also checked signing up in other template applications hosted by Supabase, they appear immediately in my mail but only my website auth mails delays. Any help would be appreciated. Thank you
    k
    s
    f
    • 4
    • 12
  • signInWithX ... and redirect AFTER getting user data - Multi-Tenant Options
    r

    roga

    01/24/2023, 9:18 PM
    Ideally, I'd like to redirect from my root property to a multi-tenant subdomain. In my mind, if I can get auth approval, then route to a custom subdomain based on the data retrieved from the authentication, I can solve this pretty easily. However, you have to provide the
    redirectTo
    options property ahead of the auth request. Anyone have any ideas on how to build this into one function?
    j
    s
    • 3
    • 5
  • Customize Profile when using OAuth Provider
    t

    TaylorFinklea

    01/24/2023, 10:07 PM
    What would be a good way for the user to customize their Display Name and Avatar if they log in with an OAuth provider like GitHub? It seems that users who use a provider like GitHub do not get added to the profiles database.
  • Real-time nested queries
    a

    A-PRYME

    01/24/2023, 10:38 PM
    How do I join tables in a real time query? I'm looking for a realtime equivalent of this..
    g
    • 2
    • 2
  • Can macos be used for development?
    n

    NanoBit

    01/24/2023, 11:43 PM
    Hello, I was wondering if there are any barriers to developing on macOS? My main concern would be supabase cli and whether the Docker containers can be deployed. I saw that postgres has to be manually built in Raspberry arm, so how about macos?
    s
    • 2
    • 5
1...107108109...230Latest