drewbie
10/07/2022, 4:13 PMconfig_wizard
10/07/2022, 4:52 PMpsql: error: connection to server at "db.XXX.supabase.co" (35.176.XXX.XXX), port 5432 failed: Operation timed out
Is the server running on that host and accepting TCP/IP connections?
When I try to do it programatically (Go code)
dsn := fmt.Sprintf("user=%s password=%s host=%s port=5432 dbname=postgres", USER, PASSWORD, HOST)
It hangs for ages, before I end up receiving:
failed to initialize database, got error failed to connect to `host=db.XXX.supabase.co user=alex.walker database=postgres`: dial error (dial tcp [64:ff9b::XXX:XXX]:5432: connect: no route to host)
Interestingly this looks like the cli is using IPV4 and the Go Postgres cli is using IPV6, both failing.
I have created the database about 20 minutes ago. I wondered if there is any firewalling going on or something I need to change?Spartan
10/07/2022, 5:10 PMNEW.updated_at := NOW();
is not working, where updated_at
stores a timestamptz
value.
I have this trigger function, where the error seems to happen in the first line. The updated_at
field stores a timestamptz
value, which NOW()
should be, but doesn't seem to cooperate with me. I have tried both CURRENT_TIMESTAMP
and NOW()
and neither seems to work. Does anyone know what might be causing this issue?
sql
BEGIN
NEW.updated_at := NOW();
UPDATE public.projects
SET updated_at = NEW.updated_at
WHERE id = NEW.project_id;
INSERT INTO public.document_contributor (document_id, contributor)
VALUES (NEW.id, NEW.created_by)
ON CONFLICT
DO NOTHING;
INSERT INTO public.commits (message, created_by, project_id, document_id, created_at, previous_content, current_content)
VALUES (NEW.note, NEW.updated_by, NEW.project_id, NEW.id, NEW.updated_at, OLD.content, NEW.content);
RETURN NEW;
END
reed
10/07/2022, 6:02 PMHeath
10/07/2022, 8:29 PMconfig.toml
setup for my local supabase development. With supabase cli, should the invitation emails be coming through to InBucket? We've implemented magic link signin functionality, and the magic link emails do correctly get routed to InBucket, but the invite emails do not.
Is this a config thing, by design, or a bug?
here is the relevant config that we have
toml
[inbucket]
# Port to use for the email testing server web interface.
pop3_port = 54326
port = 54324
smtp_port = 54325
# ...
[auth.email]
# Allow/disallow new user signups via email to your project.
enable_signup = true
# If enabled, a user will be required to confirm any email change on both the old, and new email
# addresses. If disabled, only the new email is required to confirm.
double_confirm_changes = false
# If enabled, users need to confirm their email address before signing in.
enable_confirmations = false
Matt
10/08/2022, 1:47 AMprofiles
user_id (pk)
username
avatar_url
posts
post_id (pk)
user_id
title
description
I want to just get do a select get every post along with the users profile who made the post, but I get error (400) when I try. Just returns null, but this is what the API section says to use.
let { data: posts, error } = await supabase
.from('posts')
.select('*, profiles(*)')
user8923
10/08/2022, 2:47 AMDatabase
type using the supabase CLI to be used in my Typescript codebase. This ends up creating a massive intellisense headache, as seen in the screenshot below. Is there a better way to work with the Database type? The problem is the same if I create my own type aliases since the Supabase client is not aware of them.
It's pretty much impossible to read this function signature.iLikeBikes
10/08/2022, 4:28 AM(get_my_agency() = agency)
but what I want is something like this
(agency contains(get_my_agencies())
is this possible or performnat?
https://github.com/supabase-community/supabase-custom-claimsrgfx
10/08/2022, 5:36 AMsql
CREATE POLICY "files images are publicly accessible."
ON storage.objects
AS PERMISSIVE
FOR SELECT
TO public
USING ((bucket_id = 'files'::text));
Karmotrine
10/08/2022, 7:35 AMhashid
value of the serial id but somehow I cannot make it to work.MG95
10/08/2022, 8:26 AMakshg05
10/08/2022, 12:07 PMThoth Trismegistus
10/08/2022, 12:45 PMaquila
10/08/2022, 1:51 PMDuncan
10/08/2022, 1:51 PMrgfx
10/08/2022, 3:58 PMObject.assign(file, { test: 'test' });
Tried this, but it doesn't get passed.sante | kiftdao
10/08/2022, 4:08 PMreturn new Response(err.message, { status: 400 })
https://github.com/supabase/examples/blob/main/supabase-js-v1/edge-functions/supabase/functions/stripe-webhooks/index.ts
Basic edge function:
const { result } = await request.json();
console.log(`Testing errors. Result requested: ${result}`)
if (result === "success") {
console.log('sending success')
return new Response(JSON.stringify("You got a success"), {
headers: { "Content-Type": "application/json" },
});
} else {
console.log('sending error')
return new Response("You got an error!", { status: 400, statusText: "Error" });
}
Client:
const {data, error} = await supabase.functions.invoke("test-errors", {
body: JSON.stringify({ result: "error" }),
});
console.log('Test Result: ', data, error);
Client result: Test Result: {} null
Expected result: error to be not nulljon.m
10/08/2022, 5:01 PMlewisd
10/08/2022, 5:26 PMlocalhost:3000/:salt/:hash/:password
with the right params from my list of firebase users, it comes back valid
, meaning all should be well.
After importing my users into supabase auth, attempting to login fails (with password, google sign in works fine).
I get an AuthApiError: Invalid login credentials
errorMiguel Espinoza
10/08/2022, 5:40 PMRafael
10/08/2022, 6:25 PMError: Cannot find module 'config/postcss.config
my fork/branch is up-to-date with the master branch. Anyone know why this is happening?((()))
10/08/2022, 8:26 PMB3n
10/08/2022, 9:55 PMShane
10/08/2022, 10:25 PMcourtstarr
10/09/2022, 12:23 AMAbnormal
10/09/2022, 2:08 AMNevski
10/09/2022, 6:10 AMShelby
10/09/2022, 7:51 AMixxie
10/09/2022, 8:07 AMinformation_schema
, so I guess I could initialize a second client using this schema and query that, but I guess maybe that is locked out by default?ixxie
10/09/2022, 8:39 AMjs
supabase
.channel('public:countries')
.on('postgres_changes', { event: 'DELETE', schema: 'public', table: 'countries' }, payload => {
console.log('Change received!', payload)
})
.subscribe()
[1] https://supabase.com/docs/reference/javascript/next/subscribe