https://supabase.com/ logo
Join Discord
Powered by
# help-and-questions
  • loading
    h

    Ho3einvb

    02/16/2023, 8:21 AM
    Inside this page and when we want to manually change the values, it is loading
    s
    • 2
    • 4
  • SSL certificate option is no longer showing
    r

    Ritesh

    02/16/2023, 11:54 AM
    Hi Everyone, Earlier there was an option to download SSL certificate for the database. Now, that option is no longer there.
    g
    • 2
    • 4
  • How to manage Auth through Third party app (like Coda).
    n

    Neil Savin

    02/16/2023, 1:22 PM
    Hi ! I’m making a Coda Pack (extension for Coda). They give these different way of getting auth through their extension :  https://coda.io/packs/build/latest/guides/basics/authentication/ but I have no idea how to manage this with Supabase Auth. Any help would be great. Thank you very much
    • 1
    • 1
  • How to see generated sql query?
    r

    rem

    02/16/2023, 2:44 PM
    Is there any way, even if it means manually hacking the node_modules, to see the generated postgres SQL query that's being sent to the database? I've got supabase.from queries being built but it's not returning rows which means my expectations doesn't match up with how I think the queries are being constructed.
    g
    • 2
    • 1
  • Update Auth roles / restrict users from logging in
    d

    drewbie

    02/16/2023, 3:06 PM
    I'm trying to come up with a way to block users from logging in / accessing information on my app. Is there a way to add a custom auth role to a user eg (banned vs authenticated) which would carry over to RLS policies that look for anon and authenticated roles? I have a lot of RLS policies set up already and I am trying to come up with a solution that is a single change that makes it so a user can no longer access things an authenticated or anon role auth user could access. Thanks
    g
    • 2
    • 6
  • password reset svelte
    l

    Lar

    02/16/2023, 3:28 PM
    Hello, I spun up the svelte auth example. I see users in the table. However, I am unable to log in with any of the sample users. From the users list, I send a password reset. I click on the link and it takes me to the original screen with the login button rather than a password reset form. Can anyone recommend a boilerplate repo that is more complete? Thank you
    s
    • 2
    • 4
  • Shared bucket for all users
    a

    aRosales

    02/16/2023, 3:51 PM
    Hello everyone, I've made an app with React making a bucket and the template "Give users access to only their own a top level folder named as uid", so each user can upload and delete their own photos. I was wondering if there was a template too so everyone can upload images to a common bucket and each user can delete their own and only their own images. Like a profile section to delete them and a common place to show them all like Instagram 😄 Thank you!
    g
    • 2
    • 2
  • Creating table failed
    h

    Hugos

    02/16/2023, 4:45 PM
    I'm not sure why it fails but it fails, reason is in the screenshot among with table information, is this not something i can create?
    g
    s
    • 3
    • 20
  • I accidentally upgraded the wrong project to Pro. Is it possible to Undo that?
    r

    ramr

    02/16/2023, 4:52 PM
    We have separate projects for staging and prod environment. I accidentally upgraded the staging project to Pro. Is there a way to undo that?
    g
    • 2
    • 3
  • Magic links not working
    n

    nateland

    02/16/2023, 5:12 PM
    Hi guys - about 10% of my users are complaining that magic links don't work for them. It doesn't initialize the session correctly. This only happens to this 10% though. Any thoughts as to why? My logs are attached (so there is an error), but these users are telling me they're opening the link almost as soon as they get it, so it can't be a time out. Not sure what to do...
    i
    g
    • 3
    • 75
  • Quickish question on foreign key relations and deletions
    i

    InASunshineState

    02/16/2023, 5:14 PM
    I hope this isn't too silly, but I totally understand the role of foreign key relationships in terms of joining tables and it being a kind of "pact" so the database engine knows it can trust the data types and values, and not have to deal with ambiguity. So I also then understand why you can't easily do joins without them. But it seems like if you have, say, user IDs on a "profiles" table and other table that also reference that user's ID through a foreign key relationship, that you should be able to independently remove just those records that reference "profiles". Every piece of info I come across says, well, profiles is the source, if you delete that row there you can delete everything with a cascade. I definitely don't want to kill off the source -- I just want to remove some feeder rows that use it, so that the database can be scrubbed of test data on those feeder rows. I know there's a "security definer" for bypassing RLS but it doesn't seem like (for probably good reason for data integrity) there's a bypass for foreign keys. Do I need to reset the relationship backwards? Or is there a mechanism to temporarily release the keys to perform a delete and set them back to what they just were?
    g
    • 2
    • 11
  • Change permissions on a materialized view
    a

    aar2dee2

    02/16/2023, 5:15 PM
    I have a postgres function
    add_new_query
    that reads from the
    profile
    table and inserts into 2 tables
    search_query
    and
    search_response
    . This worked fine until I created a materialized view that reads from
    search_query
    ,
    search_response
    and 1 other table. The materialized view is refreshed using a trigger function
    refresh_search_feed
    that is called every time there is an
    INSERT
    ,
    UPDATE
    or
    DELETE
    on any of the three tables that used to create the view. When I call the postgres function
    add_new_query
    via
    rpc
    , I get the error:
    Copy code
    sql
    Error occurred in function add_new_query: must be owner of materialized view search_feed
    I tried to change the owner of the materialized view with
    ALTER materialized view search_feed OWNER to authenticated;
    but this throws the following error:
    Copy code
    sql
    permission denied for schema public
    I guess this is happening because the materialized view is created as a table? Is there a workaround?
    • 1
    • 1
  • Edge functions vs Postgresql functions?
    u

    Unknown Member

    02/16/2023, 5:30 PM
    Are they the same thing, or Edge function is specific to Supabase and likewise with Postgresql function?
    g
    k
    • 3
    • 9
  • Realtime subscription to storage schema?
    j

    joshuabaker

    02/16/2023, 5:43 PM
    Is it possible to get realtime updates when files are uploaded/deleted/etc.?
    g
    • 2
    • 70
  • can i use invoke method on supabase-js library for edge functions with custom domain?
    b

    bilals

    02/16/2023, 5:45 PM
    i am wondering how to call my edge function with my custom domain name and if the supabase.functions.invoke() method is only for db functions only? Anyone has experience with these?
  • Error locally debugging edge function?
    k

    Ken

    02/16/2023, 6:05 PM
    Team, I am trying to develop the hello-world edge function locally: I ran this command: supabase functions serve hello-world --debug The screenshot is what i was shown: error: Module not found "file:///home/deno/functions/hello-world/index.ts". Platform: macOS I installed deno via brew; I was worried it being missing was the problem.
    g
    • 2
    • 7
  • Failing to install supabase CLI - conflict
    l

    Lar

    02/16/2023, 6:45 PM
    I am trying to install supabase CLI with https://github.com/xulioc/sveltekit-supabase-dashboard.
    Copy code
    Larry@ASUS MINGW64 /c/__repos/_sv/supabase/sveltekit-supabase-dashboard (main)
    $ npm install supabase --save-dev
    npm ERR! code ERESOLVE
    npm ERR! ERESOLVE could not resolve
    npm ERR!
    npm ERR! While resolving: sveltekit-supabase-dashboard@0.1.0
    npm ERR! Found: @sveltejs/adapter-auto@1.0.0-next.80
    npm ERR! node_modules/@sveltejs/adapter-auto
    npm ERR!   dev @sveltejs/adapter-auto@"^1.0.2" from the root project
    npm ERR!
    npm ERR! Could not resolve dependency:
    npm ERR! dev @sveltejs/adapter-auto@"^1.0.2" from the root project
    npm ERR!
    npm ERR! Conflicting peer dependency: @sveltejs/kit@1.7.0
    npm ERR! node_modules/@sveltejs/kit
    npm ERR!   peer @sveltejs/kit@"^1.0.0" from @sveltejs/adapter-auto@1.0.3
    npm ERR!   node_modules/@sveltejs/adapter-auto
    npm ERR!     dev @sveltejs/adapter-auto@"^1.0.2" from the root project
    npm ERR!
    npm ERR! Fix the upstream dependency conflict, or retry
    npm ERR! this command with --force or --legacy-peer-deps
    npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
    npm ERR!
    npm ERR!
    npm ERR! For a full report see:
    npm ERR! C:\Users\Larry\AppData\Local\npm-cache\_logs\2023-02-16T18_39_53_904Z-eresolve-report.txt
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\Larry\AppData\Local\npm-cache\_logs\2023-02-16T18_39_53_904Z-debug-0.log
    • 1
    • 1
  • Reduce size of NextJS Middleware?
    m

    mansedan

    02/16/2023, 6:48 PM
    Hey Team, We are using NextJS + Supabase for auth, and have a
    middleware.js
    file to handle some protected routes. We are essentially using the strategy from the Supabase docs here: https://supabase.com/docs/guides/auth/auth-helpers/nextjs#auth-with-nextjs-middleware The issue we are running into is that when running page speed tests the chunk for this file is being listed as 'Reduce unused JS' because of the size of the file. Is there a way to reduce this file size that we are overlooking? Here is our final middleware.js file for reference:
    Copy code
    js
    import { NextResponse } from 'next/server'
    import { createMiddlewareSupabaseClient } from '@supabase/auth-helpers-nextjs'
    
    // This function can be marked `async` if using `await` inside
    export async function middleware(request) {
        const res = NextResponse.next()
        // Create authenticated Supabase Client.
        const supabase = createMiddlewareSupabaseClient({ req: request, res })
    
        // Check if we have a session
        const {
          data: { session },
        } = await supabase.auth.getSession()
    
        // Auth condition not met, redirect to login page.
        if(!session) {   
            const redirectUrl = request.nextUrl.clone()
            redirectUrl.pathname = '/login'
            redirectUrl.searchParams.set(`redirectedFrom`, request.nextUrl.pathname)
    
            return NextResponse.redirect(redirectUrl)
        }
      
        return res;
    }
    
    // See "Matching Paths" below to learn more
    export const config = {
      matcher: [
        /*
         * Match all request paths except for the ones starting with:
         * - api (API routes)
         * - _next/static (static files)
         * - _next/image (image optimization files)
         * - favicon.ico (favicon file)
         */
        '/((?!api|_next/static|_next/image|favicon.ico|login|profile|signup).*)',
      ],
    
    }
    o
    • 2
    • 2
  • base64 Image Storage Issue
    n

    Notorious T.I.M.

    02/16/2023, 6:56 PM
    I've implemented the base64 method for uploading an image to storage but the file uploaded isn't what I'm expecting. I imagined that I'd end up with a file just as if I'd dragged and dropped it into the Studio; what I'm actually getting is a file with the correct filename, size, extension, and
    publicUrl
    , but it's not an image. The `publicUrl `just renders a small white square (the browser doesn't register an image there), the downloadable file from Studio isn't recognised as an image file in my OS, and there is no preview image in Studio. How can I get from base64 data to a file in storage that is functional - i.e. I can see the image at it's
    publicUrl
    ? This is my upload function -
    payload
    is just the
    arrayBuffer
    data
    Copy code
    const { data, error } = await supabase.storage
      .from(bucket)
      .upload(`${path}${filename}`, payload, {
        contentType: "image/png",
        upsert: true
    });
    t
    g
    • 3
    • 2
  • Help cloning supabase from github
    p

    pers0n

    02/16/2023, 8:07 PM
    Im trying to clone supabase from github and I am having some trouble. I followed the developers guide (https://github.com/supabase/supabase/blob/master/DEVELOPERS.md). My git, node, and npm are all up to date. I fork and then clone the repo. I install turbo (
    npm install turbo
    ) and get a big list of errors (too big to post in this message. I can send in txt file if you need), but from what I can tell its complaining about the installation of
    libpg-query
    so I run
    npm cache clean --force
    and then re run
    npm install
    , but it still gives me the same errors. ok. So I disregard the turbo install errors and try to just run
    npm run dev:docs
    and I get another big error and it fails. The error pretty much says that a required package
    @next/mdx
    could not be found. so I check my package.json for it and its in there
    "@next/mdx": "^12.0.4"
    . I dont know if Im following the wrong guide or missing a crucial step, but when I try to install the dependencies I am just bombarded with errors. Also I tried on a different machine and am getting the same results so this isn't an underlying issue with the packages on my specific machine. Any advice helps, thanks!
  • Can you create a custom oauth provider?
    h

    Headless

    02/16/2023, 8:21 PM
    Are you able to create a custom oauth provider? I am using nextjs and have been experiencing issues with next-auth by implementing a custom provider without a .well-known. So i am curious if I am able to implement custom providers with supabase?
    s
    b
    • 3
    • 4
  • Supabase Functions not showing up
    w

    WeedleChamp

    02/16/2023, 9:09 PM
    So I think I'm experiencing a bug (or a brainfart). Under Database -> Functions I only see the "IN ALPHA" warning and none of the functions I have uploaded. I keeep uploading new functions, and still they will not show. I AM able to attach them to Triggers though. I have logged out/ logged in/ refreshed several times over the last hour and still the problem persists. Help!
    g
    s
    • 3
    • 13
  • What happened to Supabase Workflows?
    b

    benjamin_dobell

    02/16/2023, 10:51 PM
    https://github.com/supabase/workflows Was it canned/postponed? Honestly I don't really need this much functionality, however I could really benefit from long running function support - they don't need to be "on the edge". Basically just want serverless workers.
  • I can't get the ID of the user returned after creating the user
    a

    aunum

    02/16/2023, 10:56 PM
    Hello, I would like to sign up a user and have the user ID returned to me. However, whenever I use an api call, such as
    supabase.auth.signUp
    or
    supabase.auth.signInWithOtp
    the return values are empty:
    Copy code
    const { data, error } = await supabase.auth.signInWithOtp({
      email,
      options: {
        emailRedirectTo: getPropertyRedirectURL(redirectTo),
        createUser: true
      }
    })
    
    console.log("data", data)
    // data { user: null, session: null }
    The user gets created in the database, but no return value.
    g
    • 2
    • 4
  • Realtime
    s

    Smiley

    02/17/2023, 12:00 AM
    Either for self-hosted or cloud, is there any information on how scalable the real-time part is?
  • Realtime channels and filters
    d

    DanMossa

    02/17/2023, 12:19 AM
    The goal is to listen in on Postgres changes with RLS enabled and filtering on specific column values. I see these two ways https://supabase.com/docs/reference/dart/stream but it's not clear what the benefit of the channel name is when listening to Postgres changes and not using presence or broadcast. I'm also unsure how to go about using the
    in
    filter. My code seems to work when I use the
    eq.
    filter and changing the channel name doesn't seem to change anything. Also, my
    messages
    and
    chat_rooms
    table both have RLS with the correct settings for what I want. This is my existing code:
    Copy code
    dart
      void subscribeToChat(String accountUserId, Iterable<int> chatRoomIds) {
        print("Subscribed to rooms and messages");
        _supabase.channel('public:messages:$accountUserId').on(
          RealtimeListenTypes.postgresChanges,
          ChannelFilter(
            event: 'INSERT',
            schema: 'public',
            table: constants.Table.messages.name,
            filter: 'chat_room_id=in.(${chatRoomIds.join(',')})',
          ),
          (payload, [ref]) {
            print('New message received: ${payload.toString()}');
          },
        ).on(
          RealtimeListenTypes.postgresChanges,
          ChannelFilter(
            event: 'INSERT',
            schema: 'public',
            table: constants.Table.chat_rooms.name,
            filter: 'user_id=eq.$accountUserId',
          ),
          (payload, [ref]) {
            print('New room received: ${payload.toString()}');
          },
        ).subscribe();
      }
    g
    • 2
    • 2
  • Is it okay to upload supabase folder from CLI with migrations directly to github?
    d

    DYELbrah

    02/17/2023, 12:37 AM
    Are there any security concerns with having your migration files in Github? It's a private repo so it shouldn't be too big of a deal. It wouldn't be the same as storing your service_key right?
    s
    • 2
    • 1
  • Failed to invite user: failed to make invite request: Database error saving new user
    o

    ohadpr

    02/17/2023, 12:56 AM
    Noticing I have a
    handle_new_user
    function which tries to write to a table that no longer exists...
    s
    • 2
    • 2
  • SSL Handshake failure - EPROTO
    n

    nitehawk

    02/17/2023, 1:19 AM
    My service checks the supabase backend several times a day, and I noticed a couple of failures in the logs with these kinds of messages:
    Copy code
    2023-02-16T23:58:15.014 app[16e79027] waw [info] "message": "FetchError: request to <my supabase url> failed, reason: write EPROTO 139692654376896:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1546:SSL alert number 40\n",
    Any idea what causes this? this is a regular GET that succeeds many times a day usually.
  • State / Scope of Supabase client in front end app?
    u

    Unknown Member

    02/17/2023, 1:37 AM
    Hey guys, a quick question. In terms of the lifecycle of supabase client in a front end framework like React, Vue, Angular.. is the state of the client persistent as a singleton instance throughout the life cycle of the front end app, or does it create scoped instance/connection every request made to the database?
    s
    • 2
    • 4
1...134135136...230Latest