powered by Jive Software

Smack 4.4.0-alpha2: OmemoManager.init occasionally throws NoResponseException before the request stanza is sent


#1

During the aTalk testing, I occasionally observe that OmemManager.initialize throws NoResponseException even before the request stanza is being sent (7 seconds prior to sending request stanza in this case, see below debug log).

Is that possible that the smack reply timer is started while the preparation of the 100 prekeys are still in progress, which know to take some time?

Also on working cases, I observed that the turn around time for the server to response to prekey pubsub is around 8 seconds on my home server. The 10S smack reply time set by aTalk seems not to have too much margin.

========== aTalk debug log on Note-8 =============
2018-09-29 09:06:01.552 22868-22999/org.atalk.android E/aTalk: [7808] org.atalk.crypto.omemo.AndroidOmemoService.initializationFailed().127 OmemoManager init failed
    org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 10000ms (~10s). Waited for response using: IQReplyFilter: iqAndIdFilter (AndFilter: (OrFilter: (IQTypeFilter: type=error, IQTypeFilter: type=result), StanzaIdFilter: id=l67T6-74)), : fromFilter (OrFilter: (FromMatchesFilter (full): null, FromMatchesFilter (ignoreResourcepart): swordfish@atalk.org, FromMatchesFilter (full): atalk.org)).
        at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:265)
        at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:219)
        at org.jivesoftware.smackx.pubsub.LeafNode.publish(LeafNode.java:330)
        at org.jivesoftware.smackx.pubsub.LeafNode.publish(LeafNode.java:309)
        at org.jivesoftware.smackx.pubsub.PubSubManager.tryToPublishAndPossibleAutoCreate(PubSubManager.java:410)
        at org.jivesoftware.smackx.omemo.OmemoService.publishBundle(OmemoService.java:589)
        at org.jivesoftware.smackx.omemo.OmemoService.init(OmemoService.java:264)
        at org.jivesoftware.smackx.omemo.OmemoManager.initialize(OmemoManager.java:250)
        at org.jivesoftware.smackx.omemo.OmemoManager$2.run(OmemoManager.java:266)
        at java.lang.Thread.run(Thread.java:764)

2018-09-29 09:06:08.800 22868-22972/org.atalk.android D/SMACK: SENT (0): <iq id='l67T6-74' type='set'><pubsub xmlns='http://jabber.org/protocol/pubsub'><publish node='eu.siacs.conversations.axolotl.bundles:867413812'><item xmlns='http://jabber.org/protocol/pubsub'><bundle xmlns='eu.siacs.conversations.axolotl'><signedPreKeyPublic signedPreKeyId='6'>BSMzAzOFAl8IX8+T7rpPqGmuQ27PAyqthLo07NnrJTRh</signedPreKeyPublic><signedPreKeySignature>3hXKyGx0+BXU3GYc3qA1Pp2jiqstIl2Gn+BEzIph6o73Lf7k0k0hANS/QEpuVHnzOOeJxpTj9EX42TYHWz3AgA==</signedPreKeySignature><identityKey>BZByy6Njp5OsOeHvR/CUAzE8BHa+lA99KX2qmoioAPQX</identityKey><prekeys><preKeyPublic preKeyId='1'>BUpGDt39gszD14F5UgC9JkW1RPbZqGd6a9jQiQfN+SNA</preKeyPublic>
....
<preKeyPublic preKeyId='35'>BX+wLpyDlFVB/+3Fs+chtb0BMLu+yFYm5KtFF8tcSfVY</preKeyPublic><preKeyPublic preKeyId='36'>BXKaikwgiNID7Mxuu5HfwU+hI62hBzErXttrFMI9dGZi</preKeyPublic></pubsub></iq>
2018-09-29 09:06:09.097 22868-22973/org.atalk.android D/SMACK: RECV (0): <iq xml:lang='en' to='swordfish@atalk.org/atalk' from='swordfish@atalk.org' type='result' id='l67T6-74'><pubsub xmlns='http://jabber.org/protocol/pubsub'><publish node='eu.siacs.conversations.axolotl.bundles:867413812'><item id='6022CB80F3493'/></publish></pubsub></iq>