pusher-channels-flutter
pusher-channels-flutter copied to clipboard
init dos not work
it looks like pusher.init dos not work. I took your example, made an app on pusher.com but i dont see any actions after pusher.init. pusher.subscribe dosnot start because we are still waiting for init response try catch dosnt show errors too.
try {
print("---1");
await pusher.init(
apiKey: _apiKey.text,
cluster: _cluster.text,
onConnectionStateChange: onConnectionStateChange,
onError: onError,
onSubscriptionSucceeded: onSubscriptionSucceeded,
onEvent: onEvent,
onSubscriptionError: onSubscriptionError,
onDecryptionFailure: onDecryptionFailure,
onMemberAdded: onMemberAdded,
onMemberRemoved: onMemberRemoved,
// authEndpoint: "<Your Authendpoint Url>",
// onAuthorizer: onAuthorizer
);
print("---2");
await pusher.subscribe(channelName: _channelName.text);
await pusher.connect();
} catch (e) {
log("ERROR: $e");
}
Hi @ViktorKirjanov, could you please provide a bit more information about how to reproduce it? Did you try to run on which platform: Android, iOS or web?
Thanks
I am getting the same problem. Works only on rebuild, once you hot reload it stops working.
Which version are you guys using?
Same issue faced here. User can only be subscribe to the channel once and afterwards hot reloading or creating a new instance user is unable to subscribe again, any fixes available? Using the latest version here
We have just merged https://github.com/pusher/pusher-channels-flutter/pull/80 which allow for re-initialization. Does that help in your case?