georgeboot / laravel-echo-api-gateway

Use Laravel Echo with API Gateway Websockets. Works with Bref.sh and Laravel Vapor.
MIT License
99 stars 21 forks source link

Channel connected but message doesn't been received #14

Open nandorossetti opened 2 years ago

nandorossetti commented 2 years ago

Good evening,

I am following the steps as they come in the readme. I manage to do everything but when the time comes, it connects me to the channel but the messages through the "notify" event in my case does not arrive.

This is my stacktrace:

just set socketId to JIj6rfzuiGYCE5Q= Subscribing to channels App.User.211 Received event subscription_succeeded on channel App.User.211

Captura de pantalla 2021-11-21 a las 3 55 38

Please, help me. Thanks

nandorossetti commented 2 years ago

Morning!

I'm still debbuging with a "normal" channel and the websocket returns "Internal server error".

Captura de pantalla 2021-11-21 a las 11 05 04

nenads commented 2 years ago

@nandorossetti any sucess ?

nandorossetti commented 2 years ago

I will try again in a few days, I think that could be a pusher and debugbar incompatibility issue, but I'm not 100% secure.

nenads commented 2 years ago

Execution failed due to configuration error: Malformed Lambda proxy response

Do you have this errors in Cloud Watch ? Enable logging for API Gateway

nandorossetti commented 2 years ago

Hi @nenads Now, I get this error for private and presence channel.

Axios Error

icreatestuff commented 2 years ago

Morning!

I'm still debbuging with a "normal" channel and the websocket returns "Internal server error".

Captura de pantalla 2021-11-21 a las 11 05 04

@nandorossetti this is what I'm seeing at the moment. Did you manage to get past this?

nandorossetti commented 2 years ago

I still have this error. I'm on Pusher by the moment.

icreatestuff commented 2 years ago

@nandorossetti understood. I've just followed @nenads advice to enable CloudWatch logging for the API Gateway and that does show me a Execution failed due to configuration error: Malformed Lambda proxy response response.

One piece of the README that I wasn't 100% sure on was related to the setup of the API Gateway where it reads Create a new Websocket API. Enter a name and leave the route selection expression to what it is.. When I created the API Gateway this field had a placeholder value of $request.body.action, which I had to type in manually otherwise I couldn't progress through the setup process. Assuming I've got that right I can't see where I've got any of the setup steps wrong.

@georgeboot any clues to where we need to look to debug?

nenads commented 2 years ago

Presance channel is not implemented if I understand.

Private one works.

michaelaguiar commented 1 year ago

I also see this Internal Server Error with Execution failed due to configuration error: Malformed Lambda proxy response in the API Gateway logs. Everything works as expected, but how can we resolve this error? Where exactly is the malformed request coming from?

tntsoft commented 1 year ago

This is still a thing, but it doesn't work at all for me now.

image

Any help appreciated.