cli
cli copied to clipboard
After v0.24.6, connecting to realtime fails
Prior to 0.24.6, this code in my repo works:
const supabase = createClient(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_KEY!
);
supabase
.from(`space:id=eq.${spaceID}`)
.on("*", () => {
r.pull();
})
.subscribe();
After 0.24.6, the web socket connection fails and I get the following error:
Here is my schema setup if it is useful:
await executor(`create table space (
id text primary key not null,
version integer not null,
lastmodified timestamp(6) not null
)`);
await executor(`alter publication supabase_realtime add table space`);
await executor(`alter publication supabase_realtime set
(publish = 'insert, update, delete');`);
@aboodman which version were you on prior to v0.24.6?
@soedirgo can you please help investigate?
I verified that it actually works with the commit directly prior by building cli from source. It's definitely commit 7d1ff1158d35c9262717f0201e717ad4945bc48e that breaks my project.
Also you can actually try my project easily and see the failure. The setup here and is really simple:
https://github.com/rocicorp/replicache-todo/blob/main/README.md
If you run this against current head supabase, it will fail. You'll get an error over the socket connection to supabase like I describe in first comment. If you run it against 0.24.5 or earlier, it works.
HTH
Should be fixed now in v0.24.9. Can you try again?
I can confirm this works after I restarted my local Supabase instance.
@soedirgo thanks!