https://supabase.com/ logo
Join Discord
Powered by
# help-and-questions
  • Dockerfiles for docker-compose.yml
    b

    beist

    01/29/2023, 12:08 PM
    Hello, I would like to self-host all supabase components, but I’m using render.con and here I need to provide Dockerfiles instead of being able to use the docker-compose.yml has anyone have those Dockerfiles already prepared somewhere? Or will I need to create those myself? Is this usecase so rare? I found nothing related to that when researching my “issue” online.
    s
    • 2
    • 2
  • How to handle or manage - botManagment
    g

    Guus Iwanow

    01/29/2023, 12:20 PM
    Hi Guys! I'm building an app and started working on the login flow but at random i now seem to get 401 responses on verifyOTP calls. When looking at the "Api Edge Network logs" i see some red numbers under (botManagement -> score: 48, clientTrustScore: 48) my expectation is the botManagement is seeing me as a bot. Is there some way to add a exclusion for my home IP?
    g
    • 2
    • 2
  • SvelteKit & SupabaseAuth: Login does't save the account in cookies
    m

    mrmikardo

    02/07/2023, 12:24 PM
    I'm having this problem too, I believe. @User did you resolve this issue in the end?
  • Slow Database connection
    t

    thecatatafish

    01/29/2023, 1:46 PM
    I'm completely new to Supabase and I'm thinking of migrating my project over. But I have a full backend build with FastAPI in Python that I wanted to connect to the Postgres database on Supabase as the first step. So basically using Supabase as a hosted database for now. However fetching data from the database is much slower than fetching from my AWS RDS database. My server is a simple EC2 instance, is this simply because of the latency between AWS and Supabase or is there something I'm missing? I'm connecting directly to the database using psycopg
  • FunctionsFetchError when querying edge functions
    i

    iamallin

    01/29/2023, 3:34 PM
    Suddenly my app is running into this error. It was working fine before. Is this something related to Supabase servers being down? Not sure how to resolve this beyond just waiting for the Supabase team.
  • Serve multiples Edge Functions
    l

    Lucass

    01/29/2023, 3:47 PM
    I was wondering if there was a way to serve locally multiple edges functions
    g
    a
    +2
    • 5
    • 6
  • I just wiped my whole database and still can't delete auth users
    j

    Jaaneek

    01/29/2023, 3:51 PM
    I can't delete auth users despite deleting every record from database & storage. Any ideas?
    g
    • 2
    • 6
  • `FATAL: bouncer config error` when trying to connect to pgbouncer using psql
    s

    Strikerzs

    01/29/2023, 5:08 PM
    I'm trying to connect to pgbouncer using
    psql
    (and ultimately use it in Mikro ORM). I can connect to pgbouncer using the default databases
    postgres
    using `psql`:
    psql -h ... -p 6543 -d postgres -U postgres
    , however, if I change the database to my own database
    psql -h ... -p 6543 -d my_database -U postgres
    I get:
    Copy code
    psql: error: connection to server at "..." (...), port 6543 failed: FATAL:  bouncer config error
    connection to server at "..." (...), port 6543 failed: FATAL:  bouncer config error
    I have pgbouncer enabled on my dashboard. How can I fix this?
  • User Invite & PW reset links in email renders `No API key found in request`
    n

    natespilman

    01/29/2023, 8:16 PM
    When I invite myself via email to create an account via the
    Authentication > Users
    page, the link I am emailed does not render, and instead throws the following error - `{"message":"No API key found in request","hint":"No
    apikey
    request header or url param was found."}` Once I've landed on the page, though, my
    User
    now shows as verified, but I've never set my password. When I send myself a password reset email, I get the same error. Does anyone know how I can resolve this? re: the
    No API key
    error, I'm using Supabase for db, and I'm having no issues.
    g
    j
    • 3
    • 11
  • Need to update column with all the file names in the storage folder.
    i

    Irfan Ahmed

    01/29/2023, 8:32 PM
    Hi Guys, I am inserting a couple of images from flutter to the user directory in public storage, I want to update a column "image_path" from the table called "listings" on successfully uploading of the file(s). What is the function I have to write to trigger it on storage insert.
    g
    • 2
    • 7
  • Failed to delete users
    g

    GKL

    01/29/2023, 8:32 PM
    Hi, I'm trying to delete users from my auth panel, but whenever I do so it says failed to delete users
    g
    • 2
    • 9
  • First authentication request fails after db reset
    c

    Cody

    01/29/2023, 9:03 PM
    After running
    supabase db reset
    which re-runs my migrations and applies the
    seed.sql
    file, which includes a few test users. The very first time I try to authentication with any of the users, I get the following error:
    Database error querying schema
    . And in the
    auth
    logs, I see this
    Copy code
    {"component":"api","level":"info","method":"POST","msg":"request started","path":"/token","referer":"http://localhost:3300/","remote_addr":"172.27.0.1","time":"2023-01-29T21:01:57Z","timestamp":"2023-01-29T21:01:57Z"}
    {"component":"api","error":"error finding user: FATAL: terminating connection due to administrator command (SQLSTATE 57P01)","level":"error","method":"POST","msg":"500: Database error querying schema","path":"/token","referer":"http://localhost:3300/","remote_addr":"172.27.0.1","time":"2023-01-29T21:01:57Z","timestamp":"2023-01-29T21:01:57Z"}
    The user does exist because if I resubmit the same credentials just moments after the first attempt, it authenticates fine. Any thoughts?
    • 1
    • 1
  • Reactjs how to display 'user exists' message
    d

    declanmiddleton

    01/29/2023, 9:53 PM
    how would i write this logic?
    Copy code
    js
      e.preventDefault();
    
        try {
          const { data, error } = await supabase.auth.signUp({
            email,
            password,
          });
    
          if (error) throw error;
    
          // the issue is here, how do i write this properly.
          if (error.status === 409) {
            alert("user already exists");
          } else {
            throw error;
          }
    
          alert("signup successful");
          navigate("/login");
    
          console.log(data);
        } catch (error) {
          console.log(error);
        }
      };
    g
    • 2
    • 20
  • Can't save with user ID. Prisma with Supabase Auth for small voting app
    f

    fsargent

    01/29/2023, 10:22 PM
    I'm happy to consider how I'd do this with just Supabase, and scrap Prisma, but I'm just not sure how to do that.
    e
    • 2
    • 8
  • Making a field unique through the web interface
    d

    Dbugger

    01/29/2023, 10:23 PM
    Is it possible to make a field being unique through the web interface? All I see is the ability to make it a primary key, but that is not exactly the same, no?
    g
    • 2
    • 2
  • error trying to connect: dns error
    p

    Peach-Flavored Snark

    01/29/2023, 11:32 PM
    Tad unsure of what to do here, as I'm running the following command:
    Copy code
    supabase functions serve hello-world
    I'd like to run some of these edge functions on my local supabase instance for debugging and dev work, but I'm running into this odd issue.
    Copy code
    error: error sending request for url (https://deno.land/std@0.168.0/http/server.ts): error trying to connect: dns error: failed to lookup address information: Temporary failure in name resolution
        at file:///home/deno/functions/hello-world/index.ts:5:23
    My first instinct was to google and stare at the post below: https://github.com/denoland/deno/issues/6061 It sounds like I need to set the HTTP_PROXY and HTTPS_PROXY as environment variables? If that is the case, what values should I be inputting for them?
    g
    • 2
    • 15
  • Firebase Data Migration to Supabase - 0 records written
    v

    Vince

    01/30/2023, 1:44 AM
    This is supposed to be trivial but I couldn't migrate all the collections from Firebase to Supabase. I'm following the article below: https://supabase.com/docs/guides/resources/migrating-to-supabase/firestore-data I added
    supabase-service.json
    and
    firebase-service.json
    to the
    firestore
    folder. However, I can't seem to dump the collections already. The collections.js script correctly I identified that I have 3 collections, but 0 records were written to the collections json file I created so I can't import the JSON to Supabase at all.
    Copy code
    (base) Vincents-MacBook-Pro:firestore vincentlu$ node collections.js
    customers
    products
    recordings
    (base) Vincents-MacBook-Pro:firestore vincentlu$ node firestore2json.js audioExampleExpoCollection
    0 records written to audioExampleExpoCollection.json
    (base) Vincents-MacBook-Pro:firestore vincentlu$
    Any insight that might help here?
    g
    • 2
    • 3
  • Firebase Storage Migration to Supabase - SyntaxError: Unexpected token 'export' upon upload!?
    v

    Vince

    01/30/2023, 2:22 AM
    Following this: https://supabase.com/docs/guides/resources/migrating-to-supabase/firebase-storage I managed to downloaded the Firestore storage bucket to a local filesystem (
    download
    folder in
    ./storage
    ). However when I ran the upload script it complained that
    export
    is an unexpected token, which I think came from
    supabase-keys.js
    which is copied from
    supabase-keys-sample.js
    . I kept
    supabase-keys-sample.js
    because I figured I might keep an original copy in case something goes wrong. If the scripts can be fixed, that would be great, because I didn't touch
    supabase-keys.js
    other than entering the project URL and the service_role key. Otherwise, what went wrong here?? Here's the command I tried below:
    Copy code
    (base) Vincents-MacBook-Pro:storage vincentlu$ node upload.js "" downloads <bucket name I created>
    /Users/<path>/firebase-to-supabase/storage/supabase-keys.js:14
    export const keys = {
    ^^^^^^
    
    SyntaxError: Unexpected token 'export'
        at wrapSafe (internal/modules/cjs/loader.js:984:16)
        at Module._compile (internal/modules/cjs/loader.js:1032:27)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
        at Module.load (internal/modules/cjs/loader.js:933:32)
        at Function.Module._load (internal/modules/cjs/loader.js:774:14)
        at Module.require (internal/modules/cjs/loader.js:957:19)
        at require (internal/modules/cjs/helpers.js:88:18)
        at Object.<anonymous> (/Users/<path>firebase-to-supabase/storage/upload.js:41:23)
        at Module._compile (internal/modules/cjs/loader.js:1068:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    (base) Vincents-MacBook-Pro:storage vincentlu$
    g
    • 2
    • 2
  • React Strict Mode Auth Bug
    s

    sean.s

    01/30/2023, 2:56 AM
    Seems like there are issues with the way effects are used in the auth helpers library. I've been stuck with this bug for a while: https://discord.com/channels/839993398554656828/1066872657544486963/1066872657544486963 where even the auth helpers example repo doesn't work. By poking around in the network tab I found two requests were being made to the
    /auth/v1/user
    , which made me think it could be a react strict mode issue. Disabling strict mode does in fact eliminate the issue in the video linked above. Curious if this is some issue with my project configuration or if it's a known incompatibility/bug with the auth-helpers repo?
    g
    • 2
    • 4
  • Return a row of nulls from a function
    a

    AlanK

    01/30/2023, 4:26 AM
    I have this function that I call from my app:
    Copy code
    CREATE OR REPLACE FUNCTION public.get_agent_for_user(id_input UUID)
        RETURNS TABLE(agent_name text, agent_mobile text, agent_phone text, created_at timestamptz)
        LANGUAGE 'plpgsql'
        COST 100
        VOLATILE SECURITY DEFINER PARALLEL UNSAFE
        ROWS 1000
    
        SET search_path= public
    AS $BODY$
    
    begin
        return query select coalesce(a.agent_name, 'Null') as agent_name, 
            coalesce(a.agent_mobile, 'Null') as agent_mobile, 
            coalesce(a.agent_phone, 'Null') as agent_phone, coalesce(a.created_at, NULL) as created_at from public.agent a inner join
            (select property_rented from public.property_profile p inner join public.user_property_profile_join up
            on p.id = up.property_id where up.user_id = id_input) upj on a.id = upj.property_rented;
    
    end;
    $BODY$;
    When I call the function from javascript I get an undefined object as a result (if there is no Agent for the property). Is there a way I can get the function to return a row with NULLs, or empty strings, instead of a null?
  • Twitter OAuth only working for twitter that created keys
    t

    TradeUpCards

    01/30/2023, 7:00 AM
    I'm testing OAuth on localhost and it's only working for the twitter account that created the OAuth keys. Other accounts get error Error+getting+user+email+from+external+provider
    s
    • 2
    • 11
  • Vault Extenstion Missing
    s

    Sagron

    01/30/2023, 7:28 AM
    Hi guys. for some reason i can not find the Vault extension in my extensions page. i tried install it via the SQL Query Editor but it faild saying that the extension does not exist. Any thoughts?
    g
    u
    +2
    • 5
    • 8
  • Create a new branch db on each PR (for vercel preview deployments)
    e

    Einar Persson

    01/30/2023, 8:16 AM
    Hi! I use SvelteKit deployed on Vercel. The Vercel-github-integration automatically creates a Vercel deployment on each PR which is great. I can both manually inspect and run E2E-tests using Playwright. When all checks have run I can safely merge into main which deploys the site. This workflow is very lightweight and works well for my purposes. What I would like is for Supabase to mimic the behaviour of Vercel, i.e. create a temporary db for each new PR (using migrations in the branch) so that I run E2E-tests against a deployed vercel preview version and a deployed "supabase preview version". I suspect this behaviour is not supported currently, but I wonder if it is on the radar? Vercel PR preview deployments are great, but they become close to useless (?) without a guaranteed to be in sync with any migrations in the PR. I saw this > Developers should be able to "fork" a database at any point. This is particularly important for Jamstack developers who run deployments for every Git branch. from https://supabase.com/blog/supabase-series-b Maybe I misunderstand this, but it sounds close to what I am after? -- Summary: 1. Is this supported? 2. If not, is this being worked on or planned? 3. If not, do you see a way of achieving this on my own? Eg. could I use the CLI to create a new temporary project for each PR (in a github workflow) and delete it on close?
    s
    m
    • 3
    • 5
  • when using await req.json() edge function fails
    d

    draco

    01/30/2023, 8:45 AM
    As the title mentions when I try to follow the code example here: https://github.com/supabase/supabase/blob/master/examples/edge-functions/supabase/functions/browser-with-cors/index.ts I get a result of
    res is not defined
    . hAs anyone seen this? It goes await if I don't use the await but then I can't access the request body passed into the function.
    j
    • 2
    • 2
  • How to extract first frame from video and upload it as a thumbnail image?
    l

    Lukas V

    01/30/2023, 9:06 AM
    Hello, I am trying to upload a video and then use the first frame of that video as a thumbnail and create a separate upload for it as well. I am using react, are there any supabase methods for this stuff, or can i use something in the client to achieve this?
    g
    o
    u
    • 4
    • 4
  • Adding additional claims to the JWT generated by user authentication.
    j

    JamesB

    01/30/2023, 9:26 AM
    I need to add additional claims to the JWT returned by the user authentication API. How do I do that on Supabase?
    g
    e
    • 3
    • 6
  • OpenID Connect provider
    j

    JamesB

    01/30/2023, 9:31 AM
    We want to use an OpenID Connect authentication provider not included in the authentication suite (https://supabase.com/docs/guides/auth/overview). The provider I need to use is called Vipps (https://vipps.no), whom is a Norwegian payment service. Their OpenID Connection implementation guide can be found on https://vippsas.github.io/vipps-developer-docs/docs/APIs/login-api, and their Open ID Connect API documentation can be found on https://vippsas.github.io/vipps-developer-docs/api/login.
    g
    • 2
    • 4
  • is there a way to combine db views and functions from supabase-js?
    b

    bilals

    01/30/2023, 10:28 AM
    I am looking into how to return results based on users current location. How would i achieve this with the supabase-js library(query builder). This is a gist of what i am trying to achieve: > SELECT v1.* FROM my_custom_view1 AS v1 WHERE location_function(v1.geo, {longitude}, {latitude}); > This is what i am trying to get working on client side: > supabase > .from('my_custom_view1') > .select(
    *
    ) > .match({ > `location_function(geo, ${location.longitude}, ${location.latitude})`: > true > }) I am getting this error: > { > code: "42703", > message: "column my_custom_view1.location_function does not exist" > } Anyone have similar use case and can help me on this?
    g
    • 2
    • 6
  • Reset password always redirect to localhost:3000
    y

    YokoWasis

    01/30/2023, 11:48 AM
    For some reason the reset password link always have redirect to localhost:3000 for some reason. Even tough I set the redirect to option, for some reason, it's not being honored. Make no mistake. The link is working, the token is working. the email is working. It's just the redirect link that's wrong. Any solution? nvm : I need to add the url manually to supabase.com/auth/url-configuration
    h
    g
    • 3
    • 2
  • Create Session after Validate Email?
    e

    Evostance

    01/30/2023, 12:21 PM
    My user flow looks like this 1) Create User via Auth 2) Validate Email 3) Complete Profile (create row in profile table) What I'm finding is that when a user validates their email, there isn't a supabase session, so I cannot complete 3 without the user signing in again. This isn't a great user experience. Is there a way to automatically set the user session after they validated their email using the redirect URL?
    g
    • 2
    • 11
1...113114115...230Latest