Closed luke-jr closed 2 years ago
Config? Config differences old vs new?
20.04 config:
How do you know you're missing messages?
Which clients are used on this account?
I physically find my child and he shows me he didn't get any of my recent messages. From Psi+ to Conversations.
Can you try with Dino or Gajim or another Conversations instead of Psi+?
What type of messages? They were online at the time or offline?
Can't risk lost messages this weekend, so it'll have to wait :/
Just plain text "chat" type messages. Both users were online (and are 24/7).
Both users also have multiple connections (Psi+ and Conversations). I didn't notice if the recipient's Psi+ got the messages or not.
What do you use like Psi+ version and what OS? With or without OMEMO?
Sender: Psi+ 1.5.1484 on Gentoo.
(Recipient's other client: Psi 1.3-5build1 from/on Ubuntu 20.04)
I have the Psi+ OMEMO plugin on the sender, but I don't know if it was enabled or not.
@luke-jr: Can you update Psi+ to last build? Some OMEMO problems have been solved, maybe it is linked.
Confirmed that the recipient's Psi+ did receive the messages that prompted this initial report.
Also been having issues with 20.04, with another child having two Psi+s yet only receiving messages at one or the other...
Can ejabberd add an option to simply forward all messages to all resources, disregarding if they're directed to a specific one or what the priorities of each connection are? :/
Can ejabberd add an option to simply forward all messages to all resources, disregarding if they're directed to a specific one or what the priorities of each connection are? :/
Those behaviours go against the RFC...
Anyway, in your specific case, maybe a dirty patch is easier than explaining your users, or tweaking client configuration. This small patch customizes it for your specific case. Notice it's a proof of concept, it may break other parts, for instance, MUC rooms.
diff --git a/src/ejabberd_sm.erl b/src/ejabberd_sm.erl
index 231e4351e..e6086019b 100644
--- a/src/ejabberd_sm.erl
+++ b/src/ejabberd_sm.erl
@@ -699,7 +699,7 @@ do_route(#presence{to = #jid{lresource = <<"">>} = To} = Packet) ->
fun({_, R}) ->
do_route(Packet#presence{to = jid:replace_resource(To, R)})
end, get_user_present_resources(LUser, LServer));
-do_route(#message{to = #jid{lresource = <<"">>} = To, type = T} = Packet) ->
+do_route(#message{to = To, type = T} = Packet) ->
?DEBUG("Processing message to bare JID:~n~ts", [xmpp:pp(Packet)]),
if T == chat; T == headline; T == normal ->
route_message(Packet);
@@ -762,7 +762,7 @@ route_message(#message{to = To, type = Type} = Packet) ->
case catch lists:max(PrioRes) of
{MaxPrio, MaxRes}
when is_integer(MaxPrio), MaxPrio >= 0 ->
- lists:foreach(fun ({P, R}) when P == MaxPrio;
+ lists:foreach(fun ({P, R}) when true;
(P >= 0) and (Type == headline) ->
LResource = jid:resourceprep(R),
Mod = get_sm_backend(LServer),
Can you update it to Psi+ 1.5.1605 or more?
Better to use Psi+ than Psi, the last is 1.5.
Latest for Ubuntu focal (which that system runs) is Psi 1.3-5build1 or Psi+ 1.4.554-4 (which it is now running)
@tehnick, @Ri0n: Can you reply here about old Psi and Psi+?
https://launchpad.net/~psi-plus/+archive/ubuntu/ppa
It's also interesting where stream management is enabled in account settings in Psi. Unfortunately not all the XEPs related to reliability are implemented in Psi. So lost messages are possible with bad connection.
Anyway, in your specific case, maybe a dirty patch is easier than explaining your users, or tweaking client configuration. This small patch customizes it for your specific case. Notice it's a proof of concept, it may break other parts, for instance, MUC rooms.
Got around to trying this. The patch causes Psi+ to see duplicates of everything sent. >_<
Duplicates appear to be carbons. Any easy way to not affect internally-generated stuff?
Maybe a better solution would be to force all c2s connections to the same priority, and strip /resource specifiers on c2s packets?
Maybe a better solution would be to force all c2s connections to the same priority, and strip /resource specifiers on c2s packets?
The core XMPP RFCs specify how to address individual devices vs. accounts. This is used for various use cases. Breaking such essential rules in order to work around client issues is not a sensible solution, no.
Trying another client is not an option? If only to verify there's no actual server-side issue (in which case we could close this issue)?
The core XMPP RFCs specify how to address individual devices vs. accounts. This is used for various use cases. Breaking such essential rules in order to work around client issues is not a sensible solution, no.
That's why I'm suggesting doing it at a border layer, rather than deep in the internals.
Do you have a better solution?
Trying another client is not an option? If only to verify there's no actual server-side issue
If it was easily or at least predictably reproduced, perhaps, but random occurrences don't really make it a viable option.
Besides, there aren't really any better desktop/Qt clients AFAIK?
Do you have a better solution?
I think it's better to fix client issues on the client side.
there aren't really any better desktop/Qt clients AFAIK?
I'd try Gajim or (on Linux) Dino, for example. (Not Qt, but I'd hope the UI toolkit in use isn't relevant here?) If all else fails, Converse.js might be another option (you could use a public instance with a test account for tracking down this issue).
Hey guys. I didn't quite follow all the conversation. But are you talking about not always working carbons in Psi? IIRC carbons have some issues in Psi when used together with OMEMO. Probably I won't be able to fix it in Psi because of lack of spare time for the project. But I'll gladly accept patches.
I think it's better to fix client issues on the client side.
Since this is a regression when the server was upgraded, there's no reason to think it's a client issue.
there's no reason to think it's a client issue.
In that case it will be easy to reproduce with other clients, right? Could you do that to double-check?
Another thing:
I have the Psi+ OMEMO plugin on the sender, but I don't know if it was enabled or not.
Please always double-check such issues can be reproduced with OMEMO disabled on all involved clients.
It's not easy to reproduce even with the same client. I have no idea how to reliably reproduce it. It's an apparently-random occurrence which can happen at the most inopportune moments when I actually need the recipient to get the message immediately.
That being said, a few days ago I did upgrade to 22.05, so over the next few months will discover if it's still an issue or not.
Please always double-check such issues can be reproduced with OMEMO disabled on all involved clients.
I don't think it's possible to disable OMEMO in Conversations. cc @iNPUTmice
I'll close this issue for the moment then. If you run into it again and manage to reproduce the problem with OMEMO disabled, feel free to open a new one with any additional info you were able to gather.
@luke-jr settings - omemo - default on, then per chat set it on or off
@luke-jr: Have you tested with two Psi+ clients without OMEMO plugin?
Again, it's not easily reproducible. I cannot just stop using IM as we need it for weeks to test.
Environment
Errors from error.log/crash.log
No errors
Bug description
After upgrading from 20.04 to 21.04, randomly messages get lost. When it happens, it continues to lose messages until at least the client reconnects (but not right away upon reconnection!). There is no indication to the sender, that the recipient didn't get the messages.