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

    anand

    10/18/2021, 6:56 AM
    How do I fix this? The function definitely exists
  • m

    mikebarkmin

    10/18/2021, 7:14 AM
    maybe you called it wrong. Be sure that you use the sames keys as you defined as params for the function.
  • l

    letourpowerscombine

    10/18/2021, 8:27 AM
    I'm trying to do the "entries to the user table are created in profiles table with avatar" example. Users are being added just fine via auth, but nothing is happening in the public
    profiles
    when users are added. This is after running the User Management Starter script. Any ideas / troubleshoots?
  • l

    letourpowerscombine

    10/18/2021, 8:49 AM
    Ah, I'd missed running the trigger, as described here: https://supabase-cheatsheet.vercel.app/docs/auth/public-profiles-table
  • s

    silentworks

    10/18/2021, 11:16 AM
    When to create the user profile
  • j

    jonmeyers

    10/18/2021, 11:34 AM
    https://twitter.com/_dijonmusters/status/1449720098877489154?s=21
  • e

    erik_flywheel

    10/18/2021, 4:57 PM
    Hey everyone, I'm calling the api for a specific record (using ?id=eq.#) and the api is returning an array. Is there a way to get a single record response?
  • s

    Scott P

    10/18/2021, 5:01 PM
    The JS lib has
    .single
    and
    .maybeSingle
    functions. I believe these set the
    Accept
    header (https://postgrest.org/en/v8.0/api.html#singular-or-plural) - set it to
    application/vnd.pgrst.object+json
    to get a single item. Note that this will only work if there's only 1 exact match. Perhaps combining it with the
    limit
    parameter (https://postgrest.org/en/v8.0/api.html#limits-and-pagination) would help ensure it'll always return exactly 1 item as an object.
  • e

    erik_flywheel

    10/18/2021, 6:17 PM
    let me try these. Thanks!
  • r

    Rafa2021

    10/18/2021, 9:47 PM
    Hi i am getting an error 401 after 1 hour with a JWT token error, i have seen some users in the forums who experienced the same issue but not sure what is the right solution?
    s
    • 2
    • 8
  • s

    silentworks

    10/18/2021, 10:43 PM
    JWT token error
  • p

    Psymin

    10/19/2021, 1:28 AM
    are you using environment variables? Perhaps 1 approach that might work is to create a .env.local and a .env.prod files, and enter in your API key and URL in those files
  • p

    Psymin

    10/19/2021, 1:29 AM
    I was trying to deploy a Next.js app via Vercel yesterday, and encountered this error msg when deploying. Is this a result of the env variables not getting read properly?
    s
    • 2
    • 4
  • s

    silentworks

    10/19/2021, 1:41 AM
    Vercel Next.js app not deploying
  • b

    boby

    10/19/2021, 10:03 AM
    Hey, guys! 👋 Is there any "good practice" around keeping dev/stage/prod dbs in sync in supabase. I'm still developing my app and I have a supabase db called -dev. I currently write all my sql statements by hand, so that I'll be able to create a prod db once I'm done developing by simply running the sql there. But, once I create the prod db, I wonder if there's any easy way to keep both synced (migrations, etc?). Thanks!
  • p

    Puru

    10/19/2021, 10:15 AM
    Trying to use supabase js client in cloudflare workers, and I found out it uses cross-fetch which doesn't work with cloudflare workers. I found patch-package example, but doesn't work. The webpack example is promising, but I can't replicate the
    externals
    property in
    esbuild
    . How can I make it work with esbuild as the bundler?
  • p

    Puru

    10/19/2021, 10:19 AM
    Also, can supabase please move to using node-fetch or something which might work in CF Workers?
  • j

    jonhelge

    10/19/2021, 10:25 AM
    Are there any ways to get logs from supabase? We have a fastapi application running on aws app runner that connects directly to the postgres database. After a few minutes of inactivity it looks like the connection is dropped. 2021-10-19T10:51:27.324+02:00 2021-10-19 08:51:27,324 INFO sqlalchemy.pool.impl.QueuePool.db-pool-logger Invalidate connection (reason: OperationalError:server closed the connection unexpectedly 2021-10-19T10:51:27.324+02:00 This probably means the server terminated abnormally 2021-10-19T10:51:27.324+02:00 before or while processing the request. 2021-10-19T10:51:27.324+02:00 )
  • j

    Juraj

    10/19/2021, 10:27 AM
    Hi. I guess I need your help. I use Supabase with Twilio and when I verify the phone number with
    verifyOTP
    I get an empty user in response. Has anyone solved it yet?
  • k

    khacvy

    10/19/2021, 11:06 AM
    Got your point but why we need to sync the data between dev and prod ? I think it should be separate, right ?
  • c

    chipilov

    10/19/2021, 11:19 AM
    Hi @User , I personally would love to see some more prescriptive tutorials (read: best practices) and deeper dives around the following topics: - DB migrations and keeping different environments (e.g. test and prod) in sync; - DB schema design for use-cases where the DB itself handles much of the logic that is usually implemented in an application server (for example, the PostgREST docs mention that a good idea is to put all the data in a private schema and then expose it ONLY via views or functions in the public schema: https://postgrest.org/en/v8.0/schema_structure.html?highlight=isolation#schema-isolation) - best practices for authorization and authentication - most apps need authorization ON TOP of authentication. I've seen some people do that with the auth.users table itself (not recommended as far as I understand, because it's harder to revoke permissions BEFORE JWT expiration) while others use a separate table
  • c

    chipilov

    10/19/2021, 11:22 AM
    I've seen the same question floated a few times, here are some resources relevant to it: - https://github.com/supabase/supabase/discussions/134 - https://supabase.io/blog/2021/03/31/supabase-cli#migrations - https://dev.to/sruhleder/how-to-migrate-supabase-databases-with-flyway-github-actions-2ani
  • c

    chipilov

    10/19/2021, 11:23 AM
    @User just mentioned something about his migrations in the #839993398554656831 channel, and I pinged him about it, hopefully he will follow up with some more details
  • b

    boby

    10/19/2021, 11:28 AM
    @User Thank you for these! 🙏 I'm gonna dive deeper into the topic now 🤓
  • c

    chipilov

    10/19/2021, 2:18 PM
    I forgot to mention - tips about how to debug Postgres functions would be great
  • s

    Sayan Nath

    10/19/2021, 2:58 PM
    Hi! Can anyone help me how can I achieve the search functionality like Instagram with Supabase Current Code
    Copy code
    let { data, error } = await supabase_connect
          .from("Users")
          .select("name, username, verified, image_url")
          .ilike("name", `%${req.body.name}%`)
          .range(req.body.skip, req.body.limit);
    Tried
    .textSearch()
    but it didn't worked out what actually I wanted.
  • g

    Gaurav

    10/19/2021, 3:35 PM
    Hey, realtime is not working on certain column when using it on per row basis.
    Copy code
    const doesItWork = supabase
          .from(`tab:slug=eq.${slug}`)
          .on('*', payload => {
            console.log('Change received!', payload)
          })
          .subscribe()
  • g

    Gaurav

    10/19/2021, 3:35 PM
    Here is how slug column looks in my table
  • c

    chadyj

    10/19/2021, 6:40 PM
    Help! My app just launched but users are reporting
    Rate limit exceeded...
    errors that block signup. I couldn't find any mention of this in the docs, and couldn't even debug this. Any ideas?
    s
    g
    c
    • 4
    • 8
  • s

    silentworks

    10/19/2021, 7:22 PM
    Rate limit exceeded
1...112113114...316Latest