jsxc / prosody-cloud-roster

MIT License
5 stars 0 forks source link

Rosters are not beeing generated #1

Closed mazlumtoprak closed 6 years ago

mazlumtoprak commented 6 years ago

Hello,

I have installed the roster as described. I do get an error after enabling the module. This is in the prosody.err log file:

Sep 04 07:03:39 mod_bosh error Traceback[bosh]: ...rosody/modules/mod_roster_cloud/mod_roster_cloud.lua:28: attempt to index global 'ltn12' (a nil value) stack traceback: ...rosody/modules/mod_roster_cloud/mod_roster_cloud.lua:28: in function 'sendRequest' ...rosody/modules/mod_roster_cloud/mod_roster_cloud.lua:44: in function '?' /usr/lib/prosody/util/events.lua:67: in function 'fire_event' /usr/lib/prosody/core/rostermanager.lua:103: in function 'rm_load_roster' /usr/lib/prosody/core/sessionmanager.lua:172: in function 'sm_bind_resource' /usr/lib/prosody/modules/mod_saslauth.lua:280: in function '?' /usr/lib/prosody/util/events.lua:67: in function </usr/lib/prosody/util/events.lua:63> (tail call): ? /usr/lib/prosody/modules/mod_iq.lua:54: in function '?' /usr/lib/prosody/util/events.lua:67: in function 'fire_event' ... /usr/lib/prosody/net/http/server.lua:109: in function 'process_next' /usr/lib/prosody/net/http/server.lua:125: in function 'success_cb' /usr/lib/prosody/net/http/parser.lua:173: in function 'feed' /usr/lib/prosody/net/http/server.lua:154: in function </usr/lib/prosody/net/http/server.lua:153> (tail call): ? /usr/lib/prosody/net/server_select.lua:868: in function </usr/lib/prosody/net/server_select.lua:850> C: in function 'xpcall' /usr/bin/prosody:376: in function 'loop' /usr/bin/prosody:407: in main chunk

I am using also the cloud-auth module where the users sign on with their e-mail addresses.

How can I test, if the module is beeing installed and loaded correctly? What should happen if it is installed correctly?

Thank you in advance.

MarcelWaldvogel commented 6 years ago

Can you try 05bd771a9e2a223? It fixed the problem in my test setup.

mazlumtoprak commented 6 years ago

Seems to help a bit. After restarting the Service I do get the following error: Sep 06 11:26:06 domain.ch:roster_cloud error {"result":"error","data":{"msg":"Can't find user"}} I can't make a reference for which user he is looking for. Logon with nextcloud users on XMPP works smooth.

MarcelWaldvogel commented 6 years ago

What are your Nextcloud+JSXC versions? Do your Nextcloud login names include @?

If you increase the Prosody logging level to debug, you should see the user responsible for the roster request:

        module:log('debug', 'inject roster contacts for '..username)

/etc/prosody/prosody.cfg.lua for debugging contains:

log = {
        debug = "/var/log/prosody/prosody.log";
        error = "/var/log/prosody/prosody.err";
        { levels = { "error" }; to = "syslog";  };
}

Is there anything in the Nextcloud log at the same time?

mazlumtoprak commented 6 years ago

Nextcloud: 12.0.2 JSXC: 3.3.0

Our nextcloud users do have an @

This is the result of the prosody.log after enabling debugmode

Sep 11 10:46:10 rostermanager debug load_roster: asked for: user@domain.ch Sep 11 10:46:10 rostermanager debug load_roster: loading for new user: user@domain.ch Sep 11 10:46:10 domain.ch:roster_cloud debug inject roster contacts for user Sep 11 10:46:10 domain.ch:roster_cloud error {"result":"error","data":{"msg":"Can't find user"}}

My first thoughts are the same as yours. It looks like the roster_cloud plugin does not interpret Usernames with an @

The only errors showing in the Nextcloud log is this one:

Error | PHP | Undefined offset: 1 at /var/www/html/nextcloud/apps/ojsxc/lib/Controller/SettingsController.php#89

Maybe I have to reconsider, how I can bind the users to login with their E-Mail Adress and force nextcloud to use the usernames without the domain, as it looks that this would be the easier way, if that is the problem to this.

sualko commented 6 years ago

It looks like the roster_cloud plugin does not interpret Usernames with an @

That's right. We currently don't support usernames with @ in it. Sorry for your inconvenience.

MarcelWaldvogel commented 6 years ago

@maesitopi However, we plan to change this :-)

mazlumtoprak commented 6 years ago

@MarcelWaldvogel would be glad! anything on the roadmaps yet?