XenForo WebSockets

XenForo WebSockets 2.1.1

Upgrade No permission to download
Mar 7, 2023
78
28
18
In this new update, please consider adding support for Centrifugo if possible.

Thank you sincerely!
 
Oct 23, 2023
3
1
3
Exception: Missing installed.json at src/addons/bs/XFWebSockets/vendor/composer/. This may not be a valid composer directory.
 
  • Thinking
Reactions: 021
Premium
Developer
Jun 11, 2020
595
469
63
021 updated XenForo WebSockets with a new update entry:

2.1.0

What's new?​

  • This update is supposed to fix an annoying bug that has existed since the add-on release: incorrect display of online users in add-ons such as Real-Time Chat and XenForo Messenger 🎉
  • Implemented an elegant solution for updating the csrf token and connecting to the websocket server when restoring a page from the back-forward cache: this should improve the connection when restoring a tab in a browser on mobile devices and help avoid the "Security...

Read the rest of this update entry...
 
Last edited:
May 4, 2023
11
4
3
Thanks for the update, but now I am getting a load of server errors in the log - they all seem to be related to someone using Google translate to view my site?

Code:
ParseError: syntax error, unexpected '(' src\addons\BS\XFWebSockets\Listener.php:65
Generated by: Unknown account Dec 28, 2024 at 7:16 PM

Code:
#0 src\vendor\composer\ClassLoader.php(427): Composer\Autoload\{closure}('W:\\HostingSpace...')
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass('BS\\XFWebSockets...')
#2 [internal function]: spl_autoload_call('BS\\XFWebSockets...')
#3 src\XF\Extension.php(79): is_callable(Array)
#4 src\XF\App.php(3020): XF\Extension->fire('app_setup', Array, NULL)
#5 src\XF\App.php(2030): XF\App->fire('app_setup', Array)
#6 src\XF\Pub\App.php(94): XF\App->setup(Array)
#7 src\XF.php(497): XF\Pub\App->setup(Array)
#8 src\XF.php(520): XF::setupApp('XF\\Pub\\App')
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}

Code:
array(4) {
  ["url"] => string(18) "/broadcasting/auth"
  ["referrer"] => string(41) "https://www-mysite-com.translate.goog/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

I'm still on 2.2 if that makes any difference :)
 
Premium
Developer
Jun 11, 2020
595
469
63
Thanks for the update, but now I am getting a load of server errors in the log - they all seem to be related to someone using Google translate to view my site?

Code:
ParseError: syntax error, unexpected '(' src\addons\BS\XFWebSockets\Listener.php:65
Generated by: Unknown account Dec 28, 2024 at 7:16 PM

Code:
#0 src\vendor\composer\ClassLoader.php(427): Composer\Autoload\{closure}('W:\\HostingSpace...')
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass('BS\\XFWebSockets...')
#2 [internal function]: spl_autoload_call('BS\\XFWebSockets...')
#3 src\XF\Extension.php(79): is_callable(Array)
#4 src\XF\App.php(3020): XF\Extension->fire('app_setup', Array, NULL)
#5 src\XF\App.php(2030): XF\App->fire('app_setup', Array)
#6 src\XF\Pub\App.php(94): XF\App->setup(Array)
#7 src\XF.php(497): XF\Pub\App->setup(Array)
#8 src\XF.php(520): XF::setupApp('XF\\Pub\\App')
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}

Code:
array(4) {
  ["url"] => string(18) "/broadcasting/auth"
  ["referrer"] => string(41) "https://www-mysite-com.translate.goog/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

I'm still on 2.2 if that makes any difference :)
Hello! What is your PHP version?
 
Premium
Developer
Jun 11, 2020
595
469
63
8.1. I upgraded especially 😁
Please check by this link:
/admin.php?tools/phpinfo
You should not have this error if the PHP version your forum runs on is higher than 8.0
 
Premium
Developer
Jun 11, 2020
595
469
63
Ok found an easy way to trigger it.

Go to : https://translate.google.com/?sl=zh-CN&tl=en&op=websites

Put in your website homepage and submit.

The page loads up ok, but the errors will now appear in the log.
I noticed that the domain .translate.goog is indicated in the logs. Perhaps you have a separate environment configured to handle this domain? Try uploading a test PHP file with the following content:
PHP:
<?php

phpinfo();
And open it with Google Translate - PHP version is still 8.1?
 
May 4, 2023
11
4
3
Yup, still 8.1.

1735465101840.png

The error only (seemingly) occurs with Google translated pages - there are now a few hundred in the logs, but all of them have the .translate.goog referrer.