AnsweredAssumed Answered

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

Question asked by Vishnu Prajapati on Jul 31, 2017
Latest reply on Aug 1, 2017 by Paul Schaub

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): <iq to='86@xmpp.live.ca' id='8bBIK-37' type='get'><pubsub xmlns='http://jabber.org/protocol/pubsub'><items node='eu.siacs.conversations.axolotl.devicelist'/></pubsub></iq>

RECV (0): <r xmlns='urn:xmpp:sm:3'/>

SENT (0): <a xmlns='urn:xmpp:sm:3' h='14'/>

RECV (0): <iq xml:lang='en' to='86@xmpp.live.ca/184' from='86@xmpp.live.ca' type='result' id='8bBIK-37'><pubsub xmlns='http://jabber.org/protocol/pubsub'><set xmlns='http://jabber.org/protocol/rsm'><index>1</index><count>1</count><first index='1'>creation@001501:495427:564212</first><last>creation@001501:495427:564 212</last></set><items node='eu.siacs.conversations.axolotl.devicelist'><item id='5DD78F43875C8'><list xmlns='eu.siacs.conversations.axolotl'><device id='644379396'/></list></item></items></pubsub></iq>

 

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)

Outcomes