Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated one-on-one messages #391

Open
guusdk opened this issue Oct 18, 2024 · 0 comments
Open

Duplicated one-on-one messages #391

guusdk opened this issue Oct 18, 2024 · 0 comments

Comments

@guusdk
Copy link
Member

guusdk commented Oct 18, 2024

As reported on https://discourse.igniterealtime.org/t/monitoring-plugin-mam-doubled-quadrupled-messages-after-relogin/94112:

Hello.

I'm getting duplicate messages in 1:1 chats (but not in MUC rooms) after restarting a client or logging out and back in. It happens with both Gajim and Conversatons, so it is probably not client-specific. Sometimes it's two of the same message, sometimes four.

The issue seems to be related with the monitoring plugin, as it stops if I remove the plugin. I don't remember changing any settings for the monitoring plugin from default, apart from making sure that all the checkboxes are enabled.

I tried to look into the protocol log on the client, and the same message was indeed received four time from the server.

([email protected] sends two messages to [email protected]: "320test" and "321test". The former doubled, the latter quadrupled.)

<!-- Incoming Thu 20 Jun 2024 01:19:45 PM +07 ([email protected]) -->
<message xmlns="jabber:client" from="[email protected]/gajim.XXXXXXXX" to="[email protected]" xml:lang="en" type="chat" id="340df5e9-3ecf-48cd-8069-2c65202d60d9">
  <body>320test</body>
  <origin-id xmlns="urn:xmpp:sid:0" id="340df5e9-3ecf-48cd-8069-2c65202d60d9" />
  <request xmlns="urn:xmpp:receipts" />
  <active xmlns="http://jabber.org/protocol/chatstates" />
  <markable xmlns="urn:xmpp:chat-markers:0" />
</message>


<!-- Incoming Thu 20 Jun 2024 01:19:49 PM +07 ([email protected]) -->
<message xmlns="jabber:client" from="[email protected]/gajim.XXXXXXXX" to="[email protected]" xml:lang="en" type="chat" id="bc6b3162-2971-422a-a50d-998fc42994de">
  <body>321test</body>
  <origin-id xmlns="urn:xmpp:sid:0" id="bc6b3162-2971-422a-a50d-998fc42994de" />
  <request xmlns="urn:xmpp:receipts" />
  <active xmlns="http://jabber.org/protocol/chatstates" />
  <markable xmlns="urn:xmpp:chat-markers:0" />
</message>


<!-- I relogined here -->


<!-- Outgoing Thu 20 Jun 2024 01:20:25 PM +07 ([email protected]) -->
<iq xmlns="jabber:client" to="[email protected]" type="set" id="0396c955-c892-4e34-af61-e096dda9054e">
  <query xmlns="urn:xmpp:mam:2" queryid="410d78b8-5190-4ad3-bd58-f1d85131c771">
    <x xmlns="jabber:x:data" type="submit">
      <field type="hidden" var="FORM_TYPE">
        <value>urn:xmpp:mam:2</value>
      </field>
    </x>
    <set xmlns="http://jabber.org/protocol/rsm">
      <max>70</max>
      <after>2040</after>
    </set>
  </query>
</iq>


<!-- Incoming Thu 20 Jun 2024 01:20:25 PM +07 ([email protected]) -->
<message xmlns="jabber:client" from="[email protected]/gajim.AJWQJWI3" to="[email protected]" xml:lang="en" type="chat" id="bc6b3162-2971-422a-a50d-998fc42994de">
  <body>321test</body>
  <origin-id xmlns="urn:xmpp:sid:0" id="bc6b3162-2971-422a-a50d-998fc42994de" />
  <request xmlns="urn:xmpp:receipts" />
  <active xmlns="http://jabber.org/protocol/chatstates" />
  <markable xmlns="urn:xmpp:chat-markers:0" />
  <delay xmlns="urn:xmpp:delay" stamp="2024-06-20T06:19:49.306Z" from="example.com" />
</message>


<!-- Incoming Thu 20 Jun 2024 01:20:26 PM +07 ([email protected]) -->
<message xmlns="jabber:client" to="[email protected]/gajim.YYYYYYYY">
  <result xmlns="urn:xmpp:mam:2" queryid="410d78b8-5190-4ad3-bd58-f1d85131c771" id="2041">
    <forwarded xmlns="urn:xmpp:forward:0">
      <delay xmlns="urn:xmpp:delay" stamp="2024-06-20T06:19:46.016Z" />
      <message xmlns="jabber:client" from="[email protected]/gajim.XXXXXXXX" to="[email protected]" xml:lang="en" type="chat" id="340df5e9-3ecf-48cd-8069-2c65202d60d9">
        <body>320test</body>
        <origin-id xmlns="urn:xmpp:sid:0" id="340df5e9-3ecf-48cd-8069-2c65202d60d9" />
        <request xmlns="urn:xmpp:receipts" />
        <active xmlns="http://jabber.org/protocol/chatstates" />
        <markable xmlns="urn:xmpp:chat-markers:0" />
</message>
</forwarded>
</result>
</message>


<!-- Incoming Thu 20 Jun 2024 01:20:26 PM +07 ([email protected]) -->
<message xmlns="jabber:client" to="[email protected]/gajim.YYYYYYYY">
  <result xmlns="urn:xmpp:mam:2" queryid="410d78b8-5190-4ad3-bd58-f1d85131c771" id="2042">
    <forwarded xmlns="urn:xmpp:forward:0">
      <delay xmlns="urn:xmpp:delay" stamp="2024-06-20T06:19:49.306Z" />
      <message xmlns="jabber:client" from="[email protected]/gajim.XXXXXXXX" to="[email protected]" xml:lang="en" type="chat" id="bc6b3162-2971-422a-a50d-998fc42994de">
        <body>321test</body>
        <origin-id xmlns="urn:xmpp:sid:0" id="bc6b3162-2971-422a-a50d-998fc42994de" />
        <request xmlns="urn:xmpp:receipts" />
        <active xmlns="http://jabber.org/protocol/chatstates" />
        <markable xmlns="urn:xmpp:chat-markers:0" />
</message>
</forwarded>
</result>
</message>


<!-- Incoming Thu 20 Jun 2024 01:20:26 PM +07 ([email protected]) -->
<message xmlns="jabber:client" to="[email protected]/gajim.YYYYYYYY">
  <result xmlns="urn:xmpp:mam:2" queryid="410d78b8-5190-4ad3-bd58-f1d85131c771" id="2043">
    <forwarded xmlns="urn:xmpp:forward:0">
      <delay xmlns="urn:xmpp:delay" stamp="2024-06-20T06:20:02.950Z" />
      <message xmlns="jabber:client" from="[email protected]/gajim.XXXXXXXX" to="[email protected]" xml:lang="en" type="chat" id="bc6b3162-2971-422a-a50d-998fc42994de">
        <body>321test</body>
        <origin-id xmlns="urn:xmpp:sid:0" id="bc6b3162-2971-422a-a50d-998fc42994de" />
        <request xmlns="urn:xmpp:receipts" />
        <active xmlns="http://jabber.org/protocol/chatstates" />
        <markable xmlns="urn:xmpp:chat-markers:0" />
        <delay xmlns="urn:xmpp:delay" stamp="2024-06-20T06:19:49.306Z" from="example.com" />
</message>
</forwarded>
</result>
</message>


<!-- Incoming Thu 20 Jun 2024 01:20:26 PM +07 ([email protected]) -->
<iq xmlns="jabber:client" type="result" id="0396c955-c892-4e34-af61-e096dda9054e" from="[email protected]" to="[email protected]/gajim.YYYYYYYY">
  <fin xmlns="urn:xmpp:mam:2" queryid="410d78b8-5190-4ad3-bd58-f1d85131c771" complete="true">
    <set xmlns="http://jabber.org/protocol/rsm">
      <first>2041</first>
      <last>2043</last>
      <count>220</count>
</set>
</fin>
</iq>

I have cut everything that didn't seem related for reading convenience. I'm not fluent with XMPP, so I could miss something important. I can upload the full protocol log if required.

Is it maybe a normal server behavior and it's client's responsibility to check for duplicates? Or maybe client request was somehow incorrect? Or is it something that can be fixed on the server side?

Upgraded to Openfire 4.9.0 and Monitoring Plugin 2.6.0. Behavior seems to be changed a bit, the first one or the first two or three messages don't duplicate. It is not consistent.

No such problem with Ejabberd or Prosody with their respective MAM modules enabled. Could I have misconfigured Openfire somehow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant