Supabase

S

Supabase

Join the community to ask questions about Supabase and get answers from other members.

Join

Error starting local database

I'm trying to start developing locally instead of hitting my project database directly. I've done supabase init in my folder, supabase link and tried to supabase db pull to get an initial schema. Once I have that schema, it asks me if I want to apply it to the remote migrations and I do that. Then, when I try to supabase db pull again, I get the included very long set of warnings about privileges and then a failure due to ERROR: function public.armor(bytea) does not exist (SQLSTATE 42883) I could include the initial migrations file, but it does include CREATE EXTENSION IF NOT EXISTS "pgcrypto" WITH SCHEMA "public"; and other extensions. Why might I be seeing this error? I'm very happy to introduce additional info as needed...

Powershell link

Im trying to link my powershell to correctly deploy an private project im working on when i run supabase link --project-ref <my-project-id> it asks me for the database password, but i cannot type in there as it does...
No description

Ipv4 connection forces me to use postgres user?

I want to connect my middleware with a different user, but the only connection string I can find for ipv4 connections uses postgres.<projectid>, which uses the postgres user.

process 75324 still waiting for AccessExclusiveLock on relation 28371 of database 5

I'm running into a locking issue again and could use some help. I tried to remove a column from a table using DBeaver, and the query just kept so I eventually canceled it. Then I checked the logs and saw the error in the title (plus the image). This isn’t the first time I’ve hit this. It also happened when I tried to add RLS policies a while back. Previously, restarting the project fixed it, so I didn't dig into it much, but now it’s happening again and I’m not sure what’s causing it. It’s just me on the DB as far as I know, so I’m kinda lost on what’s holding that lock. Any idea what might be going on?...
No description

Static ip(s) for edge function

I am working with an API that basically only works with certain whitelisted IPs that I can set. Is there a way for the function to only be a set of static IP addresses?

cant log in

I'm a long time user of Supabase. I'm trying to log in and I keep getting this error that I've never ran into. I'll attach the screenshot. it just logs in and then freezes and shows this
No description

Can’t sign up for a new account - e-mail confirmation

Hi there! I have been trying to sign up for a new account for my new product and I never get to receive the confirmation e-mails. Anyone from support could help with that? Thanks!...

Trouble Connecting Cursor-Generated Next.js App to Supabase and Running Locally

Hi everyone, I’m building a Next.js app generated with Cursor AI and want to connect it to my Supabase project. My goals: 1. Connect my Supabase database to the app....

Buckets invisible when I try to load them

Hi, my organization is running out of the free plan limit usage, and I wanted to try to delete a bucket to lower it as I'm in development mode and I don't need more from the platform. But unfortunately, the buckets don't seem to show up when I try to load them.

Am I over-engineering this?

Hi. Just looking for some advice. I started working on a demo project this week to get to grips with Supabase. For context, I am working with React, and use Zod for form validation, paired with react-form. Originally, I was using Supabase anon methods (login, register etc) on the client. But I don't want to blindly trust the data received is valid. So I switched to using Edge functions. But now I just don't know if I'm over-engineering things, and making things more complicated than they need to be. Right now, all auth methods are run in Edge functions (Login, register, reset password etc), because I don't know a viable way to do proper validation of the input. I want to make sure all data received is valid. A lot of boilerplates I see online for Supabase/react don't have any edge functions, and instead just use the default methods provided by Supabase. But I just don't understand why they'd do this. Let me give an example:...

Self-Hosted Email Confirmation Issue

I am trying to bypass the email confirmation in a self hosted environment for testing purposes. In my supabase env, i have this: ```...

Supabase/Pgvector -> Very Slow

Hi Supabase team 👋 I'm using Supabase with pgvector for a vector search use case and I'm experiencing increasing latency when fetching chunks as my dataset grows. I'm querying the document_embeddings table (with ~30k rows currently) using:...

getClaims JwtPayload not updating

I'm migrating to getClaims, but when I make a change on user_metadata for example, it doesn't get updated - normally expected. When I do .refreshSession() before getting claims, I get latest changes normally, but whenever I remove refreshSesssion claims go back to old version. I expect to get latest changes on claims after I call refresh once time, what am i missing or is this a bug ? I want to get latest changes on claims after i make an update basically ?...

Multi-Tenancy allowed with 1 Acconut (1Project)? || Best Practice for a Multi-Tenant SaaS App

Hello everyone! I'm building a SaaS invoicing application that will serve multiple, distinct companies (e.g., starting with 30 clients). My plan is to use a single Supabase project for all of them. I intend to implement multi-tenancy by adding a tenant_id (or customer_id) column to every relevant table (like invoices, customers, etc.) and then use Row-Level Security (RLS) policies to ensure that users from one company can only see, edit, and create data associated with their own tenant_id....
No description

any way to keep a schema in the project?

I usually do supabase with prisma, going for raw Supabase made it hard to feed context to the AI, what is the recommended way to keep a snapshot of our db schema so AI always know the db state?

Hey there!

I've been using Supabase for an enterprise level project and I've enjoyed the convinience that it provides. To continue using it I need some clarity on a few things - 1. How does Supabse use Cookies in a nextJS environment? I've been trying to check the "HttpOnly" attribute on the cookies (security concerns) but according to the docs, Supbase's client library needs constant access to these cookies for refreshing the auth tokens in the cookies. How do we manage this? The cookies become vulnerable to XSS attacks if this attribute is not on. 2. How do we decrease the expiry time on tokens using the dashborad? Each time I go to the dedicated option I'm redirected to the API settings page, is this a bug? Please clarify this ASAP? 😁 Here are the reproduction steps - Project settings -> Authentication -> Access token expiry -> and then i reach the API settings tab, why?...
No description

Configuring Integrations via code/settings (Infrastructure as Code type question).

I am getting my feet wet with Supabase and one of the areas I am starting to mess with are the integrations, however they don't survive database resets. I understand I can create a migration to re-enable them but all of their settings have to be copied and maintained in seeds and even extra migrations that the integration "knows how to take care of" For instance if I understand correctly, to get the queue installed through code I need a migration to enable the extension, then a migration to hand "roll" (or export) the current pgmq_public (which to be fair could change over time but this migration wouldn't know that. And then update the config.toml...

Unable to Insert Data into Supabase users Table Due to Row Level Security (RLS)

I am experiencing an issue where I cannot insert data into the users table in my Supabase database. The operation fails due to Row Level Security (RLS) being enabled. Although the table structure is correct and the insert query is valid, Supabase returns a permission error indicating that the insert operation is not allowed under the current RLS policy. This is preventing me from creating or registering new data entry in the table through my application. I suspect that no insert policy has been defined for the users table, or that the existing policy does not allow inserts for the current session role (typically anon or authenticated). I need to correctly define and apply an RLS policy that securely permits user insertion while maintaining proper access control which I think have dont but it doesnot allow entering new data into the table. The given are my table info and the policy that i have created....
No description

Cronjob timeout

Hi, I am currently running into timeout issues when doing REFRESH MATERIALIZED VIEW CONCURRENTLY. I have 15 MVs which are called after each other. The cronjob looks like this: REFRESH MATERIALIZED VIEW CONCURRENTLY mv1; REFRESH MATERIALIZED VIEW CONCURRENTLY mv2;...