https://supabase.com/ logo
Join Discord
Powered by
# help-and-questions
  • Database backup
    e

    Elfhild

    11/03/2022, 4:35 AM
    How do i enable database backup on self hosted project?
    • 1
    • 1
  • Dashboard stuck on `Connecting to Default Project`
    n

    Norkz

    11/03/2022, 4:37 AM
    System info:
    Copy code
    Linux oracle Ubuntu aarch64 aarch64 aarch64 GNU/Linux
    Another similar issue: I am self hosting
    Supabase
    , and I used the followed the
    Official Guide
    . The following PasteBin contains logs of each container. https://pastebin.com/Qkk7PKNV While in Supabase-Studio, in the chrome console I am receiving the following:
    Copy code
    default:1 Unchecked runtime.lastError: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received
    :3000/api/profile/permissions?returning=minimal:1          Failed to load resource: the server responded with a status of 404 (Not Found)
    :3000/api/profile/permissions?returning=minimal:1          Failed to load resource: the server responded with a status of 404 (Not Found)
    How can this issue be resolved? Any help is appreciated.
    p
    • 2
    • 42
  • Can't pause project.
    w

    whiskeywizard

    11/03/2022, 4:43 AM
    Hi, I'm trying to pause one of my 2 free projects in order to create another, but it's been stuck at the "Pausing..." stage for 10 minutes now. Tried refreshing and doing it again, still gets stuck. Any ideas?
    d
    • 2
    • 4
  • Help! Any sort of backup for free-Tier?
    b

    binajmen

    11/03/2022, 6:50 AM
    Hi. Is there any sort of backup, even done manually by Supabase member, for free Tier? I deleted a row this morning by mistake (with multiple cascade), and now I miss data I should have not deleted as part of a PoC 😓 A rollback or even a full restore from yesterday snapshot would be awesome 🙏
    • 1
    • 6
  • can I use the service role key to generate a user JWT token?
    j

    JustinT

    11/03/2022, 7:04 AM
    I am hoping to create a a user JWT on my server to act as that user on the server. Is this possible?
    n
    • 2
    • 20
  • Login on Server
    a

    activenode

    11/03/2022, 10:24 AM
    I was trying to figure out how to login on the server instead of the client. My problem is: When a Magic Link is sent the user is first sent to that page and then the auth helpers to authenticate on the client only to redirect which is a weird UX and unnecessary waiting time. I mean I could probably try to process the Magic Link on the server myself but I've asked myself if any of the auth helpers would process the login on the server side immediately.
    d
    • 2
    • 5
  • Has anyone configured self-hosted supabase with AWS RDS?
    g

    Gopalakrishnan

    11/03/2022, 10:25 AM
    since AWS RDS doesn't give superuser user access, selfhost supabase getting failed. if anyone configures supabase with RDS. please help me
  • Table error after schema change
    m

    mendesrenan5

    11/03/2022, 10:26 AM
    tl;dr: Every single table that was transfered from the schema "transit" to "public" cannot be accessed, have it RLS or not. I'm using the anon key. Problem: PostgrestException(message: permission denied for table routes, code: 42501, details: Unauthorized, hint: null) Platform: Dart/Flutter -------- I created a schema named "transit". All my tables where in the "transit" scheme. Only later I noticed that there is no way currently to query a schema that is not the 'public' one in Flutter. So I moved them to the public schema. They are still not accessible though. I tried to create a new table in the public schema, caled "testtttt". It worked as expected: as soon as I created the rule for letting everyone select it it was visible. Every other table that changed schema (from "transit" to "public") throws this error of code 42501. Some have RLS and no permission, some have RLS and "select permission for everyone", some don't even have RLS. Every single table that was transfered from "transit" to "public" cannot be accessed using the flutter_supabase api. Tables created directly in "public" are fine though.I've already created 18 tables and would love to keep them if possible I'm using the anonKey This is the code I used for migration:
    alter view transit.table_name set schema public;
    Where table_name is, of course, the table name. The first picture show the table "routes", which can't be accessed using the api. The second shows the tables "t_test" and "testtttt". The only one that can be accessed is "testtttt". It is also the only one that was created directly in "public" and not in "transit" schema. They all look fine in the dashboard.
    g
    • 2
    • 3
  • Restoration in progress
    k

    korayem

    11/03/2022, 10:33 AM
    My database is stuck for two days so far!!
    h
    • 2
    • 2
  • Sveltekit auth helper example error
    g

    greencurve

    11/03/2022, 10:54 AM
    https://github.com/supabase/auth-helpers/tree/main/examples/sveltekit-email-password I am attempting to run this example. When signing up I am getting some json errors:
    Unexpected token I in JSON at position 0
    • 1
    • 1
  • how to manually close realtime channel?
    t

    Thoth Trismegistus

    11/03/2022, 11:19 AM
    I am using svelte. I have two components using the same channel. I want to close the broadcast channel when navigated away from the page.
    j
    • 2
    • 10
  • Inner Join in Dart
    m

    Muezz

    11/03/2022, 11:38 AM
    I am trying to recreate this simple query in flutter:
    Copy code
    sql
    SELECT * FROM signups
    INNER JOIN guests ON signups."guestId" = guests."guestId"
    INNER JOIN events ON signups."eventId" = events."eventId";
    I have this piece of code so far:
    await supabase.from('signups').select('*, guests!inner(*), events!inner(*)');
    It works but it is giving me the inner join columns in a nested map/json like this:
    Copy code
    json
    [
      {
        signupId: 8653e1d0-57a8-4138-b2bf-7ae078570c5c, 
        eventId: da7fe194-78a3-47e8-b9ce-0ee57cdfc247, // This is a foreign key from table events 
        guestId: e9482062-9c0e-4025-a1b1-d03e9d8c7910, // This is a foreign key from table guests
        // other field/column values from signups table
        guests: {
          guestId: e9482062-9c0e-4025-a1b1-d03e9d8c7910, 
          guestName: James, 
          guestPhoneNumber: +1-3091234567
        }, 
        events: {
          eventId: da7fe194-78a3-47e8-b9ce-0ee57cdfc247, 
          eventName: Annual Company Meeting, 
          eventVenue: Continental, 
          eventDateTime: 1667300987442
        }
      }
    ]
    I want to get this output:
    Copy code
    json
    [
      {
        signupId: 8653e1d0-57a8-4138-b2bf-7ae078570c5c, 
        eventId: da7fe194-78a3-47e8-b9ce-0ee57cdfc247, // This is a foreign key from table events 
        guestId: e9482062-9c0e-4025-a1b1-d03e9d8c7910, // This is a foreign key from table guests
        // other field/column values from signups table
        guestName: James, 
        guestPhoneNumber: +1-3091234567,
        eventName: Annual Company Meeting, 
        eventVenue: Continental, 
        eventDateTime: 1667300987442
        }
      }
    ]
    What is the query syntax that will let me do this within dart?
  • What's the best practice to get user information globally (NextJs)?
    i

    ismael1234

    11/03/2022, 3:42 PM
    What's the best practice to get user information like id,username, email globally ?
    j
    • 2
    • 10
  • OAuth Page Redirect Issue
    s

    sosapps

    11/03/2022, 3:45 PM
    We are working with the GitHub OAuth, and after the login validation occurs it redirects me to a new page. Since this is inside an SPA application the redirect causes the state of the SPA to be lost. ( VUE) Do you have a suggestion? Most functions come back to the same page. The sign in function is sending the browser to a new page, which reloads the SPA.
    g
    • 2
    • 6
  • How to configure time that keeps user logged in?
    l

    Lukas V

    11/03/2022, 4:28 PM
    I am looking at https://ui.supabase.io/components/auth and I noticed that there is an option
    remember me
    , I don't use supabase ui, but how can I set this myself. For example, if I want to keep user logged in for a year, how would I achieve this?
    b
    g
    • 3
    • 16
  • can't subscribe to realtime channel
    t

    Thoth Trismegistus

    11/03/2022, 4:48 PM
    So i am using svelte. I unsubscribe from the channel on the onDestroy hook. But when i navigate back to the component it says
    Copy code
    tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance
    m
    • 2
    • 2
  • Can't install auth-helpers-sveltekit
    s

    Sanctus

    11/03/2022, 4:56 PM
    When I do npm install @supabase/auth-helpers-sveltekit I get the following:
    g
    • 2
    • 2
  • Supabase Auth Options
    h

    Hallidayo

    11/03/2022, 5:32 PM
    Hi guys, I'm looking to start a new project using supabase with nextjs. What is the current recommended option that people are using to handle authentication e.g. is it best to use auth from scratch or use auth-helpers? I have seen a lot of examples using auth-helpers and are the auth helpers the recommended way to handle authentication now? Thankyou.
    n
    • 2
    • 2
  • Is it possible to create policy that will allow to view requested image only from specific host page
    f

    floyare

    11/03/2022, 6:14 PM
    I was wondering if I can create policy that will allow to view storage content only for specific website. I want to achieve some mechanism that will allow to view images only on my website and not in external links. Ex. image1.jpg will be only visible in my website even if it is stored on supabase storage. Anyone have an idea?
    g
    a
    • 3
    • 2
  • Struggle to make docker setup working with an external database
    i

    ItsEthra

    11/03/2022, 6:27 PM
    Hello, I am currently trying to setup docker-compose to work with my external database that is hosted on my raspberry pi. I changed secrets and made
    POSTGRES_HOST
    to point to my raspberrypi. But when I run
    docker-compose
    I am getting a few errors. How can I fix them?
  • Doc site code examples have wrong whitespace setting?
    a

    aarku

    11/03/2022, 6:29 PM
    Do the code examples look squished together for anyone else? They looked fine yesterday. I tried Chrome and Firefox. https://supabase.com/docs/guides/with-nextjs
    g
    • 2
    • 1
  • Local Storage Questions
    n

    Notorious T.I.M.

    11/03/2022, 6:49 PM
    Hiya 🙋 I'm trying to get my head around using storage locally and I have a couple of questions. So far I have created a local bucket via SQL and have tried to upload a file from my local disk using the JavaScript method detailed in the docs but I'm getting a 502 bad gateway error. So, firstly, do I need to configure my local Supabase to allocate it some disk space to use? If so, how? Secondly, if and when I do have a working local bucket, once I push my schema to my remote Supabase projects will all my code (e.g. image links) still work (provided I place the same files in the remote buckets)?
    • 1
    • 1
  • Supabase Website - Error 500 - Internal Server Error
    z

    zettabyte

    11/03/2022, 6:56 PM
    I am trying to access the documentation on row level security here: https://supabase.com/docs/guides/auth/row-level-security However when connecting to the website I am given an internal server error 500
    g
    s
    • 3
    • 3
  • NodeJS Backend - updateUserById
    b

    bobmolgui

    11/03/2022, 7:31 PM
    I try to do the following(use-case 1): const {data: {user, error}} = await supabase.auth.getUser(jwt); const resp = await supabase.auth.admin.updateUserById(user.id,{ app_metadata: { isBeta: true } }) First Call for auth.getUser(jwt) works fine, second call for aut.admin.updateUserById(...) isn't working and I receive back a 401 that I'm not authorized and yes I use the service role in backend. When I then try to do onlny as example the following(use-case 2): const resp = await supabase.auth.admin.updateUserById(,{ app_metadata: { isBeta: true } }) It works fine and the app_metadata gets updated correctly. Can somebody tell me why "use-case 1" above isn't working correctly or how I can debug on that?
    o
    g
    • 3
    • 24
  • Pushing to array of uid
    d

    dev Joakim Pedersen

    11/03/2022, 8:31 PM
    Hi! I got a uid[] named likes. here I want to push a string of the used id. into it when the user presses like. The type is set to uid, and defined as array. I try to insert the uid if it's user. else they get sent to login page. this works well. But I think I have chosen wrong. since I get back that I need to check the value of key likes. it expected a JSON array So I tried making it JSON.stringify and pass it but then it's malformed array litteral It's probably a simple task but I'm not used to it so hoping for guidance 😄 thanks in advance
    g
    • 2
    • 2
  • Connecting with connection string
    j

    jaf

    11/03/2022, 9:48 PM
    Which password do I need to provide when connecting with a connection string? https://supabase.com/docs/guides/database/connecting-to-postgres#finding-your-connection-string I'm not even sure if my user has a password since I was forced to sign up with github iirc
    g
    • 2
    • 2
  • RLS One to many relationship
    d

    DeadlyDev

    11/03/2022, 9:50 PM
    Maybe my brain is just not working correctly. I have done RLS policies for multiple relationships but I am struggling with this specific case. Hopefully someone can point me in the right direction. I have a table
    shopping_lists
    which has an owner (user id). I have another table
    shopping_lists_items
    which has a shopping_list column that is a foreign key of shopping_lists_items. I want an RLS policy that says a user can delete a row from
    shopping_lists_items
    if it belongs to shopping_lists where the owner is the uid(). Hopefully I explained that well enough, if not I can try to elaborate. Thanks in advanced for any help!
    g
    f
    • 3
    • 2
  • React Native (Expo) - Auth session not persisting after moving to supabase.js v2
    r

    Rían

    11/04/2022, 2:05 AM
    Hi there, I've recently made the jump to Supabase.js v2 but I'm having an issue where every time I make a change in my development environment it seems to sign me out? It wasn't doing this before and it's incredibly frustrating having to go through auth flow every time I make a 1-line-of-code change Would anyone be able to take a look at my Auth flow below and tell me what's broken or has changed?
    • 1
    • 7
  • How to migrate changes from one remote instance to another using supabase-cli?
    t

    Teiem

    11/04/2022, 3:16 AM
    Hey :) How can I migrate changes from one remote supabase instance to another using supabase-cli? Basically we have a dev and prod instance and want to test changes on the dev instance first bevor applying them to the prod instance.
    n
    • 2
    • 1
  • CDC Tools to use with external API
    r

    rohangroombridge

    11/04/2022, 4:02 AM
    Hi, would anyone kindly help? (Let me know if this is the wrong place to a ask) New here but I am after a CDC tool that can monitor a DB change event "UPDATE", "DELETE", "INSERT" etc... once the event happens, I can use the data in a post request to an external API. Destination is MS SQL Server > External API for updataing a record in the API What tools etc...would help here?
1...596061...230Latest