https://supabase.com/ logo
Join Discord
Powered by
# help-and-questions
  • Supabase with .Net
    p

    paulman176

    02/21/2023, 11:40 AM
    For our webapplaction, we are using react components from a custom library. One component we want to use uses .Net for some server side functionality and we are restricted to use that (so it seems). Is it possible to combine .Net with supabase, I saw that there is a C# library for supabase?
    g
    • 2
    • 8
  • Failed to run sql query: query has no destination for result data
    r

    RAOUL

    02/21/2023, 11:46 AM
    Hello , i am a beginner in supabase from french. i made a join statement in my query . When i execute it , supabase says to me : Failed to run sql query: query has no destination for result data How please can i solve this ?
    g
    • 2
    • 1
  • Microsoft Azure AD OAuth optional claims
    r

    Razoth

    02/21/2023, 12:04 PM
    Hello, i'm trying to switch from next-auth to supabase for auth and trying to configure Access Control based on the users groups. on next-auth i was able to see the whole JWT with the claims that ive added inside the apps admin interface, but on supabase those informations are seemingly missing. how would i go about receiving or storing the whole jwt provider token to use the data?
  • How can I upload different files
    r

    Revaycolizer

    02/21/2023, 1:18 PM
    I used this method from supabase docs but I can only upload one file because after uploading one file a storage bucket assumes the file will be having the same name thus making it not able to upload more than one file Below is what I tried
    Copy code
    const savePic = async () => {
          try {
            const { error } = await supabase.storage.from("profiles").upload("file", file.value{
              cacheControl: "3600",
              upsert: false,
            });
            if (error) throw error;
            statusMsg.value = "Successfully added";
            file.value = null;
          } catch (error) {
            error.value = "Error: ${error.message}";
            setTimeout(() => {
              error.value = false;
            }, 5000);
          }
        };
    g
    • 2
    • 5
  • SQL query to add sample users to "auth.users" table
    c

    Crownie

    02/21/2023, 1:21 PM
    is it also possible to seed Auth with sample data?
    g
    • 2
    • 1
  • Supabase Auth UI with next-auth
    m

    misakss

    02/21/2023, 2:08 PM
    Is there any example/guide on how to use Supabase Auth UI with next-auth? https://supabase.com/docs/guides/auth/auth-helpers/auth-ui
    s
    • 2
    • 4
  • Supabase Storage caching not working
    d

    Deng

    02/21/2023, 3:16 PM
    The cache for Supabase Storage is not working as expected. Uploaded images are not being cached, and subsequent requests for the same image are not returning a cached version. I've checked the HTTP response headers for the image request, and they show "Cache-Control: no-cache," which is incorrect.
    g
    m
    • 3
    • 8
  • getting "An invalid response was received from the upstream server" when trying to login
    p

    patcito

    02/21/2023, 3:35 PM
    I'm trying the basic nextjs example and when I try to login I get this error ""An invalid response was received from the upstream server"" Any idea what's wrong, been an hour on this and I'm stuck, I'm setting my url and anon key so I have no idea what may be wrong, anyone?
    s
    t
    • 3
    • 3
  • Storage folders have no time stamps?
    e

    ejkreboot

    02/21/2023, 4:00 PM
    I have a storage bucket that has "folders", each "folder" containing a blog post. But when I retrieve a list of these "folders" using
    .storage.from(...).list("", {limit: 2, sortBy: { column: 'created_at', order: 'desc' }})
    (from the
    @supabase/supabase-js
    npm package) I get the latest two folders as desired (or, if use
    order: 'asc'
    , I get the oldest 2). Is it expected behavior that the time stamp fields on folders are all
    null
    but the sorting works as expected?
    g
    • 2
    • 2
  • type "earth" does not exist
    a

    avalanche

    02/21/2023, 4:35 PM
    I'm trying to delete user from authentication tab in supabase. Action fails and returns message 'type "earth" does not exist'. I'm not sure where is connection between me trying to delete user and this message, although I'm using following extensions:
    Copy code
    sql
    create extension cube with schema extensions;
    create extension earthdistance with schema extensions;
    Here is whole report, and I can see weird query under "internal_query".
    Copy code
    json
    {
      "file": null,
      "host": "",
      "metadata": [],
      "parsed": [
        {
          "application_name": null,
          "backend_type": "client backend",
          "command_tag": "DELETE",
          "connection_from": "127.0.0.1:50632",
          "context": "SQL function \"ll_to_earth\" during inlining\nSQL statement \"DELETE FROM ONLY \"public\".\"item\" WHERE $1 OPERATOR(pg_catalog.=) \"profile_id\"\"",
          "database_name": "postgres",
          "detail": null,
          "error_severity": "ERROR",
          "hint": null,
          "internal_query": "SELECT cube(cube(cube(earth()*cos(radians($1))*cos(radians($2))),earth()*cos(radians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth",
          "internal_query_pos": 136,
          "leader_pid": null,
          "location": null,
          "process_id": 65510,
          "query": "DELETE FROM \"users\" AS users WHERE users.id = $1",
          "query_id": -8180141769095057000,
          "query_pos": null,
          "session_id": "63f2b833.ffe6",
          "session_line_num": 5,
          "session_start_time": "2023-02-20 00:00:51 UTC",
          "sql_state_code": "42704",
          "timestamp": "2023-02-21 15:32:08.119 UTC",
          "transaction_id": 3094,
          "user_name": "supabase_auth_admin",
          "virtual_transaction_id": "9/4898"
        }
      ],
      "parsed_from": null,
      "project": null,
      "source_type": null
    }
    g
    • 2
    • 9
  • int or string when it comes to status
    r

    Romi

    02/21/2023, 4:35 PM
    A user has 5 status types, should I be storing the status as int then in my code display the name for it or store the status as a string. or does it not even matter xD
    s
    • 2
    • 1
  • policy that blocks access to a certain column
    a

    Aless.c06

    02/21/2023, 4:39 PM
    Hi, I'm not an sql expert so I need help to make a policy which let users read all the columns exept one. Example Name | description | tag | password People should be able to read all the columns exept password
    g
    s
    v
    • 4
    • 12
  • Getting user's name inside of another table
    r

    Romi

    02/21/2023, 5:43 PM
    I have a table called "reports" with a column connecting to the users table id. How can I then output the users name or other information? (I am using nuxt 3)
    s
    • 2
    • 7
  • Compressing and uploading images to storage, how to define type?
    c

    Cheqo

    02/21/2023, 6:03 PM
    Hello i am using compressor js to compress my pictures client side and then I am trying to upload that image to the storage. I think everything works, but as you can see file type is:
    text/plain;charset=UTF-8 - 14.38 KB
    when I think it should be
    image/PNG
    I thought supabase autoatically detect a type? I don't know much about converting base64 to actual image files, so maybe my code is not right?
    Copy code
    // file is a base64 string
        let base64String = file.split(';base64,').pop();
        if (!base64String) {
          toast.error('Please upload a form template image');
          return;
        }
    
        function getImageType(base64String: string): string | null {
          const header = Buffer.from(base64String, 'base64').slice(0, 10);
          if (header.slice(0, 2).equals(Buffer.from([0xff, 0xd8]))) {
            return 'JPEG';
          } else if (
            header.slice(0, 4).equals(Buffer.from([0x89, 0x50, 0x4e, 0x47]))
          ) {
            return 'PNG';
          } else if (
            header.slice(0, 4).equals(Buffer.from([0x47, 0x49, 0x46, 0x38]))
          ) {
            return 'GIF';
          } else if (header.slice(0, 2).equals(Buffer.from([0x42, 0x4d]))) {
            return 'BMP';
          } else {
            return null;
          }
        }
        const imageType = getImageType(base64String);
    
        let inputBuffer = base64String && Buffer.from(base64String, 'base64');
    and I am uploading here like this:
    Copy code
    const { data: data1 } = await supabase.storage
          .from('admin')
          .upload(
            `forms/${formConfigCreationData.id}/landing-picture.${imageType}`,
            inputBuffer,
            {
              upsert: true
            }
          );
    Can someone correct me as to what is going or is everything here ok?
    g
    • 2
    • 1
  • anyone recommend best way to format date,
    r

    Romi

    02/21/2023, 6:31 PM
    for example created_at, (I am using Nuxt 3)
    g
    s
    • 3
    • 2
  • create new user without email or password
    a

    Aaron8646

    02/21/2023, 8:03 PM
    Is there a way to add users to the auth users table without providing email/password etc? Right now I assign each user a unique access_token on app open (just the first time), and store it in
    secureStore
    . I'm not seeing an obvious way to run
    supabase.auth.signUp()
    without an email/password. Would
    supabase.auth.admin.createUser()
    from the server work?
    g
    • 2
    • 3
  • Prisma schema does not apply correctly in Supabase
    n

    nikivi

    02/21/2023, 8:08 PM
    my schema: https://github.com/learn-anything/learn-anything/blob/main/prisma/schema.prisma this table topic : https://github.com/learn-anything/learn-anything/blob/main/prisma/schema.prisma#L73 should have a table with id, content , links, notes but if I prisma apply the schema, I don’t see links or notes I don’t understand why, perhaps thats not how you define relations? I don’t get any errors if I prisma db-push Image attached
    n
    • 2
    • 62
  • why is my .remove() not working...
    r

    rchrdnsh

    02/21/2023, 8:20 PM
    ...got this function:
    Copy code
    js
    const removeImage = async () => {
        const { data, error } = await supabase
          .storage
          .from(`ads`)
          .remove([`expressive_e/osmose/osmose_image_1_1677008672916.jpg`])
      }
    ...which is called when a button is pushed:
    Copy code
    html
    <button on:click={removeImage}>Remove Image</button>
    ...but when the button is clicked the image is not removed in the supabase ui, but no errors anywhere... ...what am i doing wrong? And how can i find out? ...attaching an image of the file path, just in case i missed something obvious...
    g
    • 2
    • 5
  • When do `auth.users.updated_at` and `auth.users.last_sign_in_at` get updated?
    d

    DanMossa

    02/21/2023, 8:29 PM
    I see these fields inside my
    auth.users
    table. I also notice that sometimes
    updated_at
    is later and sometimes
    last_sign_in_at
    is later. I'm curious when these get triggered?
  • Trying to get files from bucket but not able to
    r

    Revaycolizer

    02/21/2023, 10:01 PM
    I tried getting data from bucket but it throws a 400 error saying that it was not found. Below is wat I implemented
    Copy code
    const getPic=async() =>{
    try{
    const{data:projects, error} = await supabase.storage.getBucket("profiles")
    if(error) throw error
    (data.value =projects), (data Loaded.value =true)
    } catch(error) {
    error.value =error. message
    setTimeout(() =>{
    error.value = false
    }, 5000)
    }
    }
    g
    • 2
    • 59
  • Is there a way to get a realtime count from a table?
    c

    caseycrogers

    02/21/2023, 10:29 PM
    I have a table with user notifications in it. I want to listen to the table and get a realtime count of all unread notifications for a given user. Is there a way I can do this?
    j
    g
    • 3
    • 99
  • connection
    d

    Dotjosh

    02/22/2023, 12:48 AM
    URGENT - I'm using the paid-hosted supabase and I got a too many connections message and I have no way to restart the server. What do I do?
    s
    • 2
    • 1
  • Failing to create table: "foreign key constraint cannot be implemented"
    c

    CELESTIALCITY

    02/22/2023, 1:39 AM
    I think it might have to do something with the fact that the ``members`` column is set as an array. Just for context, I want each "group" to have a list of members' UUID, from my ``public.users`` table.
  • Nextjs undefined environmental v supabase variables on cloud run
    e

    eloahsam

    02/22/2023, 1:39 AM
    So I’ve deployed my nextjs web app on google cloud run and added env’a on the cloud run UI dashboard and in my rocker file and when image is built my anon key and URI are undefined for some reason , and I’m using the supabase sdk so I can’t specific these two envy’s this is a pattern I see with frontends
  • Question about pricing.
    u

    ?????

    02/22/2023, 1:44 AM
    The 8GB database on Pro plan is about the total amount of data stored at the same time, or it is about the amount of data that is stored per month?
    g
    • 2
    • 1
  • I cannot figure out to fix this error for my life
    s

    salzar

    02/22/2023, 3:58 AM
    This is showing me that session doesnt appear on type supabase context. Based off the second screenshot i notice that it is missing from the types. Should i just add it as a type? Im confusing because im trying to learn off the documentation on the page at the link attached. Im using the app folder. Any help is appreciated. https://supabase.com/docs/guides/auth/auth-helpers/nextjs-server-components
    • 1
    • 2
  • next-13 with api - supabase - types
    s

    Sjors

    02/22/2023, 7:52 AM
    Good day all, I am working on a small personal project to get a taste of TS and Supabase. Within this application it is possible to create a tournament, view all the tournaments in an overview and view a single tournament on it's detailpage. The problem that I am having is when I send a request to the API I am losing all my types within the response. Does anyone know a way to prevent this behaviour? You can find my repo at: https://github.com/devsjors/mario-kart-tournaments Feel free to leave any kind of feedback on my project, it will be much appreciated! Thanks in advance!
  • supabase.from(...).on is not a function
    a

    Aless.c06

    02/22/2023, 8:10 AM
    Hi I'm trying to subscribe to changes of the table 'lobbies'
    Copy code
    const update_subscription = supabase
    .from('lobbies')
    .on('update', data => {
        refreshPlayers();
    }).subscribe();
    Why does it gives me his error? I enabled realtime and have read for all users plicy
    j
    g
    • 3
    • 7
  • Multiple filters on realtime query
    e

    elliott

    02/22/2023, 8:15 AM
    Is it planned to add functionality for setting multiple filters on realtime queries? This would really massively increase the usefulness of realtime. I am avoiding using it right now since it would would complicated my DB schema to create and then maintain all these extra joining tables to accommodate single filter queries.
    h
    g
    • 3
    • 4
  • Help, how to work with API and JSON array
    s

    Sem_70

    02/22/2023, 9:03 AM
    Hi All, I do not have lots of programming knowledge so I am looking for any pointers, help, links or maybe is willing to do a videocall etc to get me going. I have build an app in Bubble.io and setup a connection via API with Supabase in which I have setup a table. I need to understand how the Supabase API and the table in the Supabase database work together. For instance, can I send about 1000 string id's via the API to Supabase to be used as filter input in a Subabase GET API request? And if so, how? In general I would like a better understand of API's (header, body, parameters, different type's etc) and how to work with that input in Subabase and the underlaying databse. The docs are just a bit too high level to understand how it all works together.
    g
    • 2
    • 1
1...140141142...230Latest