2

3 weeks agoby Hasnain Ali

Laravel Websocket Pakage

I have installed laravel Websocket Pakage after installing when i create a Event and broad cast it. I will see some of the error in console.

**WebSocket connection to 'wss://localhost/app/your-pusher-key?protocol=7&client=js&version=6.0.3&flash=false' failed: Error during WebSocket handshake: Unexpected response code: 404

** Access to XMLHttpRequest at 'https://sockjs.pusher.com/pusher/app/your-pusher-key/657/5epp5c0k/xhr_streaming?protocol=7&client=js&version=6.0.3&t=1594563925168&n=1' from origin 'https://localhost' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

POST https://sockjs.pusher.com/pusher/app/your-pusher-key/657/5epp5c0k/xhr_streaming?protocol=7&client=js&version=6.0.3&t=1594563925168&n=1 net::ERR_FAILED

i have check many forum but i didn't find reliable and working solution? Kindly help.

2

Hasnain Ali replied 3 weeks ago

0

Yes, i also run the socket server as well.

Another thing when i tried using websocket previous version it works fine but in newer version i am facing the above issues

9

Bhagyaraj Aj replied 3 weeks ago

0

Have you tried running with artisan serve

php artisan serve
Ask Question
Most Visited
Categories