OJSXC not working (javascript chat)

I have a functional openfire server with bosh enabled (tested with converse.js).
When I log into Owncloud I don’t see the chat icon and the chat doesn’t work.
When I click “Log in without chat” I see this:

with the message:
Uncaught TypeError: jsxc.options.loginForm.form.off is not a function
I tried some things like changing the server and it doesn’t matter if I use internal or external, it won’t work.
I know the server configuration is ok because I receive the message “BOSH Server reachable.” and sometimes the chat works.
When it works and I logout of Owncloud/Nextcloud I can still use the chat but I couldn’t take a screenshot of that.
I was using owncloud 8, then I moved to owncloud 9, then I moved to Nextcloud. (Always the same behavior)
I use debian 8
I am using apache2, mysql.
I installed ojsxc by downloading the compressed file and via “+ Apps”.
I think this could be a configuration problem but I see the same behavior with XAMPP in a different debian.
Nextcloud log:
Error PHP Invalid argument supplied for foreach() at /var/www/html/nextcloud/apps/ojsxc/ajax/getSettings.php#53 2016-10-05T17:47:48+00:00 –
Error PHP Invalid argument supplied for foreach() at /var/www/html/nextcloud/apps/ojsxc/ajax/getSettings.php#53 2016-10-05T17:25:52+00:00 –
Error PHP Invalid argument supplied for foreach() at /var/www/html/nextcloud/apps/ojsxc/ajax/getSettings.php#53 2016-10-05T17:13:14+00:00 –

I am on Nextcloud 10.1 (Ubuntu 16.04, with mariadb and php7) and with the experimental internal xmpp server this plugin works fine.

Previously I also had it working fine with a external prosody server.

I know this probably doesn’t help you much, but the plugin itself seems fine.

I installed the latest beta version of OJSXC from https://github.com/owncloud/jsxc.chat/tree/master/build

After logiing out of Nextcloud or when I go to “Users” or to “Admin” the
chat icon disappears. The only thig that makes the chat come back is to
log out ang log in using the “Log in without chat” option.

I have the same behavior in all versions of OJSXC the difference I
found is that I can log in with the beta version. Previous versions
don’t allow me to log in using “Log in without chat” and I have to
execute >jsxc.storage.removeItem(‘sid’); in the console and then I can log in.

You can watch this behavior in this one and a half minute video:

The complete video of that installation is here (20 min aprox.):


I have a similar problem but on owncloud 9 with OJSXC beta2

I followed the same video 20min version of @gclaurev with an exception that I have LDAP authentication.
SO what is installed

  1. Nextcloud 10.0.1
  2. OpenLDAP
  3. Openfire
  4. OJSXC version 3.0.1 official not beta

Should I use the internal Chat everything work fine.
Should I enable the Bosh server I sometimes can login but only once and then no way to login again with same user.
I can login with chat disabled at any time.
There is no way that chat can accept user and password.

On openfire I can see every change I make for a user from LDAP phpldapadmin.
I suspect that OJSXC still has a bug somewhere.

Hey guys,

I am sorry that you have trouble with the chat, but maybe you try the latest beta release from the nextcloud app store: https://apps.nextcloud.com/apps/ojsxc

Most of the time issues occur with the same-origin-policy. My recommend way to get rid of such problems is to use a proxy as described in our wiki.

I’ve installed Chat app and not sure it does work or not.
Status for my user shows online.
But when I add any user to contact I do not see it appears in roster.
It always shows “Your roster is empty, add a new contact.”

BOSH service shows reachable as well in settings.
XMPP domain: is jabber-node1.domain.com
I’ve used proxy settings in NC apache to proxy http-bind to my Openfire Server.

ProxyPass /http-bind http://jabber-node1.domain.com:7070/http-bind/
ProxyPassReverse /http-bind http://jabber-node1.domain.com:7070/http-bind/

What I am doing wrong?