Getting array index out of bound exception in authentication listener during initializing OmemoManger

Hi,

I am using Smack 4.2.1-Snapshots for Omemo. But i am getting array index of bound exception during initializing OmemoManger right after user authentication. Here is the exception details:

SENT (0):

RECV (0):

SENT (0):

RECV (0): 11creation@001501:495427:564212creation@001501:495427:564 212

AbstractXMPPConnection: Exception in authenticated listener

java.lang.ArrayIndexOutOfBoundsException: length=0; index=0

at org.whispersystems.libsignal.ecc.Curve.decodePoint(Curve.java:33)

at org.whispersystems.libsignal.state.PreKeyRecord.getKeyPair(PreKeyRecord.java:44 )

at org.jivesoftware.smackx.omemo.signal.SignalOmemoKeyUtil.preKeyForBundle(SignalO memoKeyUtil.java:202)

at org.jivesoftware.smackx.omemo.signal.SignalOmemoKeyUtil.preKeyForBundle(SignalO memoKeyUtil.java:56)

at org.jivesoftware.smackx.omemo.util.OmemoKeyUtil.preKeyPublisKeysForBundle(Omemo KeyUtil.java:336)

at org.jivesoftware.smackx.omemo.OmemoStore.packOmemoBundle(OmemoStore.java:212)

at org.jivesoftware.smackx.omemo.OmemoService.publishBundle(OmemoService.java:301)

at org.jivesoftware.smackx.omemo.OmemoService.initialize(OmemoService.java:228)

at org.jivesoftware.smackx.omemo.OmemoManager.initialize(OmemoManager.java:189)

at app.com.live.connect.chat.ConnectXMPP.setUpOMEMO(ConnectXMPP.java:2159)

at app.com.live.connect.chat.ConnectXMPP.access$4400(ConnectXMPP.java:140)

at app.com.live.connect.chat.ConnectXMPP$XMPPConnectionListener.authenticated(Conn ectXMPP.java:2128)

at org.jivesoftware.smack.AbstractXMPPConnection.callConnectionAuthenticatedListen er(AbstractXMPPConnection.java:1262)

at org.jivesoftware.smack.AbstractXMPPConnection.afterSuccessfulLogin(AbstractXMPP Connection.java:574)

at org.jivesoftware.smack.tcp.XMPPTCPConnection.afterSuccessfulLogin(XMPPTCPConnec tion.java:378)

at org.jivesoftware.smack.tcp.XMPPTCPConnection.loginInternal(XMPPTCPConnection.ja va:443)

at org.jivesoftware.smack.AbstractXMPPConnection.login(AbstractXMPPConnection.java :493)

at app.com.live.connect.chat.ConnectXMPP.loginInternal(ConnectXMPP.java:386)

at app.com.live.connect.chat.ConnectXMPP.access$800(ConnectXMPP.java:140)

at app.com.live.connect.chat.ConnectXMPP$LoginTask.doInBackground(ConnectXMPP.java :350)

at app.com.live.connect.chat.ConnectXMPP$LoginTask.doInBackground(ConnectXMPP.java :344)

at android.os.AsyncTask$2.call(AsyncTask.java:292)

at java.util.concurrent.FutureTask.run(FutureTask.java:237)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)

It looks like your local omemo key store is damaged, but I’m not sure. Have you tried to delete stored key material?

Thanks for the reply paul.

Its look like that problem has been resolved now by deleting stored key material. But i’m not getting this that how omemo key store has damaged. Could you please help me with this.

Hi!

Nice to hear that I could help you for the moment .

Unfortunatelly I’m really busy at the moment and probably will be for another month. After that however I’d love to help you figure out what went wrong .

1 Like

This will be solved in https://github.com/igniterealtime/Smack/pull/177