Spark 2.9.0 after reconnecting, some users change their status to red

This has been fixed. It was just that the reconnection event was not handled, the chat window and its controls did not return to their original state.

2 Likes

Maybe you have fixed the original problem. But i was testing on a final build and i tried to enable and disable Always on top and then this happened. Roster window was always on top. This was after a reconnect. Unless you are talking about a future fix.

Yes, this fix is commited to R87A:spark-2143, but PR is not created.

1 Like

@R87A Thank you for your contributions. We really appreciate it.

R87A provided another fix https://github.com/igniterealtime/Spark/pull/537
This can be tested in this build https://bamboo.igniterealtime.org/browse/SPARK-NIGHTLY-1507/artifact/shared/Install4j-generated-media/

Now icons in chat window turn gray when reconnection happens and also i don’t get an error with roster window being always on top.

Unfortunately i still get some side effects. I have idle time set to just 1 minute in my test VM, so it goes away fast enough when i test and wait for it to start reconnecting after i disable the network (it is not immediate in VM). So, it turns away before reconnecting. And when network is restored and it connects back it is getting stuck on Away, even if you move mouse.

Also, icon of contact in chat window stays gray after a reconnection. Should turn back to user’s current state. It turns green if you click on the chat window. But while it is not in focus, it still show offline icon.

It seems that reconnection logic in Spark is a complete mess and probably needs a complete rewrite at some point :smiley:

1 Like

Thanks!

But I can still cause some bugs:

  1. I chat with the user and send him 1,2,3 (while he is online), then I turn off the Internet for the user and send him 4,5,6, then I wait for the xmpp server to kick him (xmpp.client.idle 60 seconds ) and send 7,8,9, then I wait for Spark to notice and start reconnecting and send 10,11,12 and turn on the Internet for the user. And after that I have a second tab with the same person and and received messages appear with the mark (Offline), although Ilya was online all this time.
    And also you can see that messages 7,8,9,10,12 were duplicated on the second tab.
    image
    image

  2. The user Petrakova locked the computer, after a while I turned off the Internet for her and she went offline, I sent her messages. After that, I turned on the Internet for her and after 1 hour she unlocked the computer. She received my messages, but instead of my “Hlevnoy ilya” it was “i.hlevnoy” and only one message contained my correct name.

In the 1 case it shows (offline) because these messages were received while user was offline. After you close and reopen chat window, (offline) prefix is dropped. The main problem here is that after a reconnect it opens a new tab for offline messages received during reconnection instead of showing them only in the already opened tab. This is a separate issue. https://issues.igniterealtime.org/browse/SPARK-2175

2 case looks somewhat related to https://issues.igniterealtime.org/browse/SPARK-2148 but it is hard to reproduce. I have tried to do this in my test VM and all messages were received with full name, not with username.

I managed to reproduce point two only once, so I think this point can be skipped …

Maybe I can guess what is the common reason for duplicate tabs in all of these issues.
I’ll try to fix SPARK-2175 soon.

1 Like

Could you report this as a separate issue or add this as a comment to SPARK-2143, please? This way will help me not to forget about it.

Sorry, but I could not reproduce this issue. Could you descripe a scenario?

Another fix :slight_smile: https://github.com/igniterealtime/Spark/pull/538
And another build to test https://bamboo.igniterealtime.org/browse/SPARK-NIGHTLY-1509/artifact/shared/Install4j-generated-media/

The issue with your own presence icon in the roster window getting stuck is so unclear. Every time i test i get more different results. So it is hard to describe them. It could be, that this is because i’m testing in a VM. I don’t have other means to test it. I will try to describe it. https://issues.igniterealtime.org/browse/SPARK-2177

The issue with a presence icon in the chat window. It only happens if chat window is visible, but in the background (under roster) windows and you don’t receive offline messages after a reconnection. In that case icon stays gray until you click on chat window. I have added a screenshot to https://issues.igniterealtime.org/browse/SPARK-2174

Oh, and i found another issue… https://issues.igniterealtime.org/browse/SPARK-2176

Issue with a second tab opened for offline messages is fixed now.

And we can mark https://issues.igniterealtime.org/browse/SPARK-2143 as completed finally. I don’t see duplicating or red offline contacts staying red anymore.

I found a bug in the last build:
Of all offline messages, only the first is delivered to a person.

Strange. In my tests it works ok

And now i can’t reproduce first message appearing at the top of the history anymore… This is so confusing :smiley:

Yes, there is a bug. It appears if the chat window was not open at the time of reconnection.

I usually work on Spark late at night, and I don’t have enough time and energy to test it properly.
Bug fix streak is going on! :wink: Thanks a lot for your understanding guys!

2 Likes

Not a problem at all. It’s a pity every time when i have to report that i’m still finding some issue :slight_smile: Don’t forget to get some sleep! We can release 2.9.3 later. After waiting 3 years for 2.9.0 this is a minor delay :smiley:

Ok, i was able to reproduce. This fix and build have it fixed: SPARK-2175: Fix "only the first offline message comes" bug. by R87A · Pull Request #539 · igniterealtime/Spark · GitHub
https://bamboo.igniterealtime.org/browse/SPARK-NIGHTLY-1510/artifact/shared/Install4j-generated-media/

And another build https://bamboo.igniterealtime.org/browse/SPARK-NIGHTLY-1512/artifact/shared/Install4j-generated-media/
Which fixes https://issues.igniterealtime.org/browse/SPARK-2177 :wink:

I tested the latest build.
My first message also appeared at the top of the dialog, once. But no matter how hard I tried to cause an error again, I could not …
log from spark:

окт 12, 2020 10:23:50 AM org.jivesoftware.spark.util.log.Log warning
WARNING: A chat entry appears to have been delivered out of order. The transcript window must be reordered!

Statuses refreshed, offline messages came, nice!
I noticed that when the connection is lost, the dialogs are blocked and I can’t write, that’s great! But if I start another dialogue with the user, then I can write to him.