app-message event not fired

Daniel808 Member


it seems the "app-message" event is not fired.

I tried callObject.on("app-message", handler) and the useDailyEvents hook in react.
The func call: callObject.sendAppMessage({ message: 'Hello, World!' }, '*');

"@daily-co/daily-js": "^0.47.0",

"@daily-co/daily-react": "^0.10.0"

Best Answer

  • christian
    christian Dailynista
    Answer ✓

    Hey @Daniel808,

    the app-message event is pretty time-sensitive, so it’s important that at the time the event is emitted, that:

    • the component or hook listening for the event is rendered
    • the signaling connection (in SFU mode) or data channel (in P2P mode) is established

    Also note that the client sending the app message does not receive it.

    A common pitfall is trying to send an app-message inside of the joined-meeting event handler, when the call is in P2P mode: most likely the data channel, which is responsible for transmitting the app message data, is not setup, yet.

    In case these tips doesn’t help you fix the issue yourself, it’s good practice to provide a small reproduction of the issue. I.e. is a simple, free and helpful tool to create these types of reproduction samples.

    Keep us posted about your progress!




  • Daniel808

    The client emitting the event doesn't receive it. Got it, thank you!