jsxc / xmpp-cloud-auth

:key: Authentication hub for Nextcloud+JSXC→Prosody, ejabberd, saslauthd, Postfix
https://www.jsxc.org
MIT License
59 stars 18 forks source link

Nextcloud crash when running xcauth #84

Open nk86 opened 4 years ago

nk86 commented 4 years ago

Dear all, I installed Nextcloud 17.0 on nginx and php-fpm with ejabberd 18.01 and xcauth 2.0.3+. The OS is Ubuntu 18.04.3 LTS on a RockPro64 ARM SBC. Nextcloud and ejabberd are working fine. When I start xcauth I can login in ejabberd with the Nextcloud accounts. The communication with the bosh interface works fine as well. Xcauth reports in its log file that authentication worked.

However, after some minutes I cannot login in Nextcloud anymore. After submitting the password it will freeze at "logging in". After killing or restarting the xcauth service I'm able to login again until it crashes the next time. When I managed to login I can also not access ejabberd accounts from Nextcloud. The ejabberd log file always reports that the username or password is invalid. Still, the main problem is that Nextcloud does not work at all when xcauth crashed.

Sometimes there is also a python exception in xcauth.err: File "/usr/lib/dist-packages/xclib/authops.py", line 107, in perform s.listen() OSError: [Errno 88] Socket operation on non-socket

During handling of the above exception, another exception occured:

Traceback (most recent call last): File "/usr/sbin/xcauth", line 17, in perform(args) File "/usr/lib/python3/dist-packages/xclib/authops.py", line 112, in perform perform_from_fd(sys.stdin, sys.stdout, xc, args.type, closefds=(sys.stdin, sys.stdout,s)) File "/usr/lib/python3/dist-packages/xclib/authops.py", line 175, in perform_from_fd for data in smtp.read.request(infd, outfd): File "/usr/lib/python3/dist-packages/xclib/ejabberd_io.py", line 15, in read_request line = infd.read(2)

Can you please help me to make run Nextcloud together with xcauth?

nkrupp commented 4 years ago

I did some debugging and the problem is that only every second nextcloud login is successful. When pressing the login button first it will show "logging in" forever. If I reload the page and press it again it will login without any problems. There is an exception in the javascript log:

main.js?v=496616e2-15:396 JQMIGRATE: Migrate is installed, version 1.4.1 main.js?v=496616e2-15:1095 oc_config is deprecated: use OC.config instead He @ main.js?v=496616e2-15:1095 main.js?v=496616e2-15:1095 oc_appswebroots is deprecated: use OC.appswebroots instead He @ main.js?v=496616e2-15:1095 main.js?v=496616e2-15:1095 oc_config is deprecated: use OC.config instead He @ main.js?v=496616e2-15:1095 main.js?v=496616e2-15:1095 oc_appswebroots is deprecated: use OC.appswebroots instead He @ main.js?v=496616e2-15:1095 jsxc.min.js?v=496616e2-15:1 State changed to INITIATING jsxc.min.js?v=496616e2-15:1 Try to relogin jsxc.min.js?v=496616e2-15:1 Logout was forced or I found no valid jid jsxc.min.js?v=496616e2-15:1 State changed to TRYTOINTERCEPT jsxc.min.js?v=496616e2-15:1 State changed to INTERCEPTED jsxc.min.js?v=496616e2-15:1 Variable serverType doesn't exist. It was created. jsxc.min.js?v=496616e2-15:1 Variable loginForm doesn't exist. It was created. jsxc.min.js?v=496616e2-15:1 Uncaught TypeError: Converting circular structure to JSON --> starting at object with constructor 's' --- property '_renderProxy' closes the circle at JSON.stringify () at Object.setItem (jsxc.min.js?v=496616e2-15:1) at Object.updateItem (jsxc.min.js?v=496616e2-15:1) at Object.jsxc.options.set (jsxc.min.js?v=496616e2-15:1) at Object. (jsxc.min.js?v=496616e2-15:1) at Function.each (main.js?v=496616e2-15:14) at Object._prepareLogin (jsxc.min.js?v=496616e2-15:1) at jsxc.min.js?v=496616e2-15:1 at Object.success (ojsxc.js?v=496616e2-15:247) at u (main.js?v=496616e2-15:25) DevTools failed to parse SourceMap: https://my.domain/apps/ojsxc/js/jsxc/jsxc.min.js.map DevTools failed to parse SourceMap: https://my.domain/core/js/dist/main.js.map DevTools failed to parse SourceMap: https://my.domain/apps/ojsxc/js/jsxc/lib/jsxc.dep.min.js.map DevTools failed to parse SourceMap: https://my.domain/core/js/dist/share_backend.js.map DevTools failed to parse SourceMap: https://my.domain/core/js/dist/login.js.map

It only happens when xcauth is running.