https://supabase.com/ logo
Join Discord
Powered by
# help-and-questions
  • CORS header missing
    v

    ven

    04/30/2023, 3:12 AM
    Hi I followed the example given here (https://supabase.com/docs/guides/functions/cors) and I my edge function is so -
    Copy code
    // @ts-ignore: module not found
    import { serve } from "server";
    // @ts-ignore: module not found
    import { corsHeaders } from "../_shared/cors.ts";
    // @ts-ignore: Deno linting
    let SLACK_WEBHOOK_URL = "";
    
    // connect to slack API
    serve(async (req: Request) => {
        // This is needed if you're planning to invoke your function from a browser.
        if (req.method === "OPTIONS") {
            return new Response("ok", { headers: corsHeaders });
        }
    
        // if the request is not POST, return 405
        if (req.method !== "POST") {
            return new Response("Method not allowed", { status: 405 });
        }
    ...
    but i still get the error

    https://cdn.discordapp.com/attachments/1102069834994425966/1102069835120246844/CORS_error.png▾

    g
    s
    +2
    • 5
    • 17
  • How to increment/decrement from existing data ?
    и

    иuғe

    04/30/2023, 3:55 AM
    I have user table with credits column I want to increment user credits by 10 on the existing credits they have , how ? this doesn't works

    https://cdn.discordapp.com/attachments/1102080782350172230/1102081940049371296/image.png▾

    g
    • 2
    • 4
  • Are Supabase Auth emails limited even with custom SMTP?
    d

    dave

    04/30/2023, 5:19 AM
    Just wondering if the 100/hr limit still applies if it’s my mail server. 🙂
    • 1
    • 1
  • Can't delete the bucket
    m

    MarkoLainovic

    04/30/2023, 8:25 AM
    Hey all, this is pretty silly, probably, but why can't I delete the bucket? I am pretty sure I typed in the name correctly.

    https://cdn.discordapp.com/attachments/1102148777051168840/1102148777227337830/image.png▾

    g
    • 2
    • 3
  • Webhook is not being triggered
    m

    Muezz

    04/30/2023, 9:58 AM
    I have a webhook that is triggered when a particular table is updated and it calls an Edge function. This flow was working perfectly a few days back but it is not working anymore. When I update the table manually, the webhook and, in turn, the edge function do run but when that table is updated form the front-end, the webhook is not being triggered. I am not sure how to even debug this. Can anyone guide me on what to do here?
    g
    • 2
    • 2
  • Can't access the bucket
    m

    MarkoLainovic

    04/30/2023, 10:16 AM
    Hey y'all, I am trying out some basic stuff with buckets and I am not sure what I'm doing wrong. So I want to access my bucket and I've been trying to do it like this:
    Copy code
    const supabase = createClient(supabaseUrl, supabaseKey)
      const { data, error } = await supabase
        .storage
        .getBucket('images')
      if (error) {
        res.status(400).json({ error });
      } else {
        res.status(200).json({ data });
      }
    and the policy in my public bucket is:
    Copy code
    (bucket_id = 'images'::text)
    alas, I am getting an error:
    Copy code
    {
      "error": {
        "name": "StorageApiError",
        "message": "The resource was not found",
        "status": 400
      }
    }
    Any ideas?
    g
    • 2
    • 7
  • Join table from public to auth.identities
    d

    DevoryLIVE (Greg)

    04/30/2023, 10:16 AM
    Hi we making a app and we search for join in 1 querry result for loop in map in view react
    Copy code
    js
    const { data: catchData, error: catchError } = await supabase
                        .from('FiakomonCatch')
                        .select(`
                      *,
                      Fiakomon: fiakomonID (
                        *,
                        Rarity: rarity (*)
                      )
                    `)
                    .eq('twitchID', user?.identities[0].id);
    we use this for return all Catch and in this sql table we have 2 collum channelID and userID and i want to return the auth.identities equal to this id for dont create a twitch api on catch map loop for get the display name of user if you have a idea who i can make this 😁 and we have try to create relation but can not because the auth.identities id is not unique
    g
    • 2
    • 2
  • I want my default value to be an empty arrayf or a text array column, but ``[]`` does not work.
    h

    Hugos

    04/30/2023, 11:51 AM
    Like the title says I have a column that is an array of type text and I want the default value to be an empty array. This is easier to work with when retrieving the data because its still iterable that way.
    g
    • 2
    • 2
  • version control system
    i

    iStun4Fun

    04/30/2023, 2:18 PM
    I've got a technical question involving a more creative approach, if I need a posting control version that creator should make and editor should review before publishing I need something like db control version? Or can i put the table with 3 extra fields, like description0/description1/description2? So the editor after creator submits, can comment and suggest for changes (will happen same as description but with comments1;2;3) And both see all the changes was made in private but in the public post it will only shows the last version available.
    • 1
    • 1
  • Migration & Schemas
    r

    Razil

    04/30/2023, 3:05 PM
    Hello, I have a question: I started building my database locally with
    supabase start
    , now I have it in a state that I want to
    push
    it to remote, linked instance but I cannot see how you do that. How I can generate a SQL file with the schema from my
    public
    table into the local
    supbase
    folder?
  • failed to create pg.columns: must be owner of event trigger pgsodium_trg_mask_update
    c

    Crazy Unicorn

    04/30/2023, 3:22 PM
    Hey there. So I had this simple table in supabase and I just wanted to add a column so I can store the pseudo of my users... But I had an error that I didn't understand: "failed to create pg.columns: must be owner of event trigger pgsodium_trg_mask_update" or something similar So after trying again and again I just deleted the entire table entitled "users", it's just a draft for my first project anyway, and while trying to recreate it I have the same error... (screenshot attached) I have no clue of what is happening so any help is appreciated, also let me know if more information is needed.

    https://cdn.discordapp.com/attachments/1102253586936774796/1102253587356209243/image.png▾

    g
    r
    • 3
    • 2
  • When uploading to a storage bucket I get the following error code: 403
    h

    Hugos

    04/30/2023, 4:14 PM
    Using the js client im trying to upload a file, this should only be possible by admins so I added the following policy to my storage bucket (see screenshots) However when trying to upload and console.logging the error from the reponse I get:
    Copy code
    js
    {
      statusCode: '403',
      error: '',
      message: 'permission denied for schema storage'
    }
    Anyone know why this is happening?

    https://cdn.discordapp.com/attachments/1102266631691980891/1102266631889109134/image.png▾

    g
    • 2
    • 19
  • FlutterFlow and Supabase Social Auth
    b

    BladeRunner_K

    04/30/2023, 6:07 PM
    If anyone uses FlutterFlow with supabase I’ve been hunting for a way to add social provider auth as a method. FlutterFlow currently appears to support only email with (which is fairly mind boggling for how much work it required to add supa and explicitly code email as a limited option) -
    b
    • 2
    • 1
  • Auth UI not redirecting
    l

    Lord of Nork

    04/30/2023, 6:32 PM
    Is anyone else struggling to get redirects working locally? The Auth UI component isn't triggering redirect on email sign-in.
    s
    c
    • 3
    • 2
  • read only
    u

    0xDisciple

    04/30/2023, 6:56 PM
    Hello I have run the following command SET default_transaction_read_only = 'off'; but this doesn't work. It stays read-only. Even if I put it between begin and commit. How do I get my db out of read only mode? default transaction read only is set to off when I read it from the db and the db is not in recovery mode. What is preventing me from making changes to the db?
    s
    • 2
    • 1
  • c# community sdk and pg_notify
    j

    Jon

    04/30/2023, 7:53 PM
    Hi there, I’ve been trying to subscribe to channel notifications in my c#, up in supabase I’ve got a table trigger and function setup which executes a pg_notify to send a broadcast ( from my understanding) yet my C# doesn’t seem to be getting them. My first question is Can the channel subscription approach receive pg_notify broadcasts ?? And if it can Is there an example anywhere ?
    g
    • 2
    • 15
  • Unable to issue local cert
    d

    dylan

    04/30/2023, 9:39 PM
    Hey! I'm getting the error code
    UNABLE_TO_GET_ISSUER_CERT_LOCALLY
    when I try to read from my database using the supabase-js client. I installed the SSL certificate from my dashboard and haven't had this issue before, as I've run a few projects on Supabase before. Any suggestions on what I could do? The only code I'm running is
    supabase.from('casts').select('*').limit(100)
    after creating a Supabase client.
  • how to store user after logging in using providers to mongodb
    a

    Ammar Almuain

    04/30/2023, 9:46 PM
    I'm just asking how to store the user to momgo db
    o
    • 2
    • 6
  • Migrating from Auth0 - PHP client?
    e

    edent

    04/30/2023, 10:22 PM
    I'd like to use SupaBase for social login on my website. Is there a PHP library which is recommended? I saw what looked like an experimental one from the community, and one which did email authentication. But I couldn't find an oAuth one. Thanks!
    g
    • 2
    • 1
  • supabase cms: function list
    j

    jstansbe

    04/30/2023, 10:47 PM
    I've successfully added a SQL function in the sql editor. I was expecting to see the function appear in the same area that lists tables and views but didn't see it. Where can i view all the functions ive added?
    • 1
    • 1
  • Import maps works locally but fails on Github action
    v

    ven

    04/30/2023, 11:33 PM
    I am trying to use Github actions to deploy my edge functions. The import maps works locally but github actions errors out . please see attached. Import the libraries and cors headers into the function worked with github action. can @thorwebdev create a video with import maps? tia

    https://cdn.discordapp.com/attachments/1102377155410804827/1102377867033190520/github_action_fails_import_maps.png▾

    • 1
    • 1
  • What happened to the default project view?
    n

    nitehawk

    05/01/2023, 12:13 AM
    I used to be able to see the latest connection stats, e.g. the number of requests per 5 minutes, allowing me to gauge the traffic quickly. Now it's gone, what happened?

    https://cdn.discordapp.com/attachments/1102387402997235762/1102387403282456726/image.png▾

    s
    g
    • 3
    • 3
  • Suddenly unable to INSERT using js client.
    s

    sudoramen

    05/01/2023, 1:14 AM
    I'm able to insert rows just fine in the dashboard but when I try to insert using
    supabase-js
    , I get this error:
    {"code": "XX000", "details": null, "hint": null, "message": "http_request.content is NULL"}
    . This is a recent situation that's occurring with code that has proven to work before. Could there be an external situation with my account causing this issue?
    g
    • 2
    • 2
  • Keeping project API anon/public key a secret?
    d

    dave

    05/01/2023, 2:09 AM
    If I don't expose the anon/public key anywhere in my frontend, and only use it on my backend, will this allow me to basically whitelist user signups in my backend?
    g
    • 2
    • 2
  • Decoding `TokenHash`?
    d

    dave

    05/01/2023, 3:15 AM
    With superbase-js, how can I decode or log in myself using the
    TokenHash
    from a Magic Link?
    • 1
    • 1
  • partial return from supabase function
    h

    Hartaithan

    05/01/2023, 4:41 AM
    My function for reorder elements: create or replace function reorder(payload json) returns setof games language sql as $$ update games as p set order_index = x.order_index, status = x.status from ( select id, order_index, status from json_populate_recordset(null::games, payload) ) as x where p.id = x.id returning p.*; $$; How do I make this function return only updated data (id, order_index, status) ?
    g
    • 2
    • 1
  • WebAuthn Provider Support
    f

    Franck

    05/01/2023, 4:52 AM
    Have you planned on integrating WebAuthn as an authentication provider? https://webauthn.guide/ Thanks
    g
    • 2
    • 2
  • User wants to change his email, but he can't because of connected Google and GitHub accounts
    d

    Dominik

    05/01/2023, 9:39 AM
    One of our users is registered via his email "test@example.com". He would like to change it to "test2@example.com" but he can't because supabase tells there is already a user with this email (although there isn't). The problem I'm assuming: his user account (which is using test@example.com) also has a Google and GitHub account connected which are using "test2@example.com" which now restrict him to change the email of his user account. Sadly I can't even manually edit the entries in the "auth.identities" table so I'm a bit stuck helping our user here. Any suggestions?
    u
    g
    • 3
    • 4
  • Understanding the Application of Server-side and Client-side Code Execution and Real-time Broadcast
    w

    Weykon

    05/01/2023, 11:31 AM
    1. I want to understand clearly which parts of the code are run on the server-side and which are run on the client-side when using Next.js with Supabase in conjunction with Vercel. 2. regarding the payload and send functions in Supabase Realtime Broadcast feature, how can I enable the client to send its own data without sending all the data of other users on the same channel? 3. I have some confusion regarding the understanding of broadcasts, and I'm not clear on the difference between using the
    on
    and
    subscribe
    functions for channels.
  • Question on Apple oauth Setup for Mobile (iOS)
    s

    Sonny Vesali

    05/01/2023, 11:49 AM
    Hi I'm attempting to setup native apple login, and I'm getting errors in my app, which is leading me to think it's a problem in my setup of the process, I've come across a few resources from supabase (https://supabase.com/docs/guides/auth/social-login/auth-apple) and (Mark Burrgraf YouTube)

    https://www.youtube.com/watch?v=6I2JEky20ME▾

    , but I can't figure out what I did wrong, here is the relevant information. 1. I've made sure to enable my app as the primary id in the app id part of the setup. 2. I've created a services_id but I'm not sure what to put into that screen when it asks for the urls given it doesn't accept by primary bundle id as a parameter neither my supabase project v1/auth/callback link. I would love for it to be native, so the user doesn't have to go into the in app browser to login via apple, but either way is fine. I just get a
    invalid_client
    error on my mobile component. Any guidance on what to put for redirect urls would be very helpful. I've seen in some docs that the service_id is only necessary if you have some web interface, and that if I were to use the native sign_in_with_apple function I would only have to get my bundle_id part working, but I have a feeling that all the steps are necessary when fitting this in with supabase. Source on what I just said https://pub.dev/packages/sign_in_with_apple

    https://cdn.discordapp.com/attachments/1102562334360219758/1102562335287152700/Screenshot_2023-05-01_at_6.31.06_AM.png▾

    https://cdn.discordapp.com/attachments/1102562334360219758/1102562335903711262/Screenshot_2023-05-01_at_6.43.00_AM.png▾

1...197198199...230Latest