Open AlamTheInnov opened 2 years ago
I am using laravel websockets on backend, and testing device is iPhone
import 'package:laravel_echo/laravel_echo.dart'; import 'package:pusher_client/pusher_client.dart'; PusherOptions options = PusherOptions( // cluster: 'mt1', host: 'example.com', encrypted: true, wsPort: 6001, // auth: PusherAuth( // AUTH_URL, // headers: { // 'Authorization': 'Bearer $BEARER_TOKEN', // }, // ), ); // Create pusher client PusherClient pusherClient = PusherClient( 'abc-def-123', options, autoConnect: false, enableLogging: true, ); // Create echo instance Echo echo = Echo( broadcaster: EchoBroadcasterType.Pusher, client: pusherClient, ); // Listening public channel echo.channel('channel-name-3').listen('EventName', (e) { print(e); }); // Accessing pusher instance echo.connector.pusher.onConnectionStateChange((state) { print(state!.currentState.toString()); });
"D/PusherClientPlugin: Event stream cancelled." "D/PusherClientPlugin: Event stream listening..." "D/PusherClientPlugin: [connecting]" "D/PusherClientPlugin: Subscribed: channel-name-3" "D/PusherClientPlugin: Event stream cancelled." "D/PusherClientPlugin: Event stream listening..." "D/PusherClientPlugin: [BIND] App\Events\EventName" flutter: connecting [connection] nw_endpoint_handler_set_adaptive_read_handler [C17.1 52.71.241.74:443 ready socket-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] unregister notification for read_timeout failed [connection] nw_endpoint_handler_set_adaptive_write_handler [C17.1 52.71.241.74:443 ready socket-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] unregister notification for write_timeout failed "D/PusherClientPlugin: [ON_ERROR]: message: App key abc-def-123 not in this cluster. Did you forget to specify the cluster?, code: Optional(4001)" "D/PusherClientPlugin: [disconnected]" flutter: disconnectedWhat did you expect to happen?
@chinloyal Do you have any solution for it. i have facing the same issue.
I am using laravel websockets on backend, and testing device is iPhone
Code Sample
Errors in console
"D/PusherClientPlugin: Event stream cancelled." "D/PusherClientPlugin: Event stream listening..." "D/PusherClientPlugin: [connecting]" "D/PusherClientPlugin: Subscribed: channel-name-3" "D/PusherClientPlugin: Event stream cancelled." "D/PusherClientPlugin: Event stream listening..." "D/PusherClientPlugin: [BIND] App\Events\EventName" flutter: connecting [connection] nw_endpoint_handler_set_adaptive_read_handler [C17.1 52.71.241.74:443 ready socket-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] unregister notification for read_timeout failed [connection] nw_endpoint_handler_set_adaptive_write_handler [C17.1 52.71.241.74:443 ready socket-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] unregister notification for write_timeout failed "D/PusherClientPlugin: [ON_ERROR]: message: App key abc-def-123 not in this cluster. Did you forget to specify the cluster?, code: Optional(4001)" "D/PusherClientPlugin: [disconnected]" flutter: disconnectedWhat did you expect to happen?