-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
Pusher stuck in [CONNECTING] and produce a fatal exception. #4
Comments
any solution please |
Same here. Works well on iOS but I get the same error on android. @mghase @chinloyal Any solution yet? |
I gave up using this package, I tried flutter_pusher_client with laravel_echo and it worked for me. |
@heshamerfan97 The issue was you are not using the full url for the authEndpoint, instead of "/broadcasting/auth" use "my-app.com/broadcasting/auth" |
I'm using it with full url. With https:// |
@OxayMint Can you share your configuration? |
|
the thing is that we use custom pusher server. And everything works like a charm when I run it on iOS, but fails on android both emulator and real device |
@chinloyal I already tried using the full link for auth. but the error is still there. |
Can you try setting this: pusherClient.onConnectionError((error) {
log("error: ${error.message}");
}); Let me know what happens, also can you set the enableLogging to true on the PusherClient to true @OxayMint |
|
I believe a recent PR fixes this issue. I haven't created a release for it yet but you can test it out by linking to master in your pubspec.yaml file by doing: dependencies:
pusher_client:
git:
url: https://github.com/chinloyal/pusher_client
ref: master Let me know if that works @OxayMint |
Yay! It worked. Thank you so much for this package and for resolving the issue! |
@heshamerfan97 can you also try this as well? I want to confirm this works so I can create a new release |
Yes, I'll create the new release today |
still geting fatal error. it work fine on debug mode but in release fails in Android E/AndroidRuntime(15468): FATAL EXCEPTION: pusher-java-client eventQueue |
Steps to reproduce
I use pusher_client: ^1.1.0 with laravel_echo: ^0.2.8
I Initialize PusherClient as the example
PusherOptions options = PusherOptions( host: '****-app.com', wssPort: 6001, wsPort: 6001, cluster: "mt1", ); PusherClient(appKey, options);
In initState I initialize my echo
echo = new Echo({ 'broadcaster': 'pusher', 'crsfToken': $accessToken, 'X-CSRF-TOKEN': $accessToken, 'authEndpoint': '/broadcasting/auth', 'key': appKey, 'wsHost': '****-app.com', 'wsPort': 6001, 'wssPort': 6001, 'forceTLS': true, 'disableStats': false, 'enabledTransports': ['ws', 'wss'], 'cluster': 'mt1', 'client': pusherClient, 'auth': { 'headers': { 'Authorization': 'Bearer $accessToken' } } });
Expected behavior
As an expected behavior it should at least connect to the socket and proceed through the [CONNECTING] message so I can connect to the channel.
Actual behavior
PusherClient stuck in [CONNECTING] and produce a fatal exception as follow
...
The text was updated successfully, but these errors were encountered: