Real time chat

Real time chat 1.5.0

Upgrade No permission to download
Premium
Developer
Jun 11, 2020
520
361
63
021 submitted a new resource:

[021] Real time chat - Chat with instant messaging.

Instant messaging and speed 🚀​

These two points are the core of this add-on.
The Real time chat uses Long-Polling and Websockets technologies to ensure instant communication, which means that all events in the chat will occur with minimal delay for users.
Also, the built-in option "Fetch messages after page load" allows you to completely disable the effect of chat on page loading speed: initially, instead of messages, there will be their skeletons, then after a second...

Read more about this resource...
 
  • Like
Reactions: scriptop
Premium
Developer
Jun 11, 2020
520
361
63
I get it. I mean every time the server it restarts.

Then we have to manually run this command to open the chat right?
I apologize for the misunderstanding. It is advisable to stop the chat server before restarting the server. Unfortunately I can't give a complete answer to your question as it needs to be verified. But as far as I remember, yes, you will just need to start the chat server
 
Mar 7, 2023
73
23
8
Hello dear,

I was using it normally until today when I restarted the server and couldn't start chat_cli.

[root@hello]# php chat_cli start -d

An unexpected error occurred. Please try again later.

Can you provide some assistance?
 
Mar 7, 2023
73
23
8
Server error log
  • LogicException: The session key must be overridden.
  • src/XF/App.php:898
  • Generated by: Unknown account
  • Apr 25, 2023 at 9:46 PM

Stack trace​

#0 src/XF/Container.php(31): XF\App->XF\{closure}(Object(XF\Container))
#1 src/XF/App.php(2829): XF\Container->offsetGet('session')
#2 src/addons/xenMade/LAU/Listener.php(9): XF\App->session()
#3 src/XF/Extension.php(69): xenMade\LAU\Listener::app_setup(Object(XF\App))
#4 src/XF/App.php(2990): XF\Extension->fire('app_setup', Array, NULL)
#5 src/XF/App.php(2028): XF\App->fire('app_setup', Array)
#6 src/XF.php(497): XF\App->setup(Array)
#7 src/XF.php(486): XF::setupApp('\\XF\\App')
#8 src/addons/BS/RealTimeChat/Cli/WorkermanRunner.php(20): XF::app()
#9 chat_cli(16): BS\RealTimeChat\Cli\WorkermanRunner->run()
#10 {main}

Request state​

array(1) {
["cli"] => string(17) "chat_cli start -d"
}
 
Premium
Developer
Jun 11, 2020
520
361
63
Hello dear,

I was using it normally until today when I restarted the server and couldn't start chat_cli.

[root@hello]# php chat_cli start -d

An unexpected error occurred. Please try again later.

Can you provide some assistance?
Hello,

Make sure the server is stopped: php chat_cli stop
If that doesn't help, try disabling the Login as User add-on.

Regards,
021
 
Mar 7, 2023
73
23
8
Hello,

Make sure the server is stopped: php chat_cli stop
If that doesn't help, try disabling the Login as User add-on.

Regards,
021
I have tried both of the above methods but it still doesn't work.

Thanks for answering.
 
Premium
Developer
Jun 11, 2020
520
361
63
I have tried both of the above methods but it still doesn't work.
Check if there are no chat server processes running: ps -e | grep worker
Send me the output of this command, please.

Have you tried disabling all add-ons except chat?
 
Mar 7, 2023
73
23
8
Check if there are no chat server processes running: ps -e | grep worker
Send me the output of this command, please.

Have you tried disabling all add-ons except chat?


I have tried disabling some add-ons, and it started working.
 
  • Like
Reactions: 021
Mar 7, 2023
73
23
8
Server error log
  • ErrorException: [E_WARNING] stream_socket_client(): Unable to connect to tcp://127.0.0.1:3205 (Connection refused)
  • src/addons/BS/RealTimeChat/vendor/workerman/phpsocket.io-emitter/src/Emitter.php:33

Stack trace​

#0 [internal function]: XF::handlePhpError(2, '[E_WARNING] str...', '/home/almalinux...', 33)
#1 src/addons/BS/RealTimeChat/vendor/workerman/phpsocket.io-emitter/src/Emitter.php(33): stream_socket_client('tcp://127.0.0.1...', 0, '', 3)
#2 src/addons/BS/RealTimeChat/vendor/workerman/phpsocket.io-emitter/src/Emitter.php(23): Emitter->connect()
#3 src/addons/BS/RealTimeChat/Listener.php(44): Emitter->__construct('127.0.0.1', '3205')
#4 src/XF/Container.php(31): BS\RealTimeChat\Listener::BS\RealTimeChat\{closure}(Object(XF\Container))
#5 src/XF/App.php(2520): XF\Container->offsetGet('chatEmitter')
#6 src/addons/BS/RealTimeChat/Pub/Controller/Chat.php(189): XF\App->offsetGet('chatEmitter')
#7 src/addons/BS/RealTimeChat/Pub/Controller/Chat.php(198): BS\RealTimeChat\Pub\Controller\Chat->onVisitorWriting()
#8 src/XF/Mvc/Dispatcher.php(352): BS\RealTimeChat\Pub\Controller\Chat->actionWriting(Object(XF\Mvc\ParameterBag))
#9 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('BS\\RealTimeChat...', 'Writing', Object(XF\Mvc\RouteMatch), Object(BS\RealTimeChat\Pub\Controller\Chat), NULL)
#10 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(BS\RealTimeChat\Pub\Controller\Chat), NULL)
#11 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#13 src/XF.php(524): XF\App->run()
#14 index.php(20): XF::runApp('XF\\Pub\\App')
#15 {main}
 

Attachments

  • Screenshot 2023-05-05 230039.png
    Screenshot 2023-05-05 230039.png
    26.5 KB · Views: 3
  • Like
Reactions: foxneo.tech
Premium
Developer
Jun 11, 2020
520
361
63
Server error log
  • ErrorException: [E_WARNING] stream_socket_client(): Unable to connect to tcp://127.0.0.1:3205 (Connection refused)
  • src/addons/BS/RealTimeChat/vendor/workerman/phpsocket.io-emitter/src/Emitter.php:33

Stack trace​

#0 [internal function]: XF::handlePhpError(2, '[E_WARNING] str...', '/home/almalinux...', 33)
#1 src/addons/BS/RealTimeChat/vendor/workerman/phpsocket.io-emitter/src/Emitter.php(33): stream_socket_client('tcp://127.0.0.1...', 0, '', 3)
#2 src/addons/BS/RealTimeChat/vendor/workerman/phpsocket.io-emitter/src/Emitter.php(23): Emitter->connect()
#3 src/addons/BS/RealTimeChat/Listener.php(44): Emitter->__construct('127.0.0.1', '3205')
#4 src/XF/Container.php(31): BS\RealTimeChat\Listener::BS\RealTimeChat\{closure}(Object(XF\Container))
#5 src/XF/App.php(2520): XF\Container->offsetGet('chatEmitter')
#6 src/addons/BS/RealTimeChat/Pub/Controller/Chat.php(189): XF\App->offsetGet('chatEmitter')
#7 src/addons/BS/RealTimeChat/Pub/Controller/Chat.php(198): BS\RealTimeChat\Pub\Controller\Chat->onVisitorWriting()
#8 src/XF/Mvc/Dispatcher.php(352): BS\RealTimeChat\Pub\Controller\Chat->actionWriting(Object(XF\Mvc\ParameterBag))
#9 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('BS\\RealTimeChat...', 'Writing', Object(XF\Mvc\RouteMatch), Object(BS\RealTimeChat\Pub\Controller\Chat), NULL)
#10 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(BS\RealTimeChat\Pub\Controller\Chat), NULL)
#11 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#13 src/XF.php(524): XF\App->run()
#14 index.php(20): XF::runApp('XF\\Pub\\App')
#15 {main}
It looks like your server is not running.
 
  • Like
Reactions: hello2029