pusher-channels-flutter icon indicating copy to clipboard operation
pusher-channels-flutter copied to clipboard

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

Open omi-pjniones opened this issue 1 year ago • 4 comments

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

omi-pjniones avatar Nov 04 '23 09:11 omi-pjniones

I'am facing the same problem, any updates ?

Djihanegh avatar Nov 26 '23 21:11 Djihanegh

did someone sort this out?

officialismailshah avatar Dec 18 '23 12:12 officialismailshah

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.

benw-pusher avatar Dec 18 '23 13:12 benw-pusher

Did anyone ever get to solve this issue?

ComputerMaverick69 avatar Jul 17 '24 12:07 ComputerMaverick69