Open rexhibition opened 1 month ago
I am experiencing this also, I was just coming to report this behavior... here's a video (below). I can also confirm that I am seeing 100% of what @rexhibition is reporting.
As seen in the video below:
https://github.com/user-attachments/assets/f272ffa9-1cdb-41e0-b042-34733c007efe
SERVICE IMAGE │ LOCAL │ LINKED
─────────────────────────┼──────────────────┼─────────
supabase/postgres │ 15.1.1.78 │ -
supabase/gotrue │ v2.151.0 │ -
postgrest/postgrest │ v12.2.0 │ -
supabase/realtime │ v2.29.15 │ -
supabase/storage-api │ v1.0.6 │ -
supabase/edge-runtime │ v1.55.0 │ -
supabase/studio │ 20240729-ce42139 │ -
supabase/postgres-meta │ v0.83.2 │ -
supabase/logflare │ 1.4.0 │ -
supabase/supavisor │ 1.1.56 │ -
@filipecabaco just wanted to flag this on your end. Another weird thing about this bug... I am only experiencing this on the newest CLI version, with tables created after updating to v 1.187.10
. All of my old tables, created prior to updating, have no issues whatsoever.
@filipecabaco major update to help debug this:
I am experiencing this issue as early as supabase cli 1.187.10
(which, in turn, uses realtime 2.29.15
(via https://github.com/supabase/cli/releases/tag/v1.181.2)
I am not experiencing this issue on supabase cli 1.178.6
(which, in turn, uses realtime 2.29.13
(via https://github.com/supabase/cli/releases/tag/v1.178.6)
My best guess is that 2.29.15
broke how Realtime interprets RLS policies (since 1.178.6
used 2.29.13
and 1.187.10
used 2.29.15
). This actually makes sense, because 2.29.15
does in fact change how RLS is interpreted by realtime: https://github.com/supabase/realtime/pull/1085 (I think #1085 might have broken something with how postgres_changes
are interpreted against RLS).
As a temporary work-around @rexhibition , you can use npx -y supabase@1.178.6 ...
(such as npx -y supabase@1.178.6 start
) to revert back to a working RLS version while this gets straightened out.
@filipecabaco major update to help debug this:
I am experiencing this issue as early as supabase cli
1.187.10
(which, in turn, uses realtime2.29.15
(via https://github.com/supabase/cli/releases/tag/v1.181.2)I am not experiencing this issue on supabase cli
1.178.6
(which, in turn, uses realtime2.29.13
(via https://github.com/supabase/cli/releases/tag/v1.178.6)My best guess is that
2.29.15
broke how Realtime interprets RLS policies (since1.178.6
used2.29.13
and1.187.10
used2.29.15
). This actually makes sense, because2.29.15
does in fact change how RLS is interpreted by realtime: #1085 (I think #1085 might have broken something with howpostgres_changes
are interpreted against RLS).As a temporary work-around @rexhibition , you can use
npx -y supabase@1.178.6 ...
(such asnpx -y supabase@1.178.6 start
) to revert back to a working RLS version while this gets straightened out.
Thank you for your thorough report and suggested workaround. I hope this issue is resolved soon! 😊 I was a bit worried since hardly anyone had reported this before.
thank you so much @barrownicholas 🙏
@rexhibition was the bug happening in an existing project, if so indeed one of the migrations could have broken something.
Plus the subcriber_pool_size
is indeed wrong, not even sure how it changed 🤦
@barrownicholas Hi, do you have a problem with nanoid when you insert a new item? When I console log the payload.new, I saw that my shortid column, which is the nanoid
column returns with only a letter. But I checked my Supabase server and saw the full nanoid is still showing properly.
Bug report
Describe the bug
My Supabase table when I set the primary key column to be NanoID caused a problem with Realtime detecting changes.
Basically, it only registers DELETE. When I INSERT or UPDATE anything in the table, Realtime doesn't detect it. When I set the primary key back to UUID by default, it's working fine.
However, when I disable RLS completely from that table. The Realtime works normally with NanoID. So I think there might be some problem with the RLS or authentication.
Screenshots
My VueJS code for subscribing & submiting data.
![Code_2eC6h1aRHl](https://github.com/user-attachments/assets/4d7b1dd6-a272-4515-a26a-f29cf6401ae4)
I even tried to create a public RLS but still not working.![vivaldi_XAQuOd0Ew3](https://github.com/user-attachments/assets/d2246d5b-ed41-4249-9454-eb8b094420af)
System information