https://supabase.com/ logo
Join Discord
Powered by
# javascript
  • n

    Nathan

    06/06/2022, 12:58 AM
    Hi All, I've been using
    @supabase/supabase-js
    for Google and Discord OAuth, and it was working for some time, but has stopped working and I am unsure why. After authorizing, and the app has redirected, I get 404 on the session.
    POST http://localhost:3000/api/_supabase/session 404 (Not Found)
    and
    Copy code
    Uncaught (in promise) FetchError: 404 Not Found (/api/_supabase/session)
        at async Object.callback (supabase.client.mjs:22:7)
    Any insight would help!
  • o

    owonwo

    06/06/2022, 3:51 PM
    I started getting a Subscription error recently.
    Copy code
    SubscriptionError: status= SUBSCRIPTION_ERROR  ,error= {"reason": "error occurred when joining realtime:public:orders:rider_id=eq.4919876f-993e-4dc3-94b8-a384dedd75bd with user token
    I have Replication enabled for the table and RLS off since i don't need it at the moment.
    g
    • 2
    • 47
  • o

    owonwo

    06/06/2022, 3:57 PM
    I don't know if i missed something.
  • k

    konga

    06/06/2022, 4:46 PM
    The function
    generateLink
    returns two different object types. When I try to access the property
    action_link
    assuming that it returns the
    User
    type, TypeScript throws an error. How do I properly handle multiple object types?
    j
    • 2
    • 4
  • k

    konga

    06/06/2022, 5:01 PM
    The function
    generateLink
    returns two
  • s

    skyclo

    06/06/2022, 5:37 PM
    Does
    from.update()
    act like
    upsert()
    where if the file doesn't exist in the bucket, it just adds it anyways?
    Edit #1: Nevermind... skimmed right over
    boolean fileOptions.upsert
    Edit #2: Apparently upsert isn't working on update... using
    from.upload()
    works with upsert
  • o

    owonwo

    06/06/2022, 5:38 PM
    I started getting a Subscription error
  • j

    jaitaiwan

    06/07/2022, 7:18 AM
    How would one perform
    'admin' = any(roles)
    with the postgresjs?
    g
    • 2
    • 1
  • g

    garyaustin

    06/07/2022, 1:10 PM
    How would one perform ` admin any roles
  • b

    Bicijay

    06/07/2022, 1:56 PM
    Hey guys, i would like to return the number of files that a user has on storage, can i query the storage schema through the sdk?
    g
    • 2
    • 9
  • s

    sixfour

    06/07/2022, 2:53 PM
    Hey all, curious how other people handle the snake_case to camelCase transformations when reading from and writing to Supabase?
    s
    • 2
    • 3
  • s

    silentworks

    06/08/2022, 10:18 AM
    Hey all curious how other people handle
  • c

    Chirag

    06/08/2022, 4:54 PM
    Hi guys!
  • c

    Chirag

    06/08/2022, 4:55 PM
    Can anyone tell me from where to import renderToSting?
    g
    j
    j
    • 4
    • 36
  • c

    Chirag

    06/08/2022, 4:58 PM
    [year][month][day] inside pages is giving me a lot of errors
  • g

    garyaustin

    06/08/2022, 5:07 PM
    renderToString MDX
  • y

    YANN

    06/10/2022, 7:48 PM
    Hello! I'm experiencing a rather "strange" behavior, the following code doesn't work
    Copy code
    ts
    updateSummonerName(newName: string): void {
        this._supabase.from("dis_accounts").update({ name: newName }).eq("id", 1);
    }
    But awaiting it make it work, same applies for inserting
    Copy code
    ts
    async updateSummonerName(newName: string): Promise<void> {
        await this._supabase.from("dis_accounts").update({ name: newName }).eq("id", 1);
    }
    is there any logical explanation to it ?
  • y

    YANN

    06/10/2022, 7:59 PM
    and yes I've read https://discord.com/channels/839993398554656828/885894041739329536 but without awaiting the PostgresFilterBuilder the request simply doesn't fire as the value doesn't change at all in the database. I assume it's more a bug than anything else
  • j

    jaitaiwan

    06/11/2022, 1:27 AM
    @YANN it makes sense to me that it's being garbage collected before the request even has a chance to be triggered
  • y

    YANN

    06/11/2022, 1:29 AM
    Idk it's just weird from a user perspective to have to await an insert / update when you dont wanna check wether it was successful or not
  • j

    jaitaiwan

    06/11/2022, 1:30 AM
    Not really, the nature of the request is async http. If you don't want to deal with it you can use a callback like setTimeout or something like that
  • g

    garyaustin

    06/11/2022, 1:46 AM
    @YANN just throw a .then() on it if you don't want the response.
  • b

    barry

    06/11/2022, 6:04 AM
    Typescript hating me
    s
    • 2
    • 4
  • j

    jvocodes

    06/15/2022, 11:36 PM
    Hi all! I set up Supabase auth on the server using Express, and the sign up works just fine. However, when I try to login, I get an error saying that the email has not been confirmed. I checked my settings and I have email confirmation turned off. Has anyone experienced this?
  • h

    hoesmean

    06/16/2022, 5:40 PM
    #869406062036529193 Hi All, When i fetch images from storage its getting slowly, is it because i use now free?
    g
    • 2
    • 3
  • g

    garyaustin

    06/16/2022, 7:24 PM
    slow image fetch
  • v

    vikstack

    06/17/2022, 11:08 AM
    Copy code
    js
    const uploadImage = async (e) => {
            const file = image
    
            const fileName = file.name
            
            const filePath = `public/${fileName}`
            const fileRef = await supabase.storage.from("testimonials-image").upload("public/image.png", file, {
                cacheControl: '3600',
                upsert: false
            })
            
        }
    file =
    e => e.target.files[0]
    The error code is 400. And here is what the network tab shows:
  • s

    SickRussel

    06/17/2022, 8:20 PM
    Hello @vikstack are you trying to do it in public or private Bucket?
  • s

    SickRussel

    06/17/2022, 8:24 PM
    Guys, is there any way to do the same filters in JavaScript as in the Supabase interfaces (like on the picture)??? I tried, but no luck:
    Copy code
    const {data, count, error} = await supabase
        .from('people')
        .select(`id, name`)
        // First try doesn't work
        // .or(`name.ilike.%${term}%`)
        // .or(`city.ilike.%${term}%`)
        // .or(`province.ilike.%${term}%`)
    
        // Second try doesn't work
        // .ilike('name', `%${term}%`)
        // .ilike('city', `%${term}%`)
        // .ilike('province', `%${term}%`)
    g
    • 2
    • 14
  • v

    vikstack

    06/17/2022, 8:43 PM
    Fixed the bug, I had to add some policy
1...636465...81Latest