beyondcode / laravel-websockets

Websockets for Laravel. Done right.
https://beyondco.de/docs/laravel-websockets
MIT License
5.08k stars 628 forks source link

//demo.test/js/utf8.js.map: HTTP error: status code 404, net :: ERR_HTTP_RESPONSE_CODE_FAILURE. #395

Closed BojanMrkaja closed 4 years ago

BojanMrkaja commented 4 years ago

Hi Crew, I need help

For two days now I have been trying to create a RealTime chat application with Laravel Websockets and Laravel-Echo. I configured Laravel WebSockets according to the official documentation and everything worked ok for me as far as the server is concerned, When I send a message via tinker through the Message event everything is ok, I am shown this message in real time in the Websocket dashboard. But when I try to listen to the same channel with Echo in the frontend, that is. I log in to the console, the same event does not work. Could not load content for http: //demo.test/js/utf8.js.map: HTTP error: status code 404, net :: ERR_HTTP_RESPONSE_CODE_FAILURE. Since I haven't worked with Broadcasting variants with Laravel so far, I first wanted to do a demo project, just to understand how it all works. But here, at first I came across a problem ... I tried to find solutions on the net but nothing worked. I also tried with Pusher but I ran into a similar problem.

Myestery commented 4 years ago

I'm having the same problem bro, Just try getting an SSL certificate for localhost

BojanMrkaja commented 4 years ago

I'm having the same problem bro, Just try getting an SSL certificate for localhost

Can you explain to me where I can do that, according to the documentation I could not find anything .Thanks man

blakeyman commented 4 years ago

I had days of problems trying to get things "running locally". This method worked for me (on my desktop I use Apache & MAMP Pro). https://deliciousbrains.com/ssl-certificate-authority-for-local-https-development/ As per the doc I created my "own" certificate authority and then a cert/key for my test domain "gfs" (so in your instance "demo.test") Got it working for Firefox (once I'd imported my myCA.pem into preferences - as per foot note in article) and fine on Safari. No joy for Chrome but that's a separate issue (and to do with reverse proxy the request). Let me know if that helps!