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

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

Open
omi-pjniones opened this issue Nov 4, 2023 · 4 comments

Comments

@omi-pjniones
Copy link

omi-pjniones commented Nov 4, 2023

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
Copy link

I'am facing the same problem, any updates ?

@officialismailshah
Copy link

did someone sort this out?

@benw-pusher
Copy link

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
Copy link

Did anyone ever get to solve this issue?

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

5 participants