Contacts not showing, but just for Spark users

Using Spark 2.8.3.

Some of our users who are currently using Pidgin would like to move over to spark, however, when they log in to Spark, their contact list is empty.

Details:
We have an ejabberd XMPP server, and employees are connecting mostly using Pidgin and Xabber. I believe we have a few outliers using something on iPhone, but I have no idea what client they’re using. They have not complained, so I’m assuming it’s working fine.

Contact lists are populated automatically using an LDAP roster plugin which pulls a list of users from a specific group in Active Directory.

When connecting from Pidgin on Windows, or Xabber on Android, users can see their contact lists like you would expect. Those same users open up Spark on the PC, and it appears that they have no contacts. They can still message other users by going to “Start a chat”, and entering the address, and they can receive messages without any issues.

errors.log.0 shows the following entry each time I connect to the server:

Apr 15, 2019 1:39:46 PM org.jivesoftware.spark.util.log.Log error
SEVERE: Unable to contact shared group info.
org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPPError: service-unavailable - cancel
at org.jivesoftware.smack.XMPPException$XMPPErrorException.ifHasErrorThenThrow(XMPPException.java:135)
at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:232)
at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:213)
at org.jivesoftware.smackx.sharedgroups.SharedGroupManager.getSharedGroups(SharedGroupManager.java:53)
at org.jivesoftware.spark.ui.ContactList.lambda$initialize$13(ContactList.java:1752)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Any ideas?

Is it some custom LDAP plugin are you using or are you referring to regular LDAP integration? I suppose you use sharing in contact list (enabled in group’s properties in Admin Console)? If this is a custom plugin, then maybe it is not fully compatible with this standard.

Service-unavailable can also mean some networking/DNS issue. What your users put as Domain in Spark (and also in Xabber/Pidgin)? Do you use IP address at some point?

Also, if you have time, maybe you can try it on one PC with the latest nightly build of Spark. I’m curious if it will handle this better, as it has newest Smack library. https://www.igniterealtime.org/downloads/nightly_spark.jsp

Thanks for getting back to me.

This is using the standard mod_shared_roster_ldap that comes with ejabberd. No custom mods at all.

The users put in the domain, not IP address, the same as with Pidgin and Xabber.

As you suggested, I downloaded spark_2_9_0-20190415, and I’m seeing the same problem. However, it did occur to me that our version of ejabberd is a bit behind, so I’ll get that updated tonight, and see if that makes a difference.

Well that didn’t take as long as I expected. I’m fully up to date on the server, I’m still not getting a contact list, however, I am seeing some differences in the behavior with the 20190415 build.

There is nothing in errors.log.0, but warn.log.0 is showing the following error (sanitized for public viewing):

Apr 15, 2019 4:20:05 PM org.jivesoftware.spark.util.log.Log warning
WARNING: Unable to load vCard for auser@mydomain.com
org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not I (position: START_DOCUMENT seen I… @1:1)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at org.jivesoftware.sparkimpl.profile.VCardManager.loadFromFileSystem(VCardManager.java:830)
at org.jivesoftware.sparkimpl.profile.VCardManager.getVCardFromMemory(VCardManager.java:455)
at org.jivesoftware.sparkimpl.profile.VCardManager.getVCard(VCardManager.java:493)
at org.jivesoftware.sparkimpl.profile.VCardManager.getVCard(VCardManager.java:435)
at org.jivesoftware.sparkimpl.profile.VCardManager.getAvatarURLIfAvailable(VCardManager.java:711)
at org.jivesoftware.spark.ui.ContactItem.getAvatarURL(ContactItem.java:415)
at org.jivesoftware.spark.ui.ContactItem.updateAvatarInSideIcon(ContactItem.java:623)
at org.jivesoftware.spark.ui.ContactItem.setPresence(ContactItem.java:377)
at org.jivesoftware.spark.ui.ContactList.changeOfflineToOnline(ContactList.java:524)
at org.jivesoftware.spark.ui.ContactList.updateUserPresence(ContactList.java:335)
at org.jivesoftware.spark.ui.ContactList.access$800(ContactList.java:74)
at org.jivesoftware.spark.ui.ContactList$13.lambda$run$0(ContactList.java:1932)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

So it looks like it is getting a contact list, but having a problem parsing what it’s getting. Perhaps something in my vcard mapping?

Oh, i somehow missed the bit this is with ejabberd. Thought it was with Openfire. Well, i haven’t used this server. Maybe it has different implementation of shared groups (or LDAP integration). This can also be a Smack library’s issue and not with Spark itself.

Are you still getting the old error about not able to contact shared group with 2.8.3 after you have updated ejabberd?

Yes. Here is a log entry from a few minutes ago, with 2.8.3:

Apr 16, 2019 8:10:48 AM org.jivesoftware.spark.util.log.Log error
SEVERE: Unable to contact shared group info.
org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPPError: service-unavailable - cancel
at org.jivesoftware.smack.XMPPException$XMPPErrorException.ifHasErrorThenThrow(XMPPException.java:135)
at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:232)
at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:213)
at org.jivesoftware.smackx.sharedgroups.SharedGroupManager.getSharedGroups(SharedGroupManager.java:53)
at org.jivesoftware.spark.ui.ContactList.lambda$initialize$13(ContactList.java:1752)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I’m beginning to suspect that it’s something to do with the vcards that ejabberd is sending. I think Spark or Smack are looking for some specific formatting, which the other clients are not.I’ll tinker with that and see if I can sort it out. Might have to fire up wireshark and do some trial and error.

In any case, thanks for your responses. I do appreciate it.

I’m curious what is happening too. I have even installed ejabberd to give it a try, but i got reminded why i didn’t go with this server 15 years ago and chose Openfire. Tons of documentation and not a hint how can i just quickly create a user or a group… :face_with_raised_eyebrow:

If I set up a normal shared roster, they show up in Spark. It’s the LDAP roster that does not show up. Between that and the error message from the 20190415 build, I suspect that my LDAP to vcard mapping is the culprit. Perhaps I’m missing a field that Spark is looking for, or I have an incorrect LDAP attribute mapped to a vcard field, and Spark doesn’t like it. If I figure it out, I’ll let you know.

Thanks again.

Also, set up your admin user with ejabberdctl from the command line, then do the rest of your user management through the web admin. It’ll save you a lot of head ache. :wink:

Ok, let us know if you find out something.

I have installed ejabberd on Windows and web admin popped after i have started it, but there was only high level administration about hosts and other complex stuff in there. Maybe it needs an additional plugin for user administration. I have also tried to create a user via ejabberdctl, but was not able to login with it in Spark. First it has generated self-signed certificates for localhost, although i have provided domain name during setup, so i had to disable hostname verification in Spark. Then just kept saying that user/password are wrong. I gave up and uninstalled it :slight_smile:

Well here is another bit that may or may not be helpful, if I check “Group offline users”, I can see offline users, but not online users. If I bring a user online, it disappears from the offline users group, but doesn’t show up anywhere else.

Heh, sorry if the constant updates are getting obnoxious. One more thing, here is a snippet from the Spark debug log. I’m running pidgin with a test account, and watching the Spark debug window for what happens when I log that test user off and then back on again.

<iq xml:lang='en' to='me@mydomain.com/mypc' from='me@mydomain.com' type='result' id='ac876-108'><query xmlns='jabber:iq:private'><gateway-settings xmlns='http://www.jivesoftware.org/spark'/></query></iq>
<iq xml:lang='en' to='me@mydomain.com/mypc' from='me@mydomain.com' type='result' id='ac876-110'><query xmlns='jabber:iq:private'><scratchpad xmlns='scratchpad:tasks'/></query></iq>
<presence to='me@mydomain.com/mypc' from='testuser@mydomain.com/108275812848359518414386' type='unavailable'/>
<presence xml:lang='en' to='me@mydomain.com/mypc' from='testuser@mydomain.com/118718985767161304735234'><c xmlns='http://jabber.org/protocol/caps' node='http://pidgin.im/' hash='sha-1' ver='I22W7CegORwdbnu0ZiQwGpxr0Go='/><x xmlns='vcard-temp:x:update'><photo/></x><priority>1</priority></presence>
<iq xml:lang='en' to='me@mydomain.com/mypc' from='testuser@mydomain.com/118718985767161304735234' type='get' id='purplebcbdfb30'><query xmlns='http://jabber.org/protocol/disco#items' node='http://jabber.org/protocol/commands'/></iq>
<presence to='me@mydomain.com/mypc' from='testuser@mydomain.com/118718985767161304735234' type='unavailable'/>
<presence xml:lang='en' to='me@mydomain.com/mypc' from='testuser@mydomain.com/153549303405091218555570'><c xmlns='http://jabber.org/protocol/caps' node='http://pidgin.im/' hash='sha-1' ver='I22W7CegORwdbnu0ZiQwGpxr0Go='/><x xmlns='vcard-temp:x:update'><photo/></x><priority>1</priority></presence>
<iq xml:lang='en' to='me@mydomain.com/mypc' from='testuser@mydomain.com/153549303405091218555570' type='get' id='purple8da2bd3f'><query xmlns='http://jabber.org/protocol/disco#items' node='http://jabber.org/protocol/commands'/></iq>

So Spark gets the users, just can’t get the groups for some reason. I don’t see any clues in debug logs.

So was this ever fixed? I just updated Openfire to 4.4.0 and I’m having this issue now. I am thinking of remapping LDAP to see if something is up but I do not think that is the case because on the Openfire groups you can see that it is pulling the correct info from LDAP as the users are in the groups they should be; they just do not show up in any clients.

Well, there was no new version of Spark during that time (and it seems there will be none for a long time). And there was no fix for something related in the base code. So, if this is an issue in Spark, then there was no fix. But I’m not sure about it. This thread is about ejabberd server. I haven’t seen similar reports for Openfire yet.

I will be sure to submit one. I have this exact issue after I updated to 4.4.0.