Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

404 endpoint #351

Closed
Francois-Francois opened this issue Apr 7, 2020 · 4 comments
Closed

404 endpoint #351

Francois-Francois opened this issue Apr 7, 2020 · 4 comments
Labels
postponed Will be postponed until further notice

Comments

@Francois-Francois
Copy link

Hello,

When running a broadcasting event, running laravel-websokets and laravel horizon, event job failed and I have this kind of url hitting from my php stdout :

php_1 | 172.21.0.6 - - [07/Apr/2020:16:09:59 +0000] "POST /apps/~~~~/events?auth_key=~~~~~&auth_signature=~~~~~&auth_timestamp=1586275799&auth_version=1.0&body_md5=~~~~~~ HTTP/1.1" 404 10558 "-" "-"

I've cleared my route cache, and this url is not available in my route:list.

Is there something I'm missing ?

Thank you

@stayallive
Copy link
Contributor

This route is available on the server running when executing php artisan websockets:serve and not in your app itself (nor should it be).

It looks like your Pusher config might be pointed to the incorrect place (it should point to the IP/host + port where php artisan websockets:serve is listening on).

@Francois-Francois
Copy link
Author

I've installed this package in my current laravel application (like laravel horizon). Maybe it has to be a totally separate repo ?

If it's ok to install it inside my laravel app, then it's listening on localhost, so I think localhost sould not be a 404 because it's pointing to the packages url ?

@stayallive
Copy link
Contributor

stayallive commented Apr 17, 2020

No it can certainly be installed in your current app just like Horizon.

But just like Horizon you need to run php artisan websockets:serve which by default wil listen on port 6001, the POST request should be sent there, so if you are on localhost it should be sent to http://localhost:6001/apps/... instead of to your app which might be running on http://localhost/..., the websockets:serve command starts up a server application mimicking the Pusher API. It is explained how to configure "Pusher" (but it will actually be talking to the websockets server started by the artisan command) in your Laravel app here.

So this package does not add routes to your current app but it add the php artisan websockets:serve to start up the websockets server, so it shouldn't show up in php artisan route:list.

I think either you are misunderstanding what this package provides and how it works or I am misunderstanding what is going wrong on your end 😄

@erlangparasu
Copy link
Contributor

maybe related to this PR?
#434

@rennokki rennokki added the postponed Will be postponed until further notice label Aug 13, 2020
@mpociot mpociot closed this as completed Feb 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
postponed Will be postponed until further notice
Projects
None yet
Development

No branches or pull requests

5 participants