- The parameter connection == null before connection is connected (before authenticated). Not sure if this is ok as pass in parameter connection is null.
Actually the error message is because OmemoManager device ID=UNKNOWN_DEVICE_ID for fetching; since I did not initialize the device ID. Should the OmemoManger take care of fetching it?
org.jivesoftware.smackx.omemo.exceptions.CorruptedOmemoKeyException: OMEMO Identity KeyPair is null for: firstname.lastname@example.org:-1
After the new implementation, the similar error message is still thrown this time for correct deviceID. On checking the sql database, it is really missing from DB. Not sure if this is due to my early testing with the half cooked code.
2. Any suggestion how to recover from this type of error i.e. corrupted or missing IdentityPreKeyPair beside doing the OmemoManager.regenerate?
- By the way, when and how is OmemoManager knows to initialize a new omemo data for a freshly installed device, as the following method has been obsoleted.
public boolean isFreshInstallation(OmemoManager omemoManager)
4, Testing on Note3, I still seeing the smack still throwing response timeout, but I think it is correct because of defaultPacketReplyTimeout of 5sec in SmackConfiguration. Even for Note8, it takes about 4.5s to publish the prekeys and receive the reply from my home server. I believe many of the free servers on network will failed to meet this timeout period of 5s. Actually the reply timeout also happen for enableDisableCarbon in the same test. On a safe side, aTalk I will change the global default timeout to 10sec. Possibly to also include the patch to ignore publish prekey timeout that I did for Smack v4.2.2.
- Following is a capture of the aTalk while testing on Note3. Do not quite understand why it throws reply timeout for id=FGapr-175 which is OK; shouldn’t the reply timeout is for id=‘FGapr-168’ i.e. publishing prekeys?
Is my observation correct because of some race condition in smack?
============ Debug Log ==================
01-16 08:47:59.852 D/SMACK: SENT (1): <iq email@example.com' id='FGapr-168' type='set'><pubsub xmlns='http://jabber.org/protocol/pubsub'><publish node='eu.siacs.conversations.axolotl.bundles:430747565'><item><bundle xmlns='eu.siacs.conversations.axolotl'><signedPreKeyPublic signedPreKeyId='1'>BRPO3WTznMiVhikIs+wJ9jUMFqHcqUsotYjgXwxB1wAJ</signedPreKeyPublic><signedPreKeySignature>2VGYV8+FlU9he6W6wbE7soKQAGWZZB/29Vtz+bYCOQTU92XTKeiKRPpTzJAJlbB5Nl4LfM7ScNe8j1cv+gFBCQ==</signedPreKeySignature><identityKey>BRH6nZPaSd1HQ6fn1LsfeHKkbloZxwIOHphZ0Gv7BTAr</identityKey><prekeys><preKeyPublic
01-16 08:48:04.272 D/SMACK: RECV (1): <iq xml:lang='en' firstname.lastname@example.org/atalk' email@example.com' type='result' id='FGapr-168'><pubsub xmlns='http://jabber.org/protocol/pubsub'><publish node=
01-16 08:48:04.292 D/SMACK: SENT (1): <iq firstname.lastname@example.org' id='FGapr-175' type='get'><query xmlns='http://jabber.org/protocol/disco#info' node='eu.siacs.conversations.axolotl.devicelist'></query></iq>
01-16 08:48:05.702 D/SMACK: RECV (1): <iq xml:lang='en' email@example.com/atalk' firstname.lastname@example.org' type='result' id='FGapr-175'><query node='eu.siacs.conversations.axolotl.devicelist' xmlns='http://jabber.org/protocol/disco#info'><identity type='registered' category='account'/></query></iq>
01-16 08:48:09.293 E/aTalk:  org.atalk.crypto.omemo.AndroidOmemoService.initializationFailed().123 Initialize OmemoManager failed:
org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 5000ms (~5s). Waited for response using: IQReplyFilter: iqAndIdFilter (AndFilter: (OrFilter: (IQTypeFilter: type=error, IQTypeFilter: type=result), StanzaIdFilter: id=FGapr-175)), : fromFilter (OrFilter: (FromMatchesFilter (full): email@example.com, FromMatchesFilter (full): null)).