Skip to content

Realtime postgres_changes causes GenServer error #1648

@Hla-aung

Description

@Hla-aung

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 postgres_change is triggered, there is no payload in client side. When I see the realtime log, I found this error.

{
"event_message": "GenServer #PID<0.221534492.2> terminating\n** (FunctionClauseError) no function clause matching in Jason.Fragment.new/1\n (jason 1.4.4) lib/fragment.ex:14: Jason.Fragment.new(nil)\n (realtime 2.66.2) lib/extensions/postgres_cdc_rls/replication_poller.ex:276: Extensions.PostgresCdcRls.ReplicationPoller.generate_record/1\n (realtime 2.66.2) lib/extensions/postgres_cdc_rls/replication_poller.ex:204: anonymous fn/6 in Extensions.PostgresCdcRls.ReplicationPoller.handle_list_changes_result/4\n (elixir 1.18.4) lib/enum.ex:2546: Enum."-reduce/3-lists^foldl/2-0-"/3\n (realtime 2.66.2) lib/extensions/postgres_cdc_rls/replication_poller.ex:203: Extensions.PostgresCdcRls.ReplicationPoller.handle_list_changes_result/4\n (realtime 2.66.2) lib/extensions/postgres_cdc_rls/replication_poller.ex:101: Extensions.PostgresCdcRls.ReplicationPoller.handle_info/2\n (stdlib 6.2.1) gen_server.erl:2345: :gen_server.try_handle_info/3\n (stdlib 6.2.1) gen_server.erl:2433: :gen_server.handle_msg/6\nLast message: :poll",
"id": "22c4d617-b375-47cd-b7e0-5d1c88fc535b",
"metadata": [
{
"application_name": null,
"callers": [],
"cluster": "main",
"context": [
{
"application": null,
"domain": [
"otp"
],
"file": "gen_server.erl",
"function": "error_info/8",
"gl": "<0.3256.0>",
"line": 2646,
"mfa": [
"gen_server",
"error_info",
"8"
],
"module": "gen_server",
"pid": "<0.221534492.2>",
"registered_name": null,
"time": 1765111073229279,
"vm": [
{
"node": "realtime@2406:da18:1b2:3602:792f:f854:f437:3f9c"
}
]
}
],
"depth": null,
"error_code": null,
"error_logger": [
{
"emulator": null,
"report_cb": "&:gen_server.format_log/1",
"tag": "error",
"type": null
}
],
"error_string": null,
"exp": null,
"external_id": "gtmxogfpqpqimjyypxvl",
"formatter_error_params": [],
"func": null,
"internal_log_event": null,
"iss": null,
"level": "error",
"logger_pubsub_backend": [],
"measurements": [],
"mod": null,
"otel_span_id": null,
"otel_trace_flags": null,
"otel_trace_id": null,
"project": "gtmxogfpqpqimjyypxvl",
"region": "ap-southeast-1",
"request_id": null,
"stacktrace": [
{
"args": "[nil]",
"arity": null,
"file": "lib/fragment.ex",
"function": "new",
"line": 14,
"module": "Jason.Fragment"
},
{
"args": null,
"arity": 1,
"file": "lib/extensions/postgres_cdc_rls/replication_poller.ex",
"function": "generate_record/1",
"line": 276,
"module": "Extensions.PostgresCdcRls.ReplicationPoller"
},
{
"args": null,
"arity": 6,
"file": "lib/extensions/postgres_cdc_rls/replication_poller.ex",
"function": "-handle_list_changes_result/4-fun-2-/6",
"line": 204,
"module": "Extensions.PostgresCdcRls.ReplicationPoller"
},
{
"args": null,
"arity": 3,
"file": "lib/enum.ex",
"function": "-reduce/3-lists^foldl/2-0-/3",
"line": 2546,
"module": "Enum"
},
{
"args": null,
"arity": 4,
"file": "lib/extensions/postgres_cdc_rls/replication_poller.ex",
"function": "handle_list_changes_result/4",
"line": 203,
"module": "Extensions.PostgresCdcRls.ReplicationPoller"
},
{
"args": null,
"arity": 2,
"file": "lib/extensions/postgres_cdc_rls/replication_poller.ex",
"function": "handle_info/2",
"line": 101,
"module": "Extensions.PostgresCdcRls.ReplicationPoller"
},
{
"args": null,
"arity": 3,
"file": "gen_server.erl",
"function": "try_handle_info/3",
"line": 2345,
"module": "gen_server"
},
{
"args": null,
"arity": 6,
"file": "gen_server.erl",
"function": "handle_msg/6",
"line": 2433,
"module": "gen_server"
}
],
"sub": null,
"target": null,
"tenant": null,
"tenant_id": null,
"tenant_params": []
}
],
"timestamp": 1765111073229000
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreleased

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions