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

    jpsimons

    05/06/2022, 4:17 AM
    I recently set up a very simple analytics tracker on my personal homepage, using Supabase functions. It literally just adds a row to a table for each page view, with host, path, referer, etc. I'd also like to include IP address for possible future coarse-grained geolocation but I'm having trouble actually getting that. In my deployed function, I just get 127.0.0.1 for
    x-forwarded-for
    (which I believe is supposed to have a comma delimited list of every hop), and for
    x-real-ip
    I get null. In local development is seems to give me a real IP address for x-real-ip. Any way to get the "first" IP address in the chain of requests which is the end user?
    n
    • 2
    • 2
  • s

    Studywithdesign

    05/06/2022, 9:01 AM
    Do I have to pay for additional charges every month or it's one time payment. For eg: If I use 101 gb data storage then I have to 25(every month as per docs) but do I also need to pay additional 0.021 dollars every month or it's just one time
    n
    s
    • 3
    • 3
  • s

    samjmck

    05/06/2022, 10:06 AM
    what's the difference between
    with check
    and
    using
    for policies?
    n
    g
    • 3
    • 4
  • u

    uskolol

    05/06/2022, 10:56 AM
    Does anyone have some example repo which uses supabase + graphql combination. Having trouble to get grasp of supabase documentation.
    n
    • 2
    • 7
  • b

    batuhanbilginn

    05/06/2022, 11:47 AM
    Hey guys, are we able to upload files from URL with Supabase?
    n
    g
    • 3
    • 3
  • k

    kaaloo

    05/06/2022, 1:16 PM
    Hi I'm seeing a message
    Failed to invite user: Error inviting user
    when inviting a user in the dashboard or when signing in in our app. The only thing that has changed since yesterday is a colleague updated some of the templates. Could it be that badly formed HTML in these templates could be causing this?
    n
    • 2
    • 4
  • c

    CodeCo

    05/06/2022, 7:18 PM
    Hello πŸ™‚ I was wondering if someone could help me convert this into Supabase's JavaScript SDK format?
    Copy code
    sql
    SELECT 
      *,
      ROW_NUMBER () OVER (ORDER BY timestamp DESC)
    ...
    n
    g
    • 3
    • 3
  • e

    emellum

    05/06/2022, 11:18 PM
    Is there a way to debug when RLS isn't working as expected? I have a simple uid() = id policy. The id in this table is matching what I have in my auth.users user id column, but I do not see records returned. Would like to drill in deeper to see why
    n
    g
    • 3
    • 8
  • b

    benten

    05/07/2022, 1:19 AM
    I have a table that looks like this. Is there a way to construct a query / join that gets the row with a primary key that matches
    document_id
    in a table that matches the
    document_type
    ?
    n
    g
    • 3
    • 18
  • d

    dolmios

    05/07/2022, 3:34 AM
    Hey all, could anyone point me to some reading that could help me with my current project - I've got a large database of financial data that I'd like to aggregate to a single endpoint/database for analytics data (total revenue etc, a collation of the data). Is it better to do this on the fly, or would a function serve best? πŸ™‚
    n
    g
    • 3
    • 5
  • f

    Franck

    05/07/2022, 4:02 AM
    Hi there, I need help on the following issue: I'm using Clerk with Supabase and I'd like my users to upload images. I want to create a bucket for each user and I'm trying to achieve the following thing:
    Copy code
    js
    const { data, error } = await supabase.storage.createBucket(`${userId}-bucket`)
    Where
    userId
    comes from
    useAuth()
    hook from Clerk. Although I'm getting the following error on POST:
    Copy code
    json
    {
    error: ""
    message: "invalid input syntax for type uuid: \"user_28YHvhguBwY5edeBlB6WrD0pKNE\""
    statusCode: "22P02"
    }
    The payload looks like this:
    Copy code
    json
    id: "user_28YHvhguBwY5edeBlB6WrD0pKNE-bucket"
    name: "user_28YHvhguBwY5edeBlB6WrD0pKNE-bucket"
    public: false
    Is it a RLS error?
    n
    g
    • 3
    • 16
  • c

    cbert

    05/07/2022, 7:08 AM
    Hi everyone, is there a way to find out if one's supabase instance supports .channel() already? I'm a bit confused over the state of the new realtime features (https://supabase.com/blog/2022/04/01/supabase-realtime-with-multiplayer-features). Are they available, or is the waitlist to get access to these features? Thanks!
    n
    o
    +2
    • 5
    • 27
  • i

    ikigai

    05/07/2022, 1:03 PM
    I have the same question. Would appreciate if anyone from the team can answer this?
    n
    c
    o
    • 4
    • 4
  • r

    regex

    05/07/2022, 1:15 PM
    Hello, magic link login returns me an error with a message
    Database error saving new user
    what could be the issue that I am missing? What should I look for?
    n
    g
    • 3
    • 3
  • k

    kaaloo

    05/07/2022, 2:50 PM
    Hi all, I'm experiencing a frustrating issue where my local supabase (started with
    supbase start
    ) has really bad latency (order of 20s per request) when my VPN is on. Everything is normal with the VPN off. See for example the following log entries from
    kong
    where the last one took place with the VPN off. You'll see the 20s delay between the OPTIONS and POST requests. Any ideas?
    Copy code
    172.18.0.1 - - [07/May/2022:12:50:27 +0000] "OPTIONS /auth/v1/otp HTTP/1.1" 200 0 "http://localhost:3000/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36"
    172.18.0.1 - - [07/May/2022:12:50:47 +0000] "POST /auth/v1/otp HTTP/1.1" 200 2 "http://localhost:3000/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36"
    172.18.0.1 - - [07/May/2022:13:00:28 +0000] "OPTIONS /auth/v1/otp HTTP/1.1" 200 0 "http://localhost:3000/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36"
    172.18.0.1 - - [07/May/2022:13:00:48 +0000] "POST /auth/v1/otp HTTP/1.1" 200 2 "http://localhost:3000/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36"
    172.18.0.1 - - [07/May/2022:14:35:52 +0000] "OPTIONS /auth/v1/otp HTTP/1.1" 200 0 "http://localhost:3000/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36"
    172.18.0.1 - - [07/May/2022:14:35:52 +0000] "POST /auth/v1/otp HTTP/1.1" 200 2 "http://localhost:3000/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36"
    n
    g
    • 3
    • 4
  • f

    flotTopz

    05/07/2022, 5:19 PM
    hello guys can I ask for help with this issue, thanks. I'm using the update data on the database, thanks
    n
    g
    • 3
    • 7
  • d

    DanMossa

    05/07/2022, 6:06 PM
    How to have multiple Google Client IDs? I'm performing Sign in with Google on iOS and Android. But the audience's are different in the idToken due to needing different client IDs.
    n
    • 2
    • 3
  • d

    Derek

    05/07/2022, 8:15 PM
    Is it possible to generate typescript type definitions for schemas other than public? I have a separate schema for user data (public schema) and business data; would be useful to get type safety on those tables as well!
    n
    s
    • 3
    • 2
  • a

    Albert [tox/cis]

    05/07/2022, 9:51 PM
    I'm completely stuck :/ I've written a helper function called
    is_admin()
    which checks a table where I've stored user ids and roles. All it does is pretty much
    return exists(select * from user_role where "user" = auth.uid() and role = 'admin'
    . In flutter, I tested this and it gives me a true value :). Now, I wanted to apply this to row level policies. It's simple: if someone wants to edit a specific table,
    is_admin()
    just needs to return true however, my requests get rejected all the time. Why?
    n
    g
    • 3
    • 25
  • s

    scon

    05/07/2022, 11:31 PM
    Hi! I have 2 projects with tree tier. Connecting the first database with pgbounce(6543 port) always responds in about 25ms. But connecting the second database with pgbounce responds in about 15secs at first. Then it responds in 25ms. However after 10 minutes without any connecting, it is back to respond in 15secs. it acts like a serverless function's cold & hot loading.
    n
    g
    • 3
    • 3
  • b

    ben

    05/08/2022, 2:59 AM
    Whenever I try to push a large dataset to my database using supabase-py, the request times out and my dashboard becomes unavailable for several minutes. Any ideas on what’s going on, and how to prevent this (besides chunking my data)?
    n
    t
    • 3
    • 20
  • n

    Needle

    05/08/2022, 8:27 AM
    Hello @Wentony! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
  • n

    Needle

    05/08/2022, 8:50 AM
    Hello @Wentony! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
  • s

    samjmck

    05/08/2022, 9:13 AM
    was wondering what would be the best way to implement a webhook type of system when a row gets inserted? e.g. new row is added to profile, I now want to call code to send an email about this new profile to an admin user
    n
    t
    g
    • 4
    • 28
  • a

    Aditya Tripathi

    05/08/2022, 9:54 AM
    Hey, so I am using @supabase/ui package for Auth and supabase-community next package for the helpers/providers on API side of things. Signup is working great but logging in with a password (except magic link) just doesn't do anything. There's a successful request I could see in the network tab but nothing happens afterwards. Would you happen to have any idea of what I could be doing wrong? There are no errors.
    n
    • 2
    • 2
  • n

    Needle

    05/08/2022, 9:56 AM
    Hello @Lars! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
    • 1
    • 2
  • x

    xephyr

    05/08/2022, 10:53 AM
    tl;dr - anyone know why
    maybeSingle()
    errors when 0 rows are returned? I thought that was the whole point of it over
    .single()
    I've got a many:many join table called `teams_users`:
    Copy code
    ts
    id // auto-increment
    created_at // NOW()
    team_id // foreign key teams.id
    user_id // foreign key users.id
    When I do the following:
    Copy code
    ts
    supabase
      .from("teams_users")
      .select("id")
      .match({ team_id, user_id })
      .maybeSingle();
    I get an
    406 Not Acceptable
    error:
    Copy code
    json
    {
      "message":"JSON object requested, multiple (or no) rows returned",
      "details":"Results contain 0 rows, application/vnd.pgrst.object+json requires 1 row"
    }
    The docs are pretty barebones atm so difficult to learn from but includes this quote: > Result must be at most one row (e.g. using eq on a UNIQUE column), otherwise this will result in an error. The
    e.g. using eq on a UNIQUE column
    strikes me as just an example, can
    maybeSingle()
    ONLY be used after passing a primary key in to
    .match/.eq
    ?
    n
    g
    • 3
    • 10
  • n

    Needle

    05/08/2022, 11:23 AM
    Hello @Wentony! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
  • c

    cannedevil

    05/08/2022, 11:25 AM
    Hello everybody πŸ™‚ I have a weird issue where my JWT seems to have it's payload stringified, and sent in the Authorization
    Bearer
    header. but the Session object have the payload (in the
    access_token
    ) just fine? Have anybody encountered this issue? πŸ™‚
    n
    • 2
    • 2
  • j

    jjj.westra

    05/08/2022, 11:34 AM
    Does anyone know how to get additional jwt claims in supabase with keycloak?
    n
    • 2
    • 5
1...267268269...316Latest