mattnguyen
03/03/2023, 6:01 PMhttps://esm.sh/@mediapipe/face_mesh@0.4.1657299874?target=deno
and call the constructor, I get this error:
TypeError: Cannot read properties of undefined (reading 'pathname')
at new s1 (https://esm.sh/v110/@mediapipe/face_mesh@0.4.1657299874/deno/face_mesh.js:19:2248)
at new x3 (https://esm.sh/v110/@mediapipe/face_mesh@0.4.1657299874/deno/face_mesh.js:19:15116)
at Server.<anonymous> (file:///home/deno/functions/process-landmarks/index.ts:28:20)
at async Server.#respond (https://deno.land/std@0.168.0/http/server.ts:301:18)
Presumably because the modules requires the location API. The deno docs (https://deno.land/manual@v1.29.4/runtime/location_api) indicate that I need to pass --location
flag to the deno-cli command, but I don't see how this is possible with supabase. Any advice?ejkreboot
03/03/2023, 6:17 PM<insufficient privilege>
as the value for the query
column so I cannot see what the actual query was. The queries in question were originally executed by the anon
role.
A stripped down version of my profiling query just to illustrate the issue is:
select
auth.rolname,
statements.query
from
pg_stat_statements as statements
inner join pg_authid as auth on statements.userid = auth.oid
where rolname='anon';
Is there a grant I can add to the default dashboard user (which I assume is postgres
?) to be able to see what these queries were?Miguel Espinoza
03/03/2023, 6:27 PMIrfan Ahmed
03/03/2023, 6:54 PMHector Castro
03/03/2023, 7:13 PMjs
const { data, error } = await supabase
.from('customers')
.insert([
{ fullname: customer.fullname, phone: customer.phone, email: customer.email, waiver_acknowledge: customer.waiver_acknowledge, style: customer.style },
])
this is how I'm making the insert request.
json
{
code: '42501',
details: null,
hint: null,
message: 'new row violates row-level security policy for table "customers"'
}
This is what I get in return.
I've tried researching but I can't really find an answer to my specific case.jh
03/03/2023, 7:41 PMError: Error bundling function: exit status 1
file:///src/import_map.json
file:///src/index.ts
file:///_shared/constants.ts
file:///_shared/supabaseAdmin.ts
file:///_shared/types.ts
error: Uncaught (in promise) Error: The module's source code could not be parsed: Unexpected character '�' at file:///_shared/types.ts:1:1
const ret = new Error(getStringFromWasm0(arg0, arg1));
^
at __wbg_new_8d2af00bc1e329ee (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:312:19)
at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:79439)
at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:1388039)
at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:1862894)
at __wbg_adapter_18 (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:146:6)
at real (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:130:14)
Any advice on this? Maybe it's just not do-able?techleed
03/03/2023, 8:02 PMchrtravels
03/03/2023, 8:19 PMnateland
03/03/2023, 8:59 PMRuzelmania
03/03/2023, 9:03 PMFailed to run sql query: cannot change return type of existing function
. If I simply change the name of the function in my SQL snippet it runs just fine. So, my question then is: how do I destroy functions? It doesn't seem like removing the snippet is doing the trick.Jannes
03/03/2023, 9:15 PMcreate or replace function public.delete_post()
returns trigger as $$
declare
s text;
c text;
image_url text;
begin
image_url = old.image_url;
SELECT status, content INTO s, c FROM http((
'DELETE',
image_url,
ARRAY[http_header('Authorization',(SELECT current_setting('request.headers', true)::json->>'authorization'))],
NULL,
NULL
)::http_request);
IF s::INTEGER > 200 THEN RAISE EXCEPTION '%',c; END IF;
return null;
END;
$$ language plpgsql;
But if there is an error in the pgsql-http call no immediate exception is raised (obviously). And therefore the deletion of the post is not getting rolled back.
My question is now: How do I properly raise an exception with the response I get from pgsql-http in a way that the client response includes the correct response status and message.
At the moment I just check if the status is not 200 and then raise an exception but that doesn't seem correct and by doing so I don't get the right status code within the client response.
In other words how does supabase resolve sql exceptions to create the error object containing the status, hint, message etc.? And in what way do I have to raise an exception so supabase picks it up correctly?
Thanks a lot!desiboli
03/03/2023, 10:04 PM✖ Introspecting based on datasource defined in prisma/schema.prisma
Error: P4002
The schema of the introspected database was inconsistent: The schema of the introspected database was inconsistent: Cross schema references are only allowed when the target schema is listed in the schemas property of your datasource. `public.profiles` points to `auth.users` in constraint `profiles_id_fkey`. Please add `auth` to your `schemas` property and run this command again.
Could someone point me to the right direction, would appreciate it so much! 🙏jinsley8
03/03/2023, 10:07 PM/rest/v1/abc_endpoint
in the API Edge Network log page.
Is there any way I can find more information about this request like the post body?samuel83
03/03/2023, 10:48 PMgtims123
03/04/2023, 12:18 AMnateland
03/04/2023, 12:29 AM# Capture any changes that you have made to your database before setting up the CLI
means my database locally
or in prod
.
Please help 🙏tinyjetpack
03/04/2023, 12:33 AMtemplates
and templates_tags
. The templates
table has a field called tags
, which is an array
of text. When a row is updated in the templates
table, I want a trigger function to insert a row in the templates_tags
table for each tag in the tags
array. Performance is not a factor here, as these updates happen very infrequently.
Is this still a bad idea? If not, any help on why the following gives the following error would be appreciated
Failed to run sql query: loop variable of FOREACH must be a known variable or list of variables
Jinx
03/04/2023, 4:01 AManeesh
03/04/2023, 5:47 AMdart
final supabase = SupabaseClient(SupabaseKeys.url, SupabaseKeys.secret);
final bucket = supabase.storage.from('analytics-and-logs');
final list = await bucket.list(searchOptions: SearchOptions(limit: 10000));
final data = list.data;
YL
03/04/2023, 7:53 AMconst { data, error } = await supabase.auth.admin.inviteUserByEmail('email@example.com')
Hence in my invite email, I would like to display something like:
“{{ inviter_user }} has invited you to join {{ organisation_name }}”
Is it possible at all for me to pass in the ``inviter_user`` and ``organisation_name`` in the body of my API call and make it available to be used in the email template editor? If yes, I would appreciate guidance on how to pass-in and utilise the additional variables.
Thanks in advance!STILLWATER;
03/04/2023, 8:44 AMRazoth
03/04/2023, 10:21 AMKypac
03/04/2023, 12:27 PMLar
03/04/2023, 1:09 PMRAOUL
03/04/2023, 2:26 PMvisheem 🚀
03/04/2023, 2:34 PMchrtravels
03/04/2023, 3:18 PMimport { createClient } from '@supabase/supabase-js'
const supabase = createClient(supabase_url, anon_key)
const { data, error } = await supabase.auth.getSession()
Otherwise the session is only available on the login component and not sure how to access, to get the current user, throughout the rest of the site. Alternatively, I thought maybe access the intialSession from SessionContextProvider as that is import from auth-helpers-react but not sure how that can be accessed either. ;-p
Any direction is appreciated!MDobs
03/04/2023, 3:58 PMlakis94
03/04/2023, 4:21 PMMartiN
03/04/2023, 4:23 PM