https://supabase.com/ logo
Join Discord
Powered by
# help
  • h

    Hal

    06/20/2022, 3:24 AM
    Hi guys, Can I list files in a storage folder by time? (Get all files uploaded after 2022-06-20 12:02)
    n
    • 2
    • 1
  • x

    xyz

    06/20/2022, 5:40 AM
    Can I set up 2FA on my supabase account?
    n
    v
    • 3
    • 2
  • f

    flotTopz

    06/20/2022, 7:24 AM
    How can I use left join statement with a rsl enable?
    n
    s
    e
    • 4
    • 10
  • v

    Vixy88

    06/20/2022, 11:05 AM
    Hi Community! I am new to supabase and could use some help: Building in NextJS and everything is working fine until i try and import
    {supabase} from "../../utils/supabaseClient.js"
    Then I get the following error:
    Copy code
    error - ./utils/supabaseClient.js:1:0
    Module not found: Can't resolve '@supabase/supabase.js'
    > 1 | import { createClient } from "@supabase/supabase.js";
      2 | 
      3 | const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL;
      4 | const supabaseAnonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;
    
    Import trace for requested module:
    ./pages/schedule.js
    n
    s
    • 3
    • 4
  • h

    hko

    06/20/2022, 11:44 AM
    Heya, I'm trying to deploy a function, but getting the following error:
    Error: Failed to create a new Function on the Supabase project: {"message":"Internal Server Error","errorEventId":"374791912db84ece8a38c5c85a65bc8d"}
    The logs explorer doesn't seem to capture that error, and the error message doesn't quite let me hone in on what may be the cause. Any pointers? Thanks!
    n
    s
    • 3
    • 4
  • k

    kudziak

    06/20/2022, 12:14 PM
    Hello everyone im using supabase js client and wonder if there is any possibility to get rid of this indent from !inner() filter my code looks like this
    Copy code
    let { data, error } = await supabase
                .from("questions_answers")
                .select("question_id, answers!inner(*)")
                .in("question_id", questions_ids);
    and i getting response like this:
    Copy code
    [{
        question_id: '11864b50-88a1-44dd-881d-1d63ad1d2067',
        answers: {
          answer_id: '7915fc01-35ee-4053-91ae-75f0e972a1eb',
          answer_name: 'e',
          answer_type: 'text_one',
          answer_correct: true,
          answer_addon: null,
          answer_addon_src: ''
        }
      }]
    and i want to achieve something like this:
    Copy code
    [{
          question_id: '11864b50-88a1-44dd-881d-1d63ad1d2067',
          answer_id: '7915fc01-35ee-4053-91ae-75f0e972a1eb',
          answer_name: 'e',
          answer_type: 'text_one',
          answer_correct: true,
          answer_addon: null,
          answer_addon_src: ''
    }]
    n
    s
    • 3
    • 3
  • l

    LinkPlay

    06/20/2022, 12:59 PM
    Hello guys I was trying to dump my supabase posgres. I was connected using dbeaver and psql at one punt, but now I always end up getting this error trying to connect:
    Copy code
    ➜ psql -h db.asdfasdfasdfasdf.supabase.co -p 5432 -d postgres -U postgres
    
    psql: error: connection to server at "db.asdfasdfasdfasdf.supabase.co" (3.71.XYZ.ASD), port 5432 failed: Connection refused
        Is the server running on that host and accepting TCP/IP connections?
    I know the db is working since I can see it in the supabase frontend and in my application, but I can't connect anymore. I think I inputed the wrong password once, but now I can't even try again? Is my IP blacklisted or something? Anyone got a clue what is going on and how to get unstuck?
    n
    o
    • 3
    • 6
  • t

    trebor

    06/20/2022, 1:50 PM
    Hey yall. I'm having a little trouble with writing RLS policies when using custom auth JWTs. According to this thread (https://github.com/supabase/supabase/discussions/1849), you should be able to write the policy using something like
    auth.someclaim() = mytable.somecolumn
    but when I try to read a custom property of the custom JWT token in the RLS policy editor, I get this error. Any ideas?
    n
    s
    • 3
    • 3
  • d

    Denzo

    06/20/2022, 1:52 PM
    Strangely enough I couldn't find this in either the documentation or within the Discord, but: what App Type do I need to use for Facebook OAuth? 🙂
    n
    m
    • 3
    • 7
  • r

    Rickert

    06/20/2022, 6:17 PM
    gen_random_uuid() doesn't seem to work? I've looked online (ofc) and pgcypto must be enabled which it is.. Anyone an idea? I just want the pk field to auto generate an id on each new entry..
    Copy code
    create table Answer(
      answer_id uuid default gen_random_uuid() not null,
      question_id uuid not null,
      enricher_id uuid not null,
      answer text not null,
      answer_timestamp timestamp default NOW() not null
    )
    n
    • 2
    • 3
  • e

    edouard-harris

    06/20/2022, 6:48 PM
    Hi there! I've been having a bit of trouble getting the
    Content-Disposition
    header to work correctly when using the REST API for storage. Here's a prototypical example, using the Python
    requests
    package. I'm trying to upload the image
    test-image.png
    to the bucket
    my-bucket
    , such that after it's been uploaded, navigating to the image URL will cause the browser to open the image in a preview (as opposed to downloading it):
    Copy code
    requests.post(
            'https://abcxyz.supabase.co/storage/v1/object/my-bucket/test-image.png',
            headers={
                'Content-Type': 'image/png',
                'Authorization': 'Bearer abc123',
                'Content-Disposition': 'inline'
            },
            data=imageFile.read()
        )
    The problem is that, on testing, the image behaves as though I'd set
    'Content-Disposition': 'attachment'
    , and downloads the image instead of opening it in a preview window. Any thoughts on how to fix this? Thanks!!
    n
    g
    • 3
    • 3
  • k

    koakh

    06/20/2022, 6:55 PM
    HI SupaBudies I Follow https://supabase.com/docs/guides/hosting/docker and launch docker-compose up (with and without changing .env file) and stack don't spin up with errors related to db container ex
    Copy code
    ...
    supabase-db | ls: cannot access '/docker-entrypoint-initdb.d/': Operation not permitted
    ...
    supabase-realtime | 2022-06-20 18:45:10.029 [error] Postgrex.Protocol (#PID<0.235.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (db:5432): non-existing domain - :nxdomain
    ...
    and may other related problems I tried two linux machines and same errors occurs I trear down everything but no way
    n
    • 2
    • 2
  • j

    Julien

    06/20/2022, 7:54 PM
    I think that I have a bug with the reset password functionality. When I call: ``js supabase.auth.api.resetPasswordForEmail(email)`` I get the email for resetting my password, but when I click on the link to reset the password, I get ``Missing or invalid credentials.`` See photos in the thread.
    n
    g
    • 3
    • 13
  • n

    nahtnam

    06/20/2022, 9:10 PM
    Hello, quick db question. I'm working on a project where I take a string like this
    Hello world #welcome #message #other
    and store it. Later they should be able to quickly search by the hashtag. However the string is also editable and I can forsee it being edited multiple times in its lifetime. I was initially thinking of having a
    messages
    table and a
    message_tags
    table. However I realize that since the string can be edited and
    #welcome
    can easily become
    #howdy
    , keeping the
    message_tags
    table in sync might be difficult. In this case am I better off just putting a
    tags
    array column on the messages table and indexing it?
    n
    s
    g
    • 4
    • 13
  • j

    jvocodes

    06/20/2022, 11:06 PM
    Hi everyone, I have a question about server-side auth using Express. I have set up the sign up and the sign in functionality and it works just fine. However, after I refresh the page, it appears that the user goes away. How do I make sure that the client knows about the signed in user?
    n
    g
    • 3
    • 3
  • j

    James Q Quick

    06/21/2022, 2:16 AM
    I'm trying to use
    upsert
    with Supabase and am a bit confused. I would expect to pass in an array of items, some of which already exist (have an id/primary key) and some that don't. It works fine if I pass in items that already exist, but when I throw in a new item, the whole thing fails with
    Error: All object keys must match
    . Should that be happening? Am I misunderstanding with my assumption that I can pass a combination of existing/non-existing records?
    n
    g
    • 3
    • 2
  • a

    AlanK

    06/21/2022, 3:08 AM
    I'm using 'auth-helpers-sveltekit' and am confused... I'm expecting that the code
    Copy code
    // src/routes/__layout.svelte
    <script>
      import { goto } from '$app/navigation';
      import { session } from '$app/stores';
      import { supabaseClient } from '$lib/db';
      import { SupaAuthHelper } from '@supabase/auth-helpers-svelte';
    
      const onUserUpdate = async (user) => {
        if (user) await goto('/');
      };
    </script>
    
    <SupaAuthHelper {supabaseClient} {session} {onUserUpdate}>
      <slot />
    </SupaAuthHelper>
    would redirect to Home on a successful login, but nothing happens.
    n
    • 2
    • 4
  • e

    exo

    06/21/2022, 3:50 AM
    Hi everyone, I'm trying to implement a "logout out all sessions" for the app i'm maintaining -- I'm attempting to use the ``/auth/v1/logout`` (server-side) endpoint found here https://supabase.com/docs/gotrue/server/about#post-logout.. However upon calling the endpoint, I get hit with a Server error '504 Gateway Timeout' response from supabase... with a api response of
    Copy code
    json
    {
      "message":"The upstream server is timing out"
    }
    I couldn't find this endpoint in the main docs, so i'm wondering if this is the preferred way for implementing this feature.. I'm extremely open to alternatives if this isn't the best way..
    n
    o
    • 3
    • 7
  • j

    joshcowan25

    06/21/2022, 4:36 AM
    What exactly is the JWT secret and how to use it?
    n
    g
    • 3
    • 2
  • n

    nahtnam

    06/21/2022, 5:35 AM
    If I'm using supabase with next.js and also using the auth helpers library, do I need to initialize a new supabase client or can I reuse the one from the auth helpers?
    n
    s
    • 3
    • 19
  • n

    nahtnam

    06/21/2022, 6:06 AM
    Is there anyone who can help debug why my realtime subscriptions arent working? Code in thread
    n
    g
    • 3
    • 16
  • o

    omar

    06/21/2022, 6:07 AM
    creating or updating records
    s
    • 2
    • 2
  • j

    Jakub

    06/21/2022, 7:02 AM
    hello, anyone else having issue logging into studio? i'm getting 500 from https://api.supabase.io/platform/profile and 500 from https://api.supabase.io/platform/telemetry/page and it doesnt allow me to log in app.supabase.com. Yesterday was working fine, the app work fine also
    n
    n
    o
    • 4
    • 3
  • j

    Jakub

    06/21/2022, 7:07 AM
    ok, i see there is a issue with DNS provider
    n
    o
    • 3
    • 2
  • e

    eshnil

    06/21/2022, 9:15 AM
    Can I get supabase RPC to return data in formats other than json? PostgREST accepts an option like PGRST_RAW_MEDIA_TYPES=text/html and then in my postgresql function, I can do PERFORM set_config('response.headers','[{"Content-Type": "text/html"}]', true); and return a HTML response.
    n
    s
    • 3
    • 2
  • m

    Manny1997

    06/21/2022, 1:01 PM
    I just followed the operation on the youtu video and then this operation appeared
    n
    n
    • 3
    • 4
  • r

    Rickert

    06/21/2022, 1:47 PM
    Not specific to supabase but to postgresql. Is the following even possible?: CAST(n.data AS 'integer'). I want the cast function to cast based on the value of a text value.. I'm afraid it's not possible.
    n
    n
    g
    • 4
    • 4
  • d

    Dembe

    06/21/2022, 2:41 PM
    Hi, is it possible to upload more images/files than just one image in supabase in storage?
    n
    o
    • 3
    • 5
  • h

    Hero

    06/21/2022, 4:12 PM
    Hello, I need help I can not make a login or sign up page I m trying to make will looking video from YouTube channel Teta but its not working I m following for days same thing but its not working I need help.
    n
    g
    • 3
    • 2
  • p

    PHANTOM KNIGHT

    06/21/2022, 4:51 PM
    Hello People, I am trying to make a testing app and I want to implement one to many relationships, for example: I've two tables
    Company
    and
    Trucks
    , A company can buy many trucks and I want to link each truck with that company, can someone tell me how to do that
    n
    g
    • 3
    • 5
1...288289290...316Latest