Edge function secret issue
I have an Edge Function (parse-car-text) that returns a 500 error saying: "GEMINI_API_KEY is not configured", but the GEMINI_API_KEY is listed in my Project Secrets. I need help verifying why the function runtime is not seeing the secret.
What I have already done:
Confirmed GEMINI_API_KEY appears in Project → Settings → Secrets.
18 Replies
can you share your full function code? Missing the
Deno.env.get
Also, can you share a screenshot of Confirmed GEMINI_API_KEY appears in Project → Settings → Secrets. secrets in Supabase are set under Edge Functions > Secrets: https://supabase.com/dashboard/project/_/functions/secretsnow im having a bit of a different problem
let me show you
I run that
I have the secrets
I have evrything set up
but the logs in the function shows me this
Try running that on your computer locally outside of an edge function and see what results you get.
Let me just clarify, im basically trying to host my loveable project myself, so im trying to replicate this file
I see, are you sure this works with GEMINI api?
const contentText = data?.contents?.[0]?.parts?.[0]?.text;
Maybe try adding a console.log of data prior to this line, so you see what data containsYes
loveable uses gemini api 2.5 flash
and it works perfectly
besides its also free
so I just made an account and made my own api
because it looks like this is the line that errors:
so nothing is being set to contentText
where exactly
on your edge function code, before
const contentText = data?.contents?.[0]?.parts?.[0]?.text;hold on
I need to install deno first no ?
if im gonna run this locally
ok that problem is fixed
perfect
Now one of my 2 edge functions that use resend api doesnt show any logs
is it because im on supabase free tier?
I have 3 edge functions total
free tier is enough for this
can you share your code?
dont you worry brother
I have cooked a long way
now im having vercel problems
well im trying to remove the preview image
For some reason it still says loveable
assuming it was a problem with the metadata but I have changed it
but it still says loveable
You can google search a solution for this... looks like you need to add manually some tags:

in your index.html file
probably when you handle the hosting with lovable, it implements this internally
You you’re right
Apparently there is a lazy cache scraping preview mechanism
So even if I fix the code the image in discord will still show the old one because it is lazy and cached it
So to force it to update you gotta scrape it using facebooks tool https: // developers.facebook.com/tools/debug/
Because then it forces like discord to cache it again
Never heard that before
But makes sense ig
I also ran into a few things, im kinda new to supabase. I noticed it was yelling about RLS on my user accounts. If I enable it. Then it breaks the login if I dont then it yells at me saying to enable it
Do you know what might cause it and if its really needed? I mean for this case there is just 1 user and thats to upload the cars so idk if its needed
You will need to share more information: exact error you are getting, explain exactly when it happens, if an RLS issues, your current policies…
I recommend to create a new post, with the title: RLS issues, and the descriptions I mentioned
So more folks can jump in
I mean it works when I disabled it
It just said RLC policy error
on supa
As asked, you should start a new post. Provide detail on what operation is getting an RLS error. What table? What policies?
From the REST API, an auth call,the dashboard UI?