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

throws exception when listening to events #56

Open
abdulkash opened this issue Oct 6, 2022 · 0 comments
Open

throws exception when listening to events #56

abdulkash opened this issue Oct 6, 2022 · 0 comments
Assignees

Comments

@abdulkash
Copy link

E/flutter ( 3187): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: PlatformException(ON_EVENT_ERROR, com.google.gson.internal.LinkedTreeMap cannot be cast to java.lang.String, java.lang.ClassCastException: com.google.gson.internal.LinkedTreeMap cannot be cast to java.lang.String
E/flutter ( 3187): at com.pusher.client.channel.PusherEvent.getData(PusherEvent.java:40)
E/flutter ( 3187): at com.github.chinloyal.pusher_client.pusher.listeners.FlutterBaseChannelEventListener.onEvent$lambda-0(FlutterBaseChannelEventListener.kt:23)
E/flutter ( 3187): at com.github.chinloyal.pusher_client.pusher.listeners.FlutterBaseChannelEventListener.$r8$lambda$QLL3RY_DOP1OzB8zy2tM2lJPbw0(Unknown Source:0)
E/flutter ( 3187): at com.github.chinloyal.pusher_client.pusher.listeners.FlutterBaseChannelEventListener$$ExternalSyntheticLambda0.run(Unknown Source:4)
E/flutter ( 3187): at android.os.Handler.handleCallback(Handler.java:938)
E/flutter ( 3187): at android.os.Handler.dispatchMessage(Handler.java:99)
E/flutter ( 3187): at android.os.Looper.loopOnce(Looper.java:211)
E/flutter ( 3187): at android.os.Looper.loop(Looper.java:300)
E/flutter ( 3187): at android.app.ActivityThread.main(ActivityThread.java:8279)
E/flutter ( 3187): at java.lang.reflect.Method.invoke(Native Method)
E/flutter ( 3187): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576)
E/flutter ( 3187): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1074)
E/flutter ( 3187): , null)
E/flutter ( 3187):

this is d event the server sends in json
{type: 'api-message', time: '17:43:37', details: 'Channel: channel, Event: App\Events\RealTimeMessage', data: '{"name":"abdul","message":"hello0000000000","time":"2022-10-06T17:43:37+00:00"}'}

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

2 participants