pusher / pusher-channels-flutter

Pusher Channels client library for Flutter targeting IOS, Android, and WEB
MIT License
74 stars 133 forks source link

Unhandled Exception: Trigger event is only for private/presence channels in flutter #136

Open omi-pjniones opened 1 year ago

omi-pjniones commented 1 year ago

I followed the instructions from the docs but when pushing data, the connection has problem.

supposed "testsssd" would display on the Debug console but won't

image

image

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: FormatException: Unexpected end of input (at character 2785)

image

Djihanegh commented 12 months ago

I'am facing the same problem, any updates ?

officialismailshah commented 11 months ago

did someone sort this out?

benw-pusher commented 11 months ago

As per the error message, you can only trigger client events (events that originate on the client) when subscribed to a private or presence channel. If you subscribe to such a channel then this would work.

Note that to subscribe to private or presence channels you first need to authorise the client.

Further reading on these topics is available below: Client events Private channels Presence channels Authorisation

Alternatively, if you are just looking to test the client behaviour when it receives an event then you could use the debug console to generate a test event. See https://pusher.com/docs/channels/getting_started/debugging/#sending-test-events-using-the-event-creator for info.

ComputerMaverick69 commented 4 months ago

Did anyone ever get to solve this issue?