Offline Spark Messages are Not being received

2.9.1 only has a few minor fixes, not related to offline messages. I have checked your new logs from Sandbox and there is nothing new. I wonder if this is your Openfire server not sending it correctly. But to test that you would have to setup a test Openfire server somewhere (like on your PC), create a few users and login to that server on the same PCs, with the same Spark clients and try to send offline messages. This is complex, but i don’t know other way to test to make sure this is not your server causing that. Maybe enabling debug logging on the server can provide more info in Openfire logs.

One more thing to try. In Spark, on login screen, go to Advanced and enable debugger on startup. Exit Spark. Sent offline message to that user. Run Spark and login. In Debugger window click on user@server tab, then Raw Received Packets. Copy that to Notepad and search for the offline message text that you should have received. You can also send me this output via PM. If the message is there, then it is Spark failing for some reason. If not, then message is not reaching the client, but server thinks it was sent.

Those directions are very helpful. I will send you the full output via PM. The message is found in the Raw Received Packets. Here is a snipped of the debug log.

x4qAoBTEST

Yes, i can see the message in the output:

<message to="bruce@domain/PC" id="0Bb8D-349" type="chat" from="user@domain/Spark 2.9.0">
<thread>x4qAoB</thread><body>TEST</body><x xmlns="jabber:x:event"><offline/><composing
/></x><active xmlns="http://jabber.org/protocol/chatstates"></active><delay xmlns="urn:xmpp:delay" 
from="domain" stamp="2020-08-25T20:44:46.003Z"/></message>

I get the same packet when i receive an offline message. So Spark is getting it, but not opening a window. I suppose even if you open a chat window with that user, there is no such message in history log either? Or maybe it is recorded, but just not displayed?

Can you create a new user and test receiving an offline message with such new test user?

I have no ideas so far. This might be something on the system (driver, antivirus, etc.) that is causing that on Spark login. It works for me on Windows 7 and in VM with Windows 7/10.

Also, i saw Client Control Plugin in output. You have it installed? What other plugins? Can you try removing Client Control plugin and test?

Although we can’t reproduce this and there is only one report still, i have created a ticket, so we can track one similar issue along. https://issues.igniterealtime.org/browse/SPARK-2154

There is an issue, which i can reproduce, when private messages in group chat are also not shown, although actually received according to debugger. https://issues.igniterealtime.org/browse/SPARK-2153

Do I understand this correctly: for Bruce and Kassandra, Spark appears to receive the data (over-the-line) but is not displaying it for reasons unknown?

Wroot, if you have the time, could you compare the stanza that Bruce received with one that you receive from Openfire. Maybe there’s missing child element in the XML or somesuch?

Yes, the message appears as received in debugger, but Spark is not displaying it. The packet/stanza 3 messages above is the same as the one i receive for offline message. No xml element seems to be missing. But for me Spark shows the message. Btw, there is another person in the forums, who also can’t see offline messages. They also can’t see private messages in group chat, which i can reproduce. In this case again i can see the message received in the debugger, but Spark’s GUI is not reacting to it.

1 Like

Unfortunately there is no message showing up in history. It is not being recorded by spark or being displayed. Sorry I haven’t mention this sooner but the issue could be that we are using Directory Server (LDAP) for users. When you mentioned to create a new user that would be creating a user in Active Directory which probably will end up with the same issue but glad to try if you want.

I have removed Client Control plugin and had no difference with offline messages. The other 2 plugins we use are Monitoring Service & Search.

I’ve looked at the source code that processes inbound messages, and I have a suspicion where this problem lies (something with Spark not being able to correlate the sender of the message with a nickname used to open a chat window)

The error handling around that bit of code is poor: it basically ignores any error except for a select few. In https://github.com/igniterealtime/Spark/pull/515 I’ve improved on that.

@wroot can you get @bruce2400 a build that includes this fix? Using that build, I suspect that the cause of the problem will be logged in the ‘warn’ log file.

Sure. Bruce, you can install this build https://bamboo.igniterealtime.org/artifact/SPARK-NIGHTLY/shared/build-1448/Install4j-generated-media/spark_2_9_2-SNAPSHOT-with-jre.exe over your existing version, wipe all logs, send offline message to this user, start Spark and login. Then check the logs. It would be better to post them here (mask private information), so Guus can see them (or PM him). I’m not a dev, so i won’t understand what an exception means, if it is logged :slight_smile:

Btw, i have tested with private messages in MUC and haven’t received any new error in the logs.

Attached is the warn.log.0. As you mentioned there is now additional information we didn’t see before. Hopefully this helps. Thank you both so much for helping us with this issue. warn.log.0 (7.7 KB)

Localpart must not contain ’ ’

Hm, i don’t see a space in the packet or in JIDs. Other than “Spark 2.9.0” as resource, but that doesn’t create an issue for me. It seems to be coming from jxmpp library which Smack library uses i guess. That’s all i can get out of it. Let’s wait for Guus to chime in :slight_smile:

1 Like

I wonder if this problem occurs when the sender or recipient of the message has a nickname that contains a space character.

Yup, that was it. If the sender of the offline message is on the contact list, listed using a nickname/label that contains a space, this error occurs. I had been testing with simple user names (“jane”, “john”) which is why I could not reproduce the problem. When I started using “Jane Doe”, it immediately popped up).

A fix is provided in https://github.com/igniterealtime/Spark/pull/520

2 Likes

Yes, i was able to reproduce this with a space in a shared contact name. This build has the fix which resolves this problem https://bamboo.igniterealtime.org/artifact/SPARK-NIGHTLY/shared/build-1450/Install4j-generated-media/spark_2_9_2-SNAPSHOT-with-jre.exe

1 Like

Guus / wroot - I don’t even know what to say. You both are awesome!

The latest snapshot fixes the issue. I have never seen such fast responses and attention than you both have given to us. Big companies like Microsoft or Adobe could learn a lot from both of you.

Thank you again so much for all the support and help with this!

2 Likes

So glad I found this thread. It has been driving us nuts since we upgraded to 2.9.0.

Is there an ETA on a stable 2.9.2 or is the nightly build safe to deploy for now?

No real ETA. Maybe next week, if no other reports or patches are received. I think this build is safe to use. Stable version (rather official release) will be exactly the same probably. We don’t do extensive testing before a release. Just push the patch, let a few users test, wait a few days and that’s it. Just a few volunteers here. That’s why such issues slip through the cracks :slight_smile:

10-4. Thanks, wroot. I guess we will wait for the stable build unless a nightly build is released without JRE. We haven’t been using the JRE installer for years now. In the meantime we will start uninstalling 2.9.1 and go back to 2.8.3 this weekend.