#Chatify package in Laravel not showing messages in real time

1 messages · Page 1 of 1 (latest)

vale tusk
#

So, the thing is, the chatify package works completely fine but the messages aren't being updated instantly. What I mean is, if I send a message, it shows a clock sign in the bottom-right corner and if I refresh the page, it then shows 1 or 2 seconds ago.

Similarly, on the receiving end, if a the sender starts typing a message, it shows that pop up that the other person is typing but even if the sender does send the message, nothing shows up on the receiver's end until and unless he or she refreshes the page after which it shows the message.

Can you please help me out here? I don't even know what code to share in this scenario to give you guys more context because, otherwise, the package works just fine.

Please help asap.

glacial dock
#

Sounds to me like your websocket connection to pusher isn't setup properly then. If you open your dev console, I'm willing to bet you'll have WSS/websocket connection errors displayed.

#

But no, I've never used Chatify.

vale tusk
#

I saw this when I opened developer console. There are also errors related to loading some css and user avatars (which might explain why I am not seeing any avatars) but I need help with this ig.

#

@glacial dock

glacial dock
#

Ah right, you said typing shows. So the issue is sending a message is throwing a server error. Context tells me your message is being stored, but whatever happens directly after is failing (which might be the api call to pusher for all I know.) You'll need to check your error log to find out why. storage/logs/laravel.log

#

Also, please try to take screenshots directly in your OS and not through a phone, when showing console errors. Code wise, no screenshots please. (Per rules)

vale tusk
#

I am sorry. Just frustated cause I have a project due and I am getting nowhere with this. I'll check the logs.

glacial dock
#

All good. Your error log should tell us the root cause.

#

It's either failing to trigger the pusher broadcast, or whatever else chatify is trying to do

#

Hope it isn't a school project bogaOof

vale tusk
#

@glacial dock I tried to look up the logs but can't seem to figure out exactly what I should look for. The function for sending the message is 'send' inside MessagesController, I believe.

glacial dock
#

Well, you'd need to share some actual errors from the log for anyone to be able to help. Most recent logs are on the bottom FYI

vale tusk
#

@glacial dock should i upload logs file here for u

#

It certainly logs a few SSL certificate errors at the bottom related to Pusher

glacial dock
#

I would google "laravel pusher ssl error". If you are trying to run that locally, then you must instruct laravels pusher driver, which uses guzzle under the hood, to not verify ssl. AFAIK

vale tusk
#

@glacial dock dude this just speak volumes about how much you know, you never worked with this package and here you just solved my headache man

#

Thanks

#

Yes disabling ssl verification in guzzle was what was needed