centrifugal / centrifuge-swift

Swift client SDK for bidirectional real-time communication with Centrifugo and Centrifuge-based server over WebSocket
MIT License
48 stars 43 forks source link

Server doesn't have info about a subscription #51

Closed ilya-free closed 2 years ago

ilya-free commented 3 years ago

Hello. I faced this case: after successful connect (onConnect method of the delegate) i'm calling subscribe (method of the CentrifugeSubscription class) and after that i received successful callback (onSubscribeSuccess method of the delegate) But in the admin-system on the server i dont see this subscription - presence array is empty (For the server 2.2.0 version is used)

What do you think about the possible reason of that?

FZambia commented 3 years ago

Hello, maybe you don't have presence enabled in server configuration.

Try adding "presence": true on config top-level or for channel namespace (depending on channel you are using).

ilya-free commented 3 years ago

I believe that a reason is not in this, because it occurs sometimes, but not always. In other words, today i have successfully made subscriptions and they execute on a server. But yesterday, ios-sdk executes everything successful but a server does not know anything about newly created subscriptions. It seems like a subsribe-request is not arrived to a server, but then why i get success-callbacks in the delegate

FZambia commented 3 years ago

I dont see how this can happen since if adding presence info failed during subscription request then server returns Internal error to subscription request - thus subscription success can't be called. So maybe your description lacks some important details that can help to understand whats going on.

If you can provide a step by step reproducer then it would help.

FZambia commented 2 years ago

Closing, don't see why this could happen.

The advice is – try to update to the latest version, maybe some problem of 2.2.0 – there were many changes since then (though I could not find anything which can cause this on 2.2.0 too).

If you have any additional information - feel free to reopen, but nothing actionable here otherwise.