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

    fugu

    04/19/2022, 10:37 PM
    I can't seem to get a very basic
    update()
    call to work; I make this call:
    Copy code
    js
    const { profileData, error } = supabase
          .from('profiles')
          .update({ 'username': emailUsername(user.email) })
          .eq('id', user.id)
    And I get a 404 response:
    Copy code
    json
    {
      error: [],
      data: null,
      count: null,
      status: 404,
      statusText: 'Not Found',
      body: null
    }
    Even though
    user.id
    in my request exactly matches an id in a row in my profiles table.
    n
    g
    • 3
    • 9
  • k

    kvnam

    04/19/2022, 11:44 PM
    Hey, Supabase is suddenly returning a
    pg_net background worker
    error when trying to update / create rows in some tables. Any ideas on how I can fix this? Or what could be causing this? Should I just restart the server? Also I checked no changes were made to internal tables or foreign keys added.
    Copy code
    message: \"the pg_net background worker must be up when doing requests\", 
    detail: Some(\"the pg_net background worker is down due to an internal error and cannot process requests\"), 
    hint: Some(\"make sure that you didn't modify any of pg_net internal tables or used them for foreign key references\"), 
    position: None, 
    where_: Some(\"PL/pgSQL function _check_worker_is_up() line 4 at RAISE\\nSQL statement \\\"insert into net.http_request_queue(method, url, headers, body, timeout_milliseconds)\\n    values (\\n        'POST',\\n        net._encode_url_with_params_array(url, params_array),\\n        headers,\\n        convert_to(body::text, 'UTF8'),\\n        timeout_milliseconds\\n    )\\n    returning id\\\"\\nPL/pgSQL function http_post(text,jsonb,jsonb,jsonb,integer) line 42 at SQL statement\\nSQL statement \\\"SELECT http_post                 FROM net.http_post(\\n              url,\\n              payload,\\n              params,\\n              headers,\\n              timeout_ms\\n            )\\\"\\nPL/pgSQL function http_request() line 54 at SQL statement\"), schema: None, 
    table: None, 
    column: None, 
    datatype: None, 
    constraint: None, 
    file: Some(\"pl_exec.c\"), 
    line: Some(3859), 
    routine: Some(\"exec_stmt_raise\")
    n
    s
    • 3
    • 7
  • t

    TUFFLES

    04/20/2022, 12:09 AM
    Just trying to do a basic connection to a self hosted realtime server. Code:
    Copy code
    py
    from realtime.connection import Socket
    
    
    def callback1(payload):
        print("Callback 1: ", payload)
    
    
    def callback2(payload):
        print("Callback 2: ", payload)
    
    
    if __name__ == "__main__":
        URL = "ws://localhost:4000/socket/websocket"
        s = Socket(URL)
        s.connect()
    
        channel_1 = s.set_channel("realtime:public:todos")
        channel_1.join().on("UPDATE", callback1)
    
        channel_2 = s.set_channel("realtime:public:users")
        channel_2.join().on("*", callback2)
    
        s.listen()
    Result:
    Copy code
    websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 403
    Server:
    Copy code
    2022-04-20 00:02:59.397 [info] REFUSED CONNECTION TO RealtimeWeb.UserSocket in 32µs
    
      Transport: :websocket
    
      Serializer: Phoenix.Socket.V1.JSONSerializer
    
      Parameters: %{}
    What am I doing wrong here?
    n
    • 2
    • 4
  • a

    Aravindha Hariharan

    04/20/2022, 5:04 AM
    Supabase/postgres docker for arm Raspberry pi
    Copy code
    standard_init_linux.go:228: exec user process caused: exec format error
    standard_init_linux.go:228: exec user process caused: exec format error
    standard_init_linux.go:228: exec user process caused: exec format error
    n
    o
    • 3
    • 10
  • k

    Kariak

    04/20/2022, 5:25 AM
    Running through some tutorials @jonmeyers made and I'm getting an error when trying to create profile functions. I swear I was messing around with this a couple weeks ago on another project and wasn't having any issues. Not doing anything fancy. Spun up a new project with just a profiles table to double check and still getting the error.
    n
    g
    • 3
    • 4
  • h

    Hausik

    04/20/2022, 9:20 AM
    Hello, when running studio on self-hosted version i get error "Error: [500] no pg_hba.conf entry for host "XXX", user "postgres", database "postgres". What i want to change is those postgres to different user and database name that has pg_hba.conf. How can I achieve that? I've edited every postgres address in docker-compose to valid address with different names, but still have "postgres" in studio error
    n
    • 2
    • 3
  • h

    Hausik

    04/20/2022, 9:20 AM
    @User
    n
    • 2
    • 3
  • g

    geordi

    04/20/2022, 12:25 PM
    Hey there! Is there a way to get social oauth login working in a chrome extensions? It seems like a really nice use case for developing apps on supabase 🙂
    n
    o
    • 3
    • 8
  • j

    jrstnly

    04/20/2022, 12:31 PM
    Hi all, I’m new to Postgres policies and I’m trying to figure out if a specific RLS policy is even possible and I can’t seem to find any documentation on it. In Firebase, I was able to prevent listing all documents in a collection and only allow retrieving a specific document via the document id. Id like to do that in Supabase as well. All requests will come from unauthenticated users so everything will be using the anon key, but I’d like to be able to prevent a select * and only allow people to select where the id column is equal to a specific value (a device’s uuid). Essentially I need them to have a valid uuid in order to retrieve anything from the table. Can anyone point me in the right direction?
    n
    g
    • 3
    • 3
  • u

    4a6d65

    04/20/2022, 1:49 PM
    Hi everyone! I was wondering if anyone was seeing issues with their buckets? The XHR request for buckets is just loading forever. Getting the same problem in Safari and Chrome. I'm eu-west-2 if that helps
    n
    • 2
    • 3
  • m

    mike-lua

    04/20/2022, 2:26 PM
    getting "FetchError: Network request failed" on all API calls for 5 minutes now
    n
    g
    • 3
    • 18
  • s

    STILLWATER;

    04/20/2022, 2:46 PM
    how do i add on delete cascade on foreign key constraint from supabase website
    n
    s
    • 3
    • 4
  • s

    STILLWATER;

    04/20/2022, 3:18 PM
    I am trying to update current_story_id column in supabase where id is that but it gives me this error
    n
    • 2
    • 5
  • n

    Needle

    04/20/2022, 3:18 PM
    Hello @STILLWATER;! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! 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
  • l

    Lars

    04/20/2022, 4:01 PM
    I genuinely think I have seen somewhere that you can use sql commands in JS via something like supabase.sql("SELECT '*'" FROM...) instead of supabase.select()... But I can't seem to find it anymore. Only references to RPC - is it something that I am imagining?
    n
    s
    • 3
    • 7
  • n

    Needle

    04/20/2022, 4:39 PM
    Hello @venus! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! 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
  • c

    chops

    04/20/2022, 6:12 PM
    Hey anybody here get this functions example working: https://github.com/supabase-community/flutter-stripe-payments-with-supabase-functions ? When I try to serve the payment-sheet function locally I get a couple check errors like
    error: TS2339 [ERROR]: Property 'ref' does not exist on type 'Listener'.
    and it wont start up
    n
    g
    v
    • 4
    • 11
  • l

    Lars

    04/20/2022, 6:57 PM
    I have a sql query that I am having a hard time converting into a postgresql function
    n
    s
    • 3
    • 8
  • r

    rookiedeveloper

    04/20/2022, 8:16 PM
    Why doesn’t supabase has python support :((;(
    n
    g
    • 3
    • 3
  • v

    VΞLO

    04/20/2022, 9:17 PM
    Is the following the most concise way of obtaining a count of all rows?
    const { count } = await supabase.from('some_table').select('*', {count: 'exact', head: true})
    n
    g
    • 3
    • 6
  • g

    gel

    04/20/2022, 9:34 PM
    hey all, i'm getting this error when i try to call supabase.auth.signup(): {message: 'The upstream server is timing out', status: 504}
    n
    s
    l
    • 4
    • 32
  • n

    Needle

    04/20/2022, 9:34 PM
    Hello @gel! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! 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.
  • t

    takumikunn15

    04/21/2022, 5:21 AM
    I would like to insert names and other data into the public/user table when creating an account. Is it possible to implement such a function using a function like the one shown on this page of the Official Reference? Currently, I am using insert() after auth.signup(). https://supabase.com/docs/reference/javascript/auth-signup#sign-up-with-additional-user-meta-data
    n
    g
    • 3
    • 5
  • m

    meera_datey

    04/21/2022, 6:10 AM
    I am trying to setup SendGrid Custom SMTP as email provider with Supabase. How do I go about it? Can somebody point me to directions? Our setup isn't working, how do I debug?
    n
    t
    • 3
    • 3
  • g

    gun

    04/21/2022, 6:52 AM
    can I import json file to supabase table?
    n
    t
    • 3
    • 3
  • j

    jhrtn

    04/21/2022, 9:28 AM
    I need to do provide some network info for a venue where I'll be demoing an app using Supabase. If ping my API URL I see an IP address. Are these static for the project or likely to refresh?
    n
    • 2
    • 1
  • n

    NARCISO

    04/21/2022, 1:00 PM
    Is anybody aware that
    RPC parameters
    (calling RPC from the
    supabase-js
    client) are sorted by name (alphabetically) before calling the database function? Is this a feature or something that can be disabled? or am I forced to sort my RPC's params in that way?
    n
    s
    m
    • 4
    • 9
  • d

    Dexter

    04/21/2022, 1:27 PM
    Is there a way to only allow selecting rows with known id's using RLS? I'd like my database to be public but only for accessing records with known ID's. Something where a RLS policy would require a where clause on the id column.
    n
    s
    l
    • 4
    • 24
  • n

    Needle

    04/21/2022, 3:58 PM
    Hello @venus! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! 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
  • v

    venus

    04/21/2022, 3:58 PM
    Hey, I would like to count COUNT relations per each row (
    albums
    ) has. Is this possible to do in one query? So basically I want to get known how many
    images
    each
    albums
    record has
    Copy code
    js
    const { data } = await supabaseClient
      .from("albums")
      .select(
        `
        name,
        created_at,
        images (*)
        `)
      .limit(3, { foreignTable: "images" });
    n
    g
    • 3
    • 5
1...261262263...316Latest