Nextcloud 12 and chat ojsx integration doesn't work

I get this error with ojsxc chat app under nextcloud 12.

Error PHP Invalid argument supplied for foreach() at /var/www/nextcloud/apps/ojsxc/lib/ContactsMenu/Providers/ChatProvider.php#70

Hi. A fix for this error is in Only show icon if enabled + other fixes by LEDfan · Pull Request #18 · nextcloud/jsxc.nextcloud · GitHub. To use the Chat app (JSXC) without a external XMPP server, you’ll have to enable the internal XMPP server.

You can leave all other options as is. You’ll have to logout and then login again for the changes to take effect.

I hope this help!

I have now upgraded to ojsxc (XMPP Chat) to ver. 3.2.1 with NC12 but still have no luck with it, by using it’s internal server. Messages are not transmitted from one to other. Anyhow now the online status is partially working depending on what browser I use.(Microsoft Edge/ Google Chrome).

1 Like

Hi

I’m currently having exams, so I don’t have much time. Since the online status is working, the transportation is working, so I don’t see why it isn’t working. When you say online status is partially working do you mean it is not working in Edge?

To debug the issue of the chat messages can you have a look at the Nextcloud log file at data/nextcloud.log and enable debug mode for JSXC in the browser using: jsxc.storage.setItem("debug", true); and post any errors. Thanks!

@LEDfan Many thanks for your Attention. I get this Messages from the Chrome browser’s console.

Failed to set referrer policy: The value ‘same-origin’ is not one of ‘no-referrer’, ‘no-referrer-when-downgrade’, ‘origin’, ‘origin-when-cross-origin’, or ‘unsafe-url’. The referrer policy has been left unchanged.
Failed to set referrer policy: The value ‘same-origin’ is not one of ‘no-referrer’, ‘no-referrer-when-downgrade’, ‘origin’, ‘origin-when-cross-origin’, or ‘unsafe-url’. The referrer policy has been left unchanged.
logging:1 Refused to load the script ‘https://mydomain/nextcloud/apps/ojsxc/js/jsxc/lib/otr/vendor/salsa20.js’ because it violates the following Content Security Policy directive: “script-src ‘nonce-cktSNUNacDVGZXgzcjduTkhJWDRTNG5uY2hEOHduZHdyOEVlcDFDbE1Xcz06K2RjL1pOQTZYN2tPbVB5Skw2NmZJZmlNQ0VPSWhoTTN5YXBXNUFpVUJ5OD0=’ ‘unsafe-eval’”.

dsa-webworker.js:36 Uncaught DOMException: Failed to execute ‘importScripts’ on ‘WorkerGlobalScope’: The script at ‘https://mydomain/nextcloud/apps/ojsxc/js/jsxc/lib/otr/vendor/salsa20.js’ failed to load.
at onmessage (https://mydomain/nextcloud/apps/ojsxc/js/jsxc/lib/otr/lib/dsa-webworker.js:36:19)

Online status is not updated if one chat user is going offline by logging out from nextcloud. (Offline user remains with online status) Also Messages are not transported at all.

1 Like

related issue: https://github.com/nextcloud/jsxc.nextcloud/issues/30