pusher-community / pusher-realtime-chat-widget

Example Realtime Chat Widget that can be added to any web page or app.
97 stars 87 forks source link

unable to receive message #32

Closed arafay696 closed 7 years ago

arafay696 commented 7 years ago

i am using PHP library and i have complete all the steps, and also double check my APP KEY,ID and Secret: but when i try this:

http://localhost/pusher-realtime-chat/src/

Error: Pusher : Error : {"type":"WebSocketError","error":{"type":"PusherError","data":{"code":4001,"message":"Could not find app by key API_KEY. Perhaps you're connecting to the wrong cluster."}}}

luismfonseca commented 7 years ago

Your apps were created in ap2, so you need to specify the cluster in the Pusher instance.

So you need to update this for example, to pass a options field with cluster => 'ap2'. And also in the javascript client as well.

Perhaps I should create a MR to improve this...