Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[supabase-ssr] DELETE event on realtime sub throws error #747

Open
2 tasks done
kryptus36 opened this issue Mar 7, 2024 · 0 comments
Open
2 tasks done

[supabase-ssr] DELETE event on realtime sub throws error #747

kryptus36 opened this issue Mar 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kryptus36
Copy link

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When I create a realtime subscription on a table using event: '*' it works as expected on INSERT and UPDATE. On DELETE I get:

Uncaught TypeError: can't convert null to object
convertChangeData transformers.ts:68
_getPayloadRecords RealtimeChannel.ts:806
_trigger RealtimeChannel.ts:663
_trigger RealtimeChannel.ts:647
_onConnMessage RealtimeClient.ts:434
_onConnMessage RealtimeClient.ts:433
decode serializer.ts:13
_onConnMessage RealtimeClient.ts:414
onmessage RealtimeClient.ts:395
setupConnection RealtimeClient.ts:395
connect RealtimeClient.ts:171
subscribe RealtimeChannel.ts:203
instance +layout.svelte:30
run utils.js:41
mount_component Component.js:47
flush scheduler.js:99
init Component.js:164
Root root.svelte:1024
createProxiedComponent svelte-hooks.js:341
ProxyComponent proxy.js:242
Proxy proxy.js:349
initialize client.js:415
_hydrate client.js:2334
start client.js:285
admin:1089
promise callback* admin:1088
transformers.ts:68:16
convertChangeData transformers.ts:68
_getPayloadRecords RealtimeChannel.ts:806
_trigger RealtimeChannel.ts:663
map self-hosted:221
_trigger RealtimeChannel.ts:647
_onConnMessage RealtimeClient.ts:434
forEach self-hosted:203
_onConnMessage RealtimeClient.ts:433
decode serializer.ts:13
_onConnMessage RealtimeClient.ts:414
onmessage RealtimeClient.ts:395
(Async: EventHandlerNonNull)
setupConnection RealtimeClient.ts:395
connect RealtimeClient.ts:171
subscribe RealtimeChannel.ts:203
instance +layout.svelte:30
run utils.js:41
map self-hosted:221
mount_component Component.js:47
flush scheduler.js:99
init Component.js:164
Root root.svelte:1024
createProxiedComponent svelte-hooks.js:341
ProxyComponent proxy.js:242
Proxy proxy.js:349
initialize client.js:415
_hydrate client.js:2334
InterpretGeneratorResume self-hosted:1465
AsyncFunctionNext self-hosted:852
(Async: async)
start client.js:285
admin:1089
(Async: promise callback)
admin:1088

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

Create a table, enable replication and subscribe to it.

Eg:

supabase
.channel("schema-db-changes")
.on(
"postgres_changes",
{
event: "*",
schema: "public",
table: "user_roles",
},
(payload) => console.log(payload)
)
.subscribe();

Expected behavior

Payload is logged to console

Screenshots

If applicable, add screenshots to help explain your problem.

System information

-Linux, tried both firefox & chrome
@supabase/ssr 0.1.0
@supabase/supabase-js 2.39..7

@kryptus36 kryptus36 added the bug Something isn't working label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant