Closed ghost closed 1 year ago
Also, I tried calling sign_in_anonymous() but i just got the error "invalid_request >> refresh token required"
So my code is
var query_task := Supabase.database.query(SupabaseQuery.new().from("creators").eq("id", "13").update({ "data": {"key2": "value2"}, }))
This should update it, right? Anyway, it crashes the game on the database_task _on_task_completed function. Apparently result_body is set to an array instead of a dictionary? I don't know how that's possible.
I can check that later, eventually the endpoint returns an Array if there are multiple rows updated instead of one. Maybe I'm mapping that wrongly
Also, I tried calling sign_in_anonymous() but i just got the error "invalid_request >> refresh token required"
I think that anonymous login is not supported anymore, or "fixed" since it used the anonymous key but without identifying any user (which is not secure anyway). You can try this workaround https://github.com/supabase/gotrue/issues/68
okay, will do!
For the first issue, I didn't have permission to update the table since my policies were set incorrectly, so the returned array was empty. I have them set correctly now.
Now I can't upload images 😠, the error is just empty
I am calling Supabase.storage.from("public").upload("thumbnails/test.png", "user://icon.png")
and it doesn't work ðŸ˜
@ShatReal the error could be empty because you didn't authenticate before uploading a file Make sure to have such flow
var task:AuthTask= yield(Supabase.auth.sign_in(user_mail, user_pwd), "completed")
var upload : StorageTask = yield(Supabase.storage.from("games").upload("icon.png", "res://icon.png"), "completed")
or use signals
About the empty error: that's an issue coming from supabase backend, sadly :\ I'll reach out to Supabase devs to ask for a meaningful error
So my code is
This should update it, right? Anyway, it crashes the game on the database_task _on_task_completed function. Apparently result_body is set to an array instead of a dictionary? I don't know how that's possible.