© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3mo ago•
4 replies
Rich Jones

42501 for edge functions on supabase locally hosted

Errors:

2025-11-14T17:47:01.135190055Z serving the request with supabase/functions/record-eula-acceptance
2025-11-14T17:47:01.262656222Z [Info] Listening on http://localhost:9999/
2025-11-14T17:47:01.262685138Z
2025-11-14T17:47:01.351044222Z [Error] EULA acceptance error: {
2025-11-14T17:47:01.351052347Z code: "42501",
2025-11-14T17:47:01.351053972Z details: null,
2025-11-14T17:47:01.351055180Z hint: null,
2025-11-14T17:47:01.351056305Z message: "permission denied for schema public"

Code fragment:

try {
const supabaseUrl = Deno.env.get("SUPABASE_URL");
const supabaseServiceKey = Deno.env.get("SUPABASE_SERVICE_ROLE_KEY");

if (!supabaseUrl) {
console.error('EULA acceptance error: SUPABASE_URL environment variable not set');
throw new Error("Missing SUPABASE_URL configuration");
}

if (!supabaseServiceKey) {
console.error('EULA acceptance error: SUPABASE_SERVICE_ROLE_KEY environment variable not set');
throw new Error("Missing SUPABASE_SERVICE_ROLE_KEY configuration");
}

const supabaseClient = createClient(
supabaseUrl,
supabaseServiceKey,
{ auth: { persistSession: false } }
);

// Get authenticated user from JWT
const authHeader = req.headers.get("Authorization");
if (!authHeader) {
throw new Error("No authorization header");
}

I am pretty confident that the function has the service_role key !

Any ideas ?

Thanks in advance.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Supabase Edge Functions with Self Hosted
SupabaseSSupabase / help-and-questions
2mo ago
Use Edge functions on self hosted
SupabaseSSupabase / help-and-questions
4y ago
Supabase Edge Functions authentication
SupabaseSSupabase / help-and-questions
2w ago
Edge functions supabase error
SupabaseSSupabase / help-and-questions
5mo ago