Giter Club home page Giter Club logo

Comments (7)

jenspots avatar jenspots commented on May 30, 2024 1

@ooolzhas you seem to be on the right track. After quite a bit of debugging I was simply able to switch .on(.message) to .onMessage thanks to your comments above. You surely saved me a lot of time.

from supabase-swift.

ooolzhas avatar ooolzhas commented on May 30, 2024

UPD: channel doesn't subscribe, no subscriptions found in realtime:subscriptions in the dashboard

Found related commits from Realtime JS:

fix: add RealtimeChannel — March 30
fix: update RealtimeClient to support RealtimeChannel — March 30

Could this be it?

from supabase-swift.

ooolzhas avatar ooolzhas commented on May 30, 2024

UPD 2: realtime schema now updates, subscriptions are now visible

No changes to code were made

Still no callback on any events... Investigating, will post findings here

from supabase-swift.

ooolzhas avatar ooolzhas commented on May 30, 2024

My theory:

self.trigger(event: ChannelEvent.channelReply(message.ref),
                         payload: message.payload,
                         ref: message.ref,
                         joinRef: message.joinRef)

Is missing from

private func on(_ event: ChannelEvent, delegated: Delegated<Message, Void>) -> Int {
        let ref = bindingRef
        bindingRef = ref + 1

        bindingsDel.append(Binding(event: event, ref: ref, callback: delegated))
        return ref
    }

But I'm not sure, that's my understanding after a few hours of inspection

from supabase-swift.

ooolzhas avatar ooolzhas commented on May 30, 2024

@GRSouza I triangulated the error

"message.status" returns nil when you're listening to ".all / .insert / .update / .delete", because the payload doesn't contain "status" and "message.status" is an optional String

Somewhere in the code there's a guard statement that returns if "message.status" is nil

If I use "onMessage" I am able to successfully receive the message & the payload, and from there I retrieve the event type

I'm not creating a PR because I'm too clumsy and don't know how to fix this myself

from supabase-swift.

ooolzhas avatar ooolzhas commented on May 30, 2024

@jenspots Glad to hear it helped

from supabase-swift.

wweevv-johndpope avatar wweevv-johndpope commented on May 30, 2024

close this

from supabase-swift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.