Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init dos not work #37

Open
ViktorKirjanov opened this issue Apr 12, 2022 · 5 comments
Open

init dos not work #37

ViktorKirjanov opened this issue Apr 12, 2022 · 5 comments

Comments

@ViktorKirjanov
Copy link

ViktorKirjanov commented Apr 12, 2022

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");
    }
@fbenevides
Copy link
Contributor

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

@raducostea
Copy link

I am getting the same problem. Works only on rebuild, once you hot reload it stops working.

@fbenevides
Copy link
Contributor

Which version are you guys using?

@Zechst
Copy link

Zechst commented Sep 1, 2022

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

@proggen-com
Copy link
Contributor

We have just merged #80 which allow for re-initialization. Does that help in your case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants