laravel-websocket not working on hosting but works on localhost
Hi there, I tried this awesome library and everything seemed to be working as expected but does not work on the production server. Whenever I tried calling it does not work. Instead, it shows this error:
WebSocket is closed before the connection is established.
I have already tried the answers mentioned in the #191 but no avail. Kindly help me out. Thank you.
Same problem
Getting the above error or else
Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
Is there any solutions to this problem?
Once I get it working I will let you know...
Tried and tired of this not working at all. I have tried almost everything and even tried to modify the data inside bootstrap.js and then tried executing npm run dev. But no avail.
I pushed my npm run dev vue code to production and it seems to be failing at
createWebSocket: function (url) {
var Constructor = this.getWebSocketAPI();
return new Constructor(url); // here
},
window.Echo = new Echo({
broadcaster: 'pusher',
key: process.env.MIX_PUSHER_APP_KEY,
cluster: process.env.MIX_PUSHER_APP_CLUSTER,
wsHost: window.location.hostname,
wsPort: 6001,
wssPort: 6001,
disableStats: true,
enabledTransports: ['ws', 'wss']
});
Did not modify the code but just as it was listed in #96
Make sure you opened port 6001 on your server's firewall.
I have same problem, and I have tried to solve this by the command sudo ufw allow 6001 but still the issue remains. Everything is working on local machine. My server config is ubuntu 18.04, apache2.
Do ports have other configurations more than allowing on firewall which I must apply?
Hi there i am also facing same issue it is working in my local perfectly but on host i am not able to run i tried all tthe ways but no use,Can anyone help me out of this.
any solution any body finds?
Any solution??
Yeah please make sure your config/broadcast.php is having proper pusher credentials and also another file config/websockets.php. Please make a proper configuration on " resources/js/bootstrap.js". And also check whether you ufw enabled or not even if it disabled Please open that particular port with command " ufw allow
You can find a working solution here https://github.com/OpenLitterMap/openlittermap-web
Is there any solutions to this problem? may be you can find a working solution here https://stackoverflow.com/questions/65363295/laravel-websocket-is-not-connect-on-live-server
i have the same issue
I got this issue too, Tried with any thing I have: Use nginx proxy with ssl on https site always error:
❯ wscat -c "wss://domain.tld:6001/app/849dd8699?protocol=7&client=js&version=7.0.3&flash=false"
error: write EPROTO 140034167490432:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1544:SSL alert number 40
using IP:
wscat -c "<server_id>:6001/ws/app/849dd8699?protocol=7&client=js&version=7.0.3&flash=false"
error: socket hang up
using domain without port:
❯ wscat -c "wss://domain.tld/ws/app/849dd8699?protocol=7&client=js&version=7.0.3&flash=false"
error: Unexpected server response: 502
any update for this error?
open port 6001 in host