laravel-chat icon indicating copy to clipboard operation
laravel-chat copied to clipboard

This is not working with laravel V5.5

Open ankitjain28may opened this issue 7 years ago • 13 comments

ankitjain28may avatar Jan 15 '18 13:01 ankitjain28may

You will need to provide the errors you having.

ammezie avatar Jan 15 '18 13:01 ammezie

Showing this error even i updated the credentials--

Pusher : Error : {"type":"WebSocketError","error":{"type":"PusherError","data":{"code":4001,"message":"Did you forget to specify the cluster when creating the Pusher instance?  App key 760cfdcc10984ce27838 does not exist in this cluster."}}}
app.js:33139:19
The connection to wss://ws-eu.pusher.com/app/760cfdcc10984ce27838?protocol=7&client=js&version=4.0.0&flash=false was interrupted while the page was loading.

ankitjain28may avatar Jan 15 '18 13:01 ankitjain28may

Did you you specify your Pusher app credentials inside .env? Please read the project readme.

ammezie avatar Jan 15 '18 14:01 ammezie

yes

ankitjain28may avatar Jan 15 '18 14:01 ankitjain28may

@ankitjain28may, it is probably because you entered the wrong Pusher Key. Check your config file and .env file.

D-sense avatar Jan 17 '18 15:01 D-sense

@ammezie , please correct the following errors in the code:

  • the 'cross-env' scripts paths in the package.json has changed and this will break the npm run ... functions. Solve it as shown https://github.com/JeffreyWay/laravel-mix/issues/478
  • There is an error saying "Pusher is not defined". Solve it by adding window.Pusher = require('pusher-js'); on bootstrap.js
  • I'm still fighting with another error: BroadcastException on line 106. Still battling it, and it is making the real time not to manifest itself

gthuo avatar Jan 29 '18 17:01 gthuo

@gthuo you can submit a PR to this effect.

ammezie avatar Jan 29 '18 17:01 ammezie

Showing this error i dont kow what this exactly means ....please can u help to solve--

Pusher : Error : {"type":"WebSocketError","error":{"type":"PusherError","data":{"code":4001,"message":"Did you forget to specify the cluster when creating the Pusher instance? App key 51611bdaceeaaa93b355 does not exist in this cluster."}}} app.js:33139:19 The connection to wss://ws-eu.pusher.com/app/51611bdaceeaaa93b355?protocol=7&client=js&version=4.0.0&flash=false was interrupted while the page was loading.

CJSX1 avatar Feb 27 '18 05:02 CJSX1

Make sure you specify the right app key in the right cluster

ammezie avatar Feb 27 '18 06:02 ammezie

In broadcasting.php encrypted should be false for localhost, only user true when you are on https:/. thanks https://laracasts.com/discuss/channels/laravel/laravel-54-event-broadcasting-not-work-with-echo-vuejs I have had the same

typ6a avatar May 01 '18 01:05 typ6a

\public\js\app.js

window.Echo = new __WEBPACK_IMPORTED_MODULE_0_laravel_echo___default.a({ broadcaster: 'pusher', key: Laravel.pusherKey, cluster: 'eu', encrypted: true });

cluster is hardcoded here , change restart the php artisan serve and it will work

aqib026 avatar Oct 12 '18 17:10 aqib026

https://github.com/ccmelas/ChatBox

conversations implemented as well , check this repo

aqib026 avatar Oct 12 '18 18:10 aqib026

  var pusher = new Pusher('API_KEY_HERE', {
    cluster: 'ap2',
    encrypted: false,
  });

Just put your app key 'API_KEY_HERE' here.

virenderscideas avatar Jul 22 '20 18:07 virenderscideas