-1

I'm beginner to use laravel pusher with vue js. I used this tutorial to make a chat with pusher but it is not working truely. Users do not receive the other users' messages.

enter image description here

As you see in the picture, I receive these errors:

app.js:37257 WebSocket connection to 'wss://ws-us2.pusher.com/app/1797b1153d5dbf7d494f?protocol=7&client=js&version=4.2.2&flash=false' failed: Error in connection establishment: net::ERR_PROXY_CONNECTION_FAILED

Pusher : Connecting : {"transport":"xhr_streaming","url":"https://sockjs-us2.pusher.com:443/pusher/app/1797b1153d5dbf7d494f?protocol=7&client=js&version=4.2.2"} app.js:38904 OPTIONS https://sockjs-us2.pusher.com/pusher/app/1797b1153d5dbf7d494f/339/6g9476l7/xhr_streaming?protocol=7&client=js&version=4.2.2&t=1526190472039&n=3 net::ERR_PROXY_CONNECTION_FAILED

I did everything which has been explained in the tutorial!

Ever Adm
  • 61
  • 2
  • 6
  • Are you sure the internet was connected on your machine when you ran this? Can you check whether `ping ws-us2.pusher.com` works from the command line? – Will Sewell May 15 '18 at 11:13
  • yes I checked it, there's no connection problem! – Ever Adm May 19 '18 at 08:09
  • I think you might be using a proxy server which does not allow WebSockets. What happens if you visit [this page](https://websocket.org/echo.html) on the same browser? Do you see the same error in the debug console? – Will Sewell May 22 '18 at 21:55
  • @will-sewell I checked https://websocket.org/echo.html and it works right and there is not error in console – Ever Adm May 23 '18 at 06:48
  • What about if you go on this page: http://test.pusher.com/? – Will Sewell May 23 '18 at 13:42

1 Answers1

0

I resolved my problem and I forgot to reply. It was to upgrade my node then I had to downgrade Prettier to 1.12.0:

npm install --save-dev prettier@1.12.0

npm run dev

Error fixed. I think it's not bad to add this comment that you should put queue driver to redis and run queue:work to get the expected result, because it has not been mentioned in that tutorial.

Ever Adm
  • 61
  • 2
  • 6