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

    addisonschultz

    05/31/2022, 9:00 AM
    Hey everyone 🙂 I'm having a weird issue where supabase is returning the incorrect data from my table.. I think it has to do with the
    type
    I have set for the column, but I'm not sure. Basically, in a table I have
    numeric
    column set. An example number in this column would be
    3458764526524427914
    When I retrieve the number (via JS client), I send something like this:
    Copy code
    const { data, error } = await supabase
        .from("table-name")
        .select()
    The returned value for the expected column is returned as
    3458764526524428000
    You can tell that it's the same number from the first half, but the last 4 digits are rounded up (to
    8000
    ). In fact, this is the case with all of the numbers in my table (returned as rounded numbers) I have also tried this with
    int8
    as a column type, and it is giving me the same issue. Also interestingly enough, when the column is a
    numeric
    type, the data/numbers (in the supabase table UI) look correct (but are returned wrong), and when the column is a
    int8
    type, the data/numbers look incorrect (rounded) in the supabase ui (and are returned incorrectly (rounded) What am I doing wrong??
    n
    g
    • 3
    • 6
  • y

    Yllik

    05/31/2022, 9:40 AM
    Hi everyone 🙂 ! Supabase newbie taking his first steps here! How can i set up a default view in the Table editor ? Here is my issue -> I would like to have the same column order (visualy), for everyone who have access to the project. I can manage that manually on my own account but this can get lost, and is only available for me. Did i missed anything ? Thx!
    n
    s
    • 3
    • 8
  • a

    Adi

    05/31/2022, 3:18 PM
    I am using supabase inviteByEmail API from node backend I see invite link sent to email but if user clicks on invite link first time and fails to set password during second time he will not get access token (Note: accept invite link navigates user to password set page) it is showing some error how to handle that case?? If user clicks on same link again then he will be unable to click on same link as access token will not be present in url
    n
    m
    • 3
    • 3
  • n

    Needle

    05/31/2022, 3:44 PM
    Hello @pocin! 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
  • p

    pocin

    05/31/2022, 3:51 PM
    getting 502 An invalid response was received from the upstream server after updating JWT token expiration via UI. Dashboard postgres logs show
    An invalid response was received from the upstream server
    n
    m
    b
    • 4
    • 9
  • b

    Bicijay

    05/31/2022, 4:34 PM
    Hey guys, is there any ping or heartbeat method on the JS client? I would like to ping the supabase server every x seconds and show a screen to the user if he does not have internet or dns problems
    n
    m
    g
    • 4
    • 4
  • a

    abraxas

    05/31/2022, 5:06 PM
    So has anyone experienced issues with the OAuth on Safari? We can't get it to work on either desktop or mobile. The strange thing is that sometimes it works as intended, about 1/10 time. No one have any experience with this?
    n
    m
    • 3
    • 12
  • t

    taj

    05/31/2022, 7:11 PM
    Hey Team, I kind of went public with my production instance today (yay!) ... but I want to duplicate my app so there's a separate dev and preview instance... can someone point me to info on how to do this without effing up my production instance?
    n
    b
    • 3
    • 5
  • d

    dbristow

    05/31/2022, 7:32 PM
    Trying to change my user ID from INT to UUID. Keep getting an error stating that Postgres doesn't allow this conversion. Any idea on how to help? Don't have any data to migrate just to need change the data type
    n
    g
    • 3
    • 3
  • a

    Ape R Us

    05/31/2022, 7:46 PM
    hey, Im using svelte and supabase im trying to build a ticketing website so on the homepage all the events would show but in the backend i only want the events to show up that is specific to the user id
    Copy code
    import supabase from '$lib/db';
    import { user } from '$lib/stores/auth';
    export const get = async () => {
        try {
            const id = user?.id;
            const { data: events, error } = await supabase.from('event').select('*').eq('user_id', id);
            console.log(user);
            if (error) throw error;
            return {
                body: {
                    events
                }
            };
        } catch (e) {
            console.log({ e });
        }
    };
    Im storing the user in a svelte store
    Copy code
    export const user = writable(null, (set) => {
        set(supabase.auth.user());
        const subscribe = supabase.auth.onAuthStateChange((_, session) => {
            session ? set(session.user) : set(null);
        });
        return () => {
            subscribe.data.unsubscribe();
        };
    });
    anyone have any ideas how to fix this?
    n
    s
    • 3
    • 7
  • k

    kresimirgalic

    05/31/2022, 8:52 PM
    hey guys, whats the best solution to make something like this, i will try to explain as much as possible: - user will create company, and inside the company profile he can add employees - employees are basically registered profiles table - inside the company profile, user will have the choice to add members what i tried is to push the uuid to array, but the problem is how to populate those uuid with profile data to show full name, avatar etc i've attached the design so you can get a visual idea, same thing is with benefits, i want to connect benefits with company profile. what would be the best solution?
    n
    g
    • 3
    • 5
  • s

    Sagieq

    05/31/2022, 9:48 PM
    Hi guys, I need some help on this, Is there a way to request database order by "name" Bash method?
    n
    g
    • 3
    • 5
  • o

    oxlory

    05/31/2022, 10:40 PM
    Hello, I saw you are working on a web3 integration https://github.com/supabase/gotrue/pull/282 but I wonder if this will also allow users to login with an email as well, sort of merging email + web3? Edit: nvm I figure I’ll be able to do it with the middleware, is there any ETA for the Eth auth release?
    n
    o
    • 3
    • 3
  • i

    ian_

    05/31/2022, 10:44 PM
    hey, I want to connect to Zapier. How could I connect my supabase to zapier so I can use supabase functions with zapier?
    n
    • 2
    • 3
  • u

    (d,f,g)=> 🥁

    05/31/2022, 11:54 PM
    is it possible to call
    .order()
    an a
    .rpc()
    request? the types seem to allow it, but then when the request goes through in the browser I get an error:
    Copy code
    js
    { message: "column pgrst_source.created_at does not exist", code: "42703", details: null, hint: null }
    n
    g
    • 3
    • 7
  • l

    lumen

    06/01/2022, 1:13 AM
    Error: "permission denied for schema public" when trying to use a trigger function on a table created by Prisma Hi! I'm trying to use Prisma with Supabase Auth. I have defined my own public
    profile
    table in Prisma, where I want to store all my custom data:
    Copy code
    model profile {
      id        String   @id @default(cuid())
      createdAt DateTime @default(now())
      updatedAt DateTime @updatedAt
    
      email     String   @unique
      stripeCustomerId String? @unique
    }
    Now I want to create a trigger function that runs every time the user signs up with Supabase auth. It looks like this:
    Copy code
    begin
      insert into public.profile(id, email)
      values(new.id, new.email);
    
      return new;
    end;
    And I set up a trigger to run it every time a user is INSERTed into
    auth.users
    . Now when I try to sign up with Supabase Auth, I get an error "Database error saving new user", and when I look at Postgres logs, it says "permission denied for table profile". It worked perfectly fine when I created tables manually via Supabase UI, it stopped working when I tried to create tables with Prisma. What have I done wrong? How can I fix this?
    n
    j
    +2
    • 5
    • 9
  • l

    lumen

    06/01/2022, 2:20 AM
    Why can't I use a capitalized table name in my posgres trigger function? Hi! I'm trying to set up my own public
    Profile
    table that holds custom data for my users. Every time a user signs up with Supabase Auth and is INSERTed into
    auth.users
    table, I want to run a trigger function that adds the user to my
    Profile
    table. Everything works well when my table is called
    profile
    and the function looks like this:
    Copy code
    begin
      insert into public.profile(id, email)
      values(new.id, new.email);
    
      return new;
    end;
    But now I want to capitalize the profile table name. I rename the
    profile
    table into
    Profile
    , and change the function to this:
    Copy code
    begin
      insert into public.Profile(id, email)
      values(new.id, new.email);
    
      return new;
    end;
    And it stops working, I'm getting an error: > relation "public.profile" does not exist Do you know what am I doing wrong? It's like postgres doesn't see that I have capitalized the table name when I'm referring to it in my postgres function.
    n
    g
    • 3
    • 4
  • s

    selique

    06/01/2022, 4:31 AM
    Hi guys if someone can help me out on
  • n

    nahtnam

    06/01/2022, 7:39 AM
    Hello, I'm trying to follow the next.js auth helpers guide and I have everything set up exactly how the readme states, but wherever i do
    useAuth
    , I get this error:
    Error: The request to /api/auth/user failed
    and the error is
    error: "No cookie found!"
    in the network inspector. Any ideas why?
    n
    s
    • 3
    • 6
  • s

    Sagieq

    06/01/2022, 11:11 AM
    Hello, I'm trying to fetch all data and it limits to 1000 and I have 1300+, I'm in Free Plan - Is this the reason? or I'm doing something wrong 🥺
    n
    c
    • 3
    • 4
  • p

    Peanut

    06/01/2022, 12:48 PM
    Why is my database server performance almost non responsive? My memory is high but not THAT high
    n
    g
    • 3
    • 5
  • j

    Jan Tennert

    06/01/2022, 1:49 PM
    Hey I have here a table with user profiles and a table called "products". A product can be created by a user and the other users can retrieve this product. Now the other users should know by which user the product was created. Obviously you just put the user id in there but if the other users would want the username from creator they would have to make a rest call which is not ideal. Should I just store the username in the product row itself or whats a good solution there because the username can be always updated
    n
    s
    • 3
    • 6
  • r

    reed

    06/01/2022, 7:03 PM
    Hi! I'm having issues redirecting from magic link signup to an "auth required page". The redirect happens even though the user has signed in/up successfully. Has anyone experienced this? I'm using the
    useUser()
    hook from
    supabase-auth-helpers
    n
    l
    • 3
    • 2
  • t

    tinus

    06/01/2022, 7:35 PM
    Hi all, I'm running into a problem that I can't seem to figure out. When trying to login/register I'm getting a CORS error talking to the auth endpoint. I'm using
    nuxt/supabase
    . From my localhost (http) everything is working as expected. Anyone know if I might have a problem with my setup. An example link can be found here: https://www.bouwplaats.nu/login https://www.bouwplaats.nu/register If anyone has a suggetion what's wrong in my setup it would be really appreciated.
    n
    g
    • 3
    • 3
  • t

    theuknowner

    06/01/2022, 8:04 PM
    Hello, I have self hosted Supabase. Is it mandatory to decouple database from middleware or can I use it as is? I don't care about downtime on upgrade of instance.
    n
    • 2
    • 1
  • g

    Gnee

    06/01/2022, 9:55 PM
    Hi, is there some way to upload a blob from the camera (in React Native) to storage?
    Copy code
    // capturedPhoto.uri is file URI
    const reponse = await fetch(capturedPhoto.uri);
        const blob = await reponse.blob();
    
        const { error: uploadError } = await supabase.storage
          .from("fr8s")
          .upload(`/content_uploads/${fileName}`, blob);
    This doesn't work. I've also tried array buffer, also doesn't work.
    n
    g
    • 3
    • 3
  • g

    Guy Butts (datalytyks)

    06/02/2022, 12:00 AM
    Hi channel, this is my first time posting. I am looking to model and diagram my Postgres instance in a tool called sqlDBM (https://sqldbm.com) and it needs to generate a DDL script. Is this something we can do in SupaBase?
    n
    s
    • 3
    • 3
  • n

    Needle

    06/02/2022, 1:13 AM
    Hello @joshcowan25! 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.
    g
    • 2
    • 2
  • s

    sbr

    06/02/2022, 4:11 AM
    Hi, I'm using supabase auth in production but the log in functionality is broken. It works in development mode locally but when in production I get the error saying
    atob is not defined for NextJS
    . The only references of
    atob
    in my code are in supabase-auth-helpers. @thorwebdev how can I fix this?
    n
    t
    • 3
    • 4
  • j

    joshcowan25

    06/02/2022, 4:24 AM
    When I get the session back (clientside), is the access token a security issue? Can I store it client side and send it to server when I need to (using setAuth on the server)? Is it a security issue to send it via query params? How secure it is?
    n
    j
    • 3
    • 5
1...279280281...316Latest