Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Byte-Arrays result in wrong data when using real time Postgres-subscriptions #461

@sh3rlock97

Description

@sh3rlock97

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 sending byte-arrays to postgres using it's hex-format (e.g. nonce: "\xe2cf51076254e9e0b9b89690448263f3bd35a33224a693f6") this works perfectly fine while utilising standard supabase functions.

But when using a subscription it returns a different String (e.g. nonce: "\x653263663531303736323534653965306239623839363930343438323633663362643335613333323234613639336636") that looks like a dec number instead of a hex number. I couldn't find out how supabase creates the returned string.

To Reproduce

  1. create a subscription for a table with a column with type byta.
supabase
        .channel("bytea-channel")
        .on(
          { event: "INSERT", schema: "public", table: "orders_message" },
          (payload) => {
            console.log("bytea payload", payload.new.bytea);
        });
  1. insert a bytea String (nonce: "\x64b03fd2f59f05703f2fdefb4aa74ddf6b0eb0990a90833c")

  2. take a look at the output "bytea payload \x653263663531303736323534653965306239623839363930343438323633663362643335613333323234613639336636"

Expected behavior

  • Return the same (correct) bytea string as the one being returned when using the normal supabase.from().select when using real time subscriptions

System information

  • OS: any OS. any Browser. Using supabase-(free)-hosting from supabase.

Could be an issue of the supabase.js library. But it seems like supabase itself is doing something wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions