psi-im / plugins

Officially supported Psi plugins
57 stars 24 forks source link

*** [OMEMO] Unable to build any sessions, the message was not sent (Myself message does not work) | Identical chat tab | Identical device #49

Open Neustradamus opened 5 years ago

Neustradamus commented 5 years ago

OMEMO Encrypted messages to myself do not work (same device/client: Psi or Psi+).

It must be true: "options.ui.contactlist.show.self-contact"

Screenshot: https://i.ibb.co/3yV0ZCy/psi-myself-test-messages-one-with-and-one-without-omemo.png


EDIT: I add several examples:


EXAMPLE 1: This account has not this own key in "Known Keys" section:

We open the tab:

[XX:XX:21] *** Contact has been switched: testaccount@domain1.tld/Psi+
[XX:XX:21] *** User1 is now Online [1]

XML Console:

<iq id='aac5a' from='testaccount@domain1.tld' to='testaccount@domain1.tld' type='get'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<items node='eu.siacs.conversations.axolotl.devicelist'/>
</pubsub>
</iq>

<iq id="aac5a" type="result" to="testaccount@domain1.tld/Psi+">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<items node="eu.siacs.conversations.axolotl.devicelist">
<item id="cb76a2f1-4f09-435b-a588-8960d36c35e5">
<list xmlns="eu.siacs.conversations.axolotl">
   <device id="1618399274"/>
  </list>
</item>
</items>
</pubsub>
</iq>

Try to send an OMEMO Message

[XX:XX:46] <User1> ... 
[XX:XX:46] *** [OMEMO] Unable to build any sessions, the message was not sent

XML Console:

<iq id='aac8a' from='testaccount@domain1.tld' to='testaccount@domain1.tld' type='get'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<items node='eu.siacs.conversations.axolotl.bundles:1618399274'/>
</pubsub>
</iq>

<iq id="aac8a" type="result" to="testaccount@domain1.tld/Psi+">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<items node="eu.siacs.conversations.axolotl.bundles:1618399274">
<item id="79af5a71-faa4-4017-8838-5f6a28cd7171">
<bundle xmlns="eu.siacs.conversations.axolotl">
   <signedPreKeyPublic signedPreKeyId="56810230">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</signedPreKeyPublic>
   <signedPreKeySignature>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</signedPreKeySignature>
   <identityKey>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</identityKey>
   <prekeys>
    <preKeyPublic preKeyId="1">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</preKeyPublic>
    <preKeyPublic preKeyId="100">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</preKeyPublic>
    <preKeyPublic preKeyId="101">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</preKeyPublic>
   </prekeys>
  </bundle>
</item>
</items>
</pubsub>
</iq>

EXAMPLE 2: This account has this own key in "Known Keys" section, not trusted yet:

We open the tab:

[XX:XX:54] *** Contact has been switched: testaccount@domain2.tld/Psi+
[XX:XX:54] *** User2 is now Online [1]

XML Console:

<iq id='aac6a' from='testaccount@domain2.tld' to='testaccount@domain2.tld' type='get'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<items node='eu.siacs.conversations.axolotl.devicelist'/>
</pubsub>
</iq>

<iq from="testaccount@domain2.tld" id="aac6a" type="result" to="testaccount@domain2.tld/Psi+" xml:lang="en">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<items node="eu.siacs.conversations.axolotl.devicelist">
<item id="66D3D5DC8BDDA">
<list xmlns="eu.siacs.conversations.axolotl">
   <device id="445276579"/>
  </list>
</item>
</items>
</pubsub>
</iq>

Try to send an OMEMO encrypted message

-> Managing of OMEMO keys dialog window

-> We trust it

[XX:XX:57] *** [OMEMO] Unable to build any sessions, the message was not sent
[XX:XX:57] <User2> ...

XML Console:

NO XML, nothing

EXAMPLE 3: This account has own key of each device in "Known Keys" section, trusted:

We open the tab:

[XX:XX:20] *** Contact has been switched: testaccount@domain.tld/Psi+
[XX:XX:20] *** User is now Online [1]

XML Console:

<iq id='aacca' from='testaccount@domain.tld' to='testaccount@domain.tld' type='get'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<items node='eu.siacs.conversations.axolotl.devicelist'/>
</pubsub>
</iq>

<iq id="aacca" to="testaccount@domain.tld/Psi+" xml:lang="en" from="testaccount@domain.tld" type="result">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<items node="eu.siacs.conversations.axolotl.devicelist">
<item id="66BE1A3219106">
<list xmlns="eu.siacs.conversations.axolotl">
   <device id="XXXXX"/>
   <device id="XXXXX"/>
   <device id="XXXXX"/>
   <device id="XXXXX"/>
   <device id="XXXXX"/>
   <device id="XXXXX"/>
  </list>
</item>
</items>
</pubsub>
</iq>

Try to send an OMEMO encrypted message

[XX:XX:24] ***  OMEMO encryption is enabled
[XX:XX:24] <User> .... 

-> Only one and no XEP-0184 answer. The OMEMO message has not been decrypted by this current device.

XML Console:

<message id="aacda" to="testaccount@domain.tld/Psi+" type="chat">
<active xmlns="http://jabber.org/protocol/chatstates"/>
<request xmlns="urn:xmpp:receipts"/>
<encrypted xmlns="eu.siacs.conversations.axolotl">
<header sid="XXXXXXXXXXX">
<iv>XXXXXXXXXXXXX</iv>
<key rid="XXXXX" prekey="true">XXXXXXXXXXXXXXXXXXXXXX</key>
<key rid="XXXXX" prekey="true">XXXXXXXXXXXXXXXXXXXXXX</key>
<key rid="XXXXX" prekey="true">XXXXXXXXXXXXXXXXXXXXXX</key>
<key rid="XXXXX" prekey="true">XXXXXXXXXXXXXXXXXXXXXX</key>
<key rid="XXXXX" prekey="true">XXXXXXXXXXXXXXXXXXXXXX</key>
</header>
<payload>XXXX</payload>
</encrypted>
<store xmlns="urn:xmpp:hints"/>
<encryption xmlns="urn:xmpp:eme:0" namespace="eu.siacs.conversations.axolotl"/>
<body>You received a message encrypted with OMEMO but your client doesn't support OMEMO or its support is currently disabled.</body>
</message>

<message id="aacda" to="testaccount@domain.tld/Psi+" xml:lang="en" from="testaccount@domain.tld/Psi+" type="chat">
<archived xmlns="urn:xmpp:mam:tmp" by="testaccount@domain.tld" id="XXXXXXXXXXXXXXXXXXXX"/>
<stanza-id xmlns="urn:xmpp:sid:0" by="testaccount@domain.tld" id="XXXXXXXXXXXXXXXXXXXX"/>
<active xmlns="http://jabber.org/protocol/chatstates"/>
<request xmlns="urn:xmpp:receipts"/>
<encrypted xmlns="eu.siacs.conversations.axolotl">
<header sid="XXXXXXXXXXX">
<iv>XXXXXXXXXXXXX</iv>
<key rid="XXXXX" prekey="true">XXXXXXXXXXXXXXXXXXXXXX</key>
<key rid="XXXXX" prekey="true">XXXXXXXXXXXXXXXXXXXXXX</key>
<key rid="XXXXX" prekey="true">XXXXXXXXXXXXXXXXXXXXXX</key>
<key rid="XXXXX" prekey="true">XXXXXXXXXXXXXXXXXXXXXX</key>
<key rid="XXXXX" prekey="true">XXXXXXXXXXXXXXXXXXXXXX</key>
</header>
<payload>XXXX</payload>
</encrypted>
<store xmlns="urn:xmpp:hints"/>
<encryption xmlns="urn:xmpp:eme:0" namespace="eu.siacs.conversations.axolotl"/>
<body>You received a message encrypted with OMEMO but your client doesn't support OMEMO or its support is currently disabled.</body>
</message>
nullobsi commented 2 years ago

I am unable to reproduce this issue. Are you sure that you have trusted your own device keys? image (other than the encryption is disable message, which is wrong and I still need to dig into)

Neustradamus commented 2 years ago

@nullobsi: I have updated the description and added a screenshot ^^

cc: @Ri0n, @Vitozz, @tehnick, @stigger.