Ursa
03/17/2023, 4:14 PMQueueBot
03/17/2023, 4:23 PMgtims123
03/17/2023, 4:31 PM?????
03/17/2023, 5:03 PMasyncme
03/17/2023, 6:26 PMRake
03/17/2023, 6:49 PMTerminal
03/17/2023, 7:09 PMSECURITY LABEL FOR pgsodium
ON COLUMN tableA.token
IS 'ENCRYPT WITH KEY COLUMN key_id;
PauHana
03/17/2023, 7:19 PMStuart81
03/17/2023, 8:10 PMKypac
03/17/2023, 8:46 PMQuazar
03/17/2023, 8:56 PM.env.local
in the project root, with my URL and ANON_KEY
It fails to run with Uncaught Error: supabaseUrl is required.
nbert
03/17/2023, 8:58 PMsupabase.from().select()
seems very inefficient, so combining them (and making 1 request) sounds more efficient... But is it possible, and if so, how?
Here's the code I'm currently running on the server before page load:
ts
export async function load() {
const { data: materials } = await supabase.from('materials').select('id, name').order('id', { ascending: true });
const { data: categories } = await supabase.from('categories').select('id, name').order('id', { ascending: true });
const { data: tools } = await supabase.from('tools').select('id, category, name').order('id', { ascending: true });
return {
materials: materials ?? [],
categories: categories ?? [],
tools: tools ?? []
};
}
Sniped137
03/17/2023, 9:16 PMVik
03/17/2023, 10:19 PMconst getPosts = async () => {
const { data, error } = await supabaseClient
.from('posts')
.select('post_id, created_at, content, asset_url, profile:user_id(*)')
.order('created_at', { ascending: false });
if (error) {
throw Error(error.message);
}
return data as unknown as Post[];
};
michaelshimeles
03/17/2023, 10:35 PMVik
03/18/2023, 3:52 AManan7
03/18/2023, 10:13 AMitsandyd
03/18/2023, 10:17 AMLAH
03/18/2023, 10:36 AMDyrsin
03/18/2023, 11:01 AMsignUp()
auth request:
client.auth.signUp(email: user.email, password: user.password, data: user.profile)
, where user.profile
is a struct, that can be converted with JSONEncode()
.
The data parameter seems accessible, but the type is of [String: AnyJSON]
, which after much tribulation has eluded my best search efforts so far.
Has any one had this issue with this type? How can I pass user metadata in Swift, from a Data objet and/or JSON String?
Thank you for reading & help. :)chrtravels
03/18/2023, 11:26 AMexport async function addPost (newPost) {
try {
const { error } = await supabase
.from('posts')
.insert(newPost)
} catch (err) {
console.log(err);
throw new Error('Error posting topic')
}
}
Then, from the handleSubmit , called from the form button:
function handleSubmit(e) {
const newPost = {
title: title,
content: content,
tags: tags,
user_id: user.id
}
addPost(newPost);
}
I was getting "supabase" for the api functions, from '@/lib/supabase-js' and that was working. It actually still is on my other functions...getPosts, etc... However I also tried '@supabase/supabase-js' but neither work for this function.
I am also not getting any errors. On the database side, the refresh spins but nothing is added. Any thoughts are appreciated.alitnk
03/18/2023, 11:51 AMcanceling statement due to statement timeout
errors. We have staging and production instances and this happens only on production. any idea?Dan Rumney
03/18/2023, 1:24 PMmy-app/
├─ supabase/
│ ├─ functions/
│ │ ├─ xyz/
│ │ │ ├─ index.ts
When I try to serve this function with supabase functions serve
, I get Serving supabase/functions
, but then nothing else... no mention of the file watcher or of function xyz
.
In addition, when I try to POST
to this function, the terminal that is "serving" my functions says service does not exist
In addition, when I attempt to deploy the function, I get the following with the regular bundler:
Error: Error bundling function: exit status 1
file:///src/import_map.json
file:///src/index.ts
error: Uncaught (in promise) Error: NotFound: No such file or directory (os error 2)
const ret = new Error(getStringFromWasm0(arg0, arg1));
^
at __wbg_new_8d2af00bc1e329ee
<stack omitted due to character limit>
The legacy bundler gives:
Bundling xyz
Error: Error bundling function: exit status 1
error: Module not found "file:///Users/dancrumb/Projects/my-app/xyz/index.ts".
I'm happy to try to debug further, but I'm kind of at a loss since the error messages for standard bundling are pretty opaque and I can't see why the legacy bundler would be looking in the wrong place.Luc
03/18/2023, 1:26 PMmaxim
03/18/2023, 1:49 PMsupabase db diff
i get the following:
❯ supabase db diff
Connecting to local database...
Creating shadow database...
Applying migration 20230227064514_create_projects.sql...
Applying migration 20230227070734_create_units.sql...
Applying migration 20230301134939_create_delete_units_rpc_function.sql...
Applying migration 20230302062449_create_select_configurations_query.sql...
Applying migration 20230311193213_create_developers_health_overview_rpc_function.sql...
Applying migration 20230311195842_create_update_or_insert_rpc_functions.sql...
Applying migration 20230312091731_create_search_rpc_function.sql...
Diffing schemas: auth,extensions,public,storage
Error: error diffing schema:
Try rerunning the command with --debug to troubleshoot the error.
Any idea what this could be?
attached a log file with lines that contain "error" when i run it with --debug
(cause 2k character limit on post):peepoo
03/18/2023, 2:30 PMimport { useSupabaseClient } from "@supabase/auth-helpers-react";
export default function Index(){
const supabase = useSupabaseClient();
useEffect(() => {
supabase
.channel("supabase_realtime")
.on("postgres_changes",{ event: "*", schema: "public", table: "Product"},(payload) => {
console.log(payload.new);
})
.subscribe((status) => {
console.log(status);
});
}, [supabase]);
}
The status always print CLOSED twice after the initial load of the page (if I made changes to the file and save it, the subscription is then working perfectly), but another realtime subscription with different table is working (print SUBSCRIBED) with the same coding structure.MATTI
03/18/2023, 2:52 PMSirK
03/18/2023, 3:14 PMTorwent
03/18/2023, 5:11 PMa99111cc042b477e9f22eafe7
03/18/2023, 5:40 PMbash
λ supabase-functions main ✗ supabase functions deploy hello-world
Error: fork/exec /home/anon/.supabase/deno: no such file or directory
Does anybody else have this problem as well ?
I am running a bit older cli version.
supabase --version
1.29.3
I followed previous steps without an issue. I took already made supabase project. Created new folder,
supabase login
supabase init
supabase link
supabase function new hello-world
supabase deploy hello-world // and I get this
Error: fork/exec /home/anon/.supabase/deno: no such file or directory
OS: NixOS 23.05pre4583