HomeX-It / pusher-websocket-flutter

An unofficial Flutter plugin that wraps pusher-websocket-java on Android and pusher-websocket-swift on iOS
MIT License
30 stars 23 forks source link

Unexpected error when starting pusher #25

Open SANCHEZSJD opened 3 years ago

SANCHEZSJD commented 3 years ago

Unexpected error when starting pusher

try { await Pusher.init(appKey, options); } catch (e) { print("Error in Pusher.init"); print(e.message); } ` D/PusherPlugin(32719): onCancel args: null

E/MethodChannel#pusher(32719): Failed to handle method call E/MethodChannel#pusher(32719): java.util.ConcurrentModificationException E/MethodChannel#pusher(32719): at java.util.HashMap$HashIterator.nextNode(HashMap.java:1441) E/MethodChannel#pusher(32719): at java.util.HashMap$EntryIterator.next(HashMap.java:1475) E/MethodChannel#pusher(32719): at java.util.HashMap$EntryIterator.next(HashMap.java:1473) E/MethodChannel#pusher(32719): at com.pusherwebsocket.pusher.PusherPlugin.init(PusherPlugin.java:114) E/MethodChannel#pusher(32719): at com.pusherwebsocket.pusher.PusherPlugin.onMethodCall(PusherPlugin.java:83) E/MethodChannel#pusher(32719): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:230) E/MethodChannel#pusher(32719): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85) E/MethodChannel#pusher(32719): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692) E/MethodChannel#pusher(32719): at android.os.MessageQueue.nativePollOnce(Native Method) E/MethodChannel#pusher(32719): at android.os.MessageQueue.next(MessageQueue.java:326) E/MethodChannel#pusher(32719): at android.os.Looper.loop(Looper.java:165) E/MethodChannel#pusher(32719): at android.app.ActivityThread.main(ActivityThread.java:6831) E/MethodChannel#pusher(32719): at java.lang.reflect.Method.invoke(Native Method) E/MethodChannel#pusher(32719): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) E/MethodChannel#pusher(32719): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:927) `

chinloyal commented 3 years ago

@SANCHEZSJD Try this package (pusher_client), it uses the latest java and swift clients and supports private encrypted channels