Skip to content

Using ->toOthers() results in a "Ably error: Malformed message; invalid connectionKey" Same as issue 38 #48

@graphem

Description

@graphem

Hi!

Seems I am getting this as well when using the method in Laravel. I have all the latest packages and Laravel 11 latest.

broadcast(new ChatMessageCreated($message))->toOthers();

Result in:

[2024-09-15 01:38:06] local.ERROR: Ably error: Malformed message; invalid connectionKey {"userId":1,"exception":"[object] (Illuminate\Broadcasting\BroadcastException(code: 0): Ably error: Malformed message; invalid connectionKey at /vendor/ably/laravel-broadcaster/src/AblyBroadcaster.php:187)

I check the X-Socket-Id, it is there. And the socket is in the payload sent to the Rest api

I am really not sure what causes this. I do see that have a couple of websocket initiating, I did connect to different channels as I have a channel fro chat, for announcement and for some other events.

So not sure why the socket id a invalid connectionkey.

I check both on the front end and in the AblyBroadcaster.php and the key are exactly the same.

┆Issue is synchronized with this Jira Task by Unito

Metadata

Metadata

Assignees

Labels

bugSomething isn't working. It's clear that this does need to be fixed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions