-
Notifications
You must be signed in to change notification settings - Fork 7
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
Using ->toOthers() results in a "Ably error: Malformed message; invalid connectionKey" Same as issue 38 #48
Comments
Hi @graphem thanks for raising the issue. Can you confirm you are using laravel-echo at client side? It will be great if you can create a dummy repo that can help us reproduce the issue. Then we can try to fix it ASAP. |
Yes I am using Echo. I will see what I can do for the dummy repo. Thanks! |
Thanks, that would be super useful 👍 |
@sacOO7 Here is the repo: You will need to run the migration and add a room in the DB, then visit the /rooms/{slug}. Then you will see the 500 happening on trying to publish a message. Thanks!! |
@graphem thanks for creating the repo. We will try to reproduce from our side and post updates here |
@sacOO7 Were you able to reproduce? |
Hi @graphem I was able to reproduce the issue. Although, I had to manually edit the db for rooms ( by following original video series from source ) Btw, does this code work properly for reverb? |
Seems I have found out the issue. This also needs sending |
And yes the project works fine with Reverb. |
Hi @graphem issue is fixed and released in latest versions of laravel-broadcaster and laravel-echo. |
Btw, do star both repos if you feel like it : ) |
Amazing! Will test it out soon |
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
The text was updated successfully, but these errors were encountered: