powered by Jive Software

Smack 4.4.0 - OmemoManager #getActiveFingerprints does not include IllegalArgumentException in its exception throw list

When calling OmemoManager#getActiveFingerprints from app, the method may throw IllegalArgumentException; however it is not included in the throw exceptions list. This caught aTalk by surprise and hence crashes the app.

a. SignalOmemoStoreConnector#getIdentityKeyPair() may return null;
b. BobSignalProtocolParameters constructor throws IllegalArgumentException when ourIdentityKey is null.

07-04 09:17:58.069 W/(SQLiteOmemoStore.java:369)#loadOmemoIdentityKeyPair( 4351): OMEMO IdentityKeyPairs is missing for: leopard@atalk.org:921503961
07-04 09:17:58.069 D/AndroidRuntime( 4351): Shutting down VM
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): An uncaught exception occurred in thread = Thread[main,5,main] and message was: Null values!
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): java.lang.IllegalArgumentException: Null values!
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at org.whispersystems.libsignal.ratchet.AliceSignalProtocolParameters.<init>(AliceSignalProtocolParameters.java:38)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at org.whispersystems.libsignal.ratchet.AliceSignalProtocolParameters.<init>(AliceSignalProtocolParameters.java:14)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at org.whispersystems.libsignal.ratchet.AliceSignalProtocolParameters$Builder.create(AliceSignalProtocolParameters.java:110)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at org.whispersystems.libsignal.SessionBuilder.process(SessionBuilder.java:201)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at org.jivesoftware.smackx.omemo.signal.SignalOmemoService.processBundle(SignalOmemoService.java:104)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at org.jivesoftware.smackx.omemo.signal.SignalOmemoService.processBundle(SignalOmemoService.java:48)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at org.jivesoftware.smackx.omemo.OmemoService.buildFreshSessionWithDevice(OmemoService.java:785)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at org.jivesoftware.smackx.omemo.OmemoStore.getFingerprintAndMaybeBuildSession(OmemoStore.java:637)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at org.jivesoftware.smackx.omemo.OmemoManager.getFingerprint(OmemoManager.java:607)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at org.jivesoftware.smackx.omemo.OmemoManager.getActiveFingerprints(OmemoManager.java:639)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at org.atalk.crypto.CryptoFragment.doHandleOmemoPressed(CryptoFragment.java:303)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at org.atalk.crypto.CryptoFragment.onOptionsItemSelected(CryptoFragment.java:218)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at androidx.fragment.app.Fragment.performOptionsItemSelected(Fragment.java:2587)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at androidx.fragment.app.FragmentManagerImpl.dispatchOptionsItemSelected(FragmentManager.java:3368)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at androidx.fragment.app.FragmentController.dispatchOptionsItemSelected(FragmentController.java:356)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at androidx.fragment.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:442)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:1199)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:761)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at com.android.internal.view.menu.SubMenuBuilder.dispatchMenuItemSelected(SubMenuBuilder.java:81)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:155)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:904)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:894)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at com.android.internal.view.menu.MenuPopupHelper.onItemClick(MenuPopupHelper.java:216)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at android.widget.AdapterView.performItemClick(AdapterView.java:334)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at android.widget.AbsListView.performItemClick(AbsListView.java:1531)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at android.widget.AbsListView$PerformClick.run(AbsListView.java:3664)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at android.widget.AbsListView$3.run(AbsListView.java:5585)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at android.os.Handler.handleCallback(Handler.java:739)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at android.os.Handler.dispatchMessage(Handler.java:95)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at android.os.Looper.loop(Looper.java:145)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at android.app.ActivityThread.main(ActivityThread.java:5938)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at java.lang.reflect.Method.invoke(Native Method)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at java.lang.reflect.Method.invoke(Method.java:372)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1389)
07-04 09:17:58.079 E/(UtilActivator.java:90)#uncaughtException( 4351): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1184)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): uncaughtException occurred, killing the process...
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): java.lang.IllegalArgumentException: Null values!
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at org.whispersystems.libsignal.ratchet.AliceSignalProtocolParameters.<init>(AliceSignalProtocolParameters.java:38)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at org.whispersystems.libsignal.ratchet.AliceSignalProtocolParameters.<init>(AliceSignalProtocolParameters.java:14)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at org.whispersystems.libsignal.ratchet.AliceSignalProtocolParameters$Builder.create(AliceSignalProtocolParameters.java:110)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at org.whispersystems.libsignal.SessionBuilder.process(SessionBuilder.java:201)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at org.jivesoftware.smackx.omemo.signal.SignalOmemoService.processBundle(SignalOmemoService.java:104)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at org.jivesoftware.smackx.omemo.signal.SignalOmemoService.processBundle(SignalOmemoService.java:48)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at org.jivesoftware.smackx.omemo.OmemoService.buildFreshSessionWithDevice(OmemoService.java:785)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at org.jivesoftware.smackx.omemo.OmemoStore.getFingerprintAndMaybeBuildSession(OmemoStore.java:637)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at org.jivesoftware.smackx.omemo.OmemoManager.getFingerprint(OmemoManager.java:607)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at org.jivesoftware.smackx.omemo.OmemoManager.getActiveFingerprints(OmemoManager.java:639)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at org.atalk.crypto.CryptoFragment.doHandleOmemoPressed(CryptoFragment.java:303)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at org.atalk.crypto.CryptoFragment.onOptionsItemSelected(CryptoFragment.java:218)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at androidx.fragment.app.Fragment.performOptionsItemSelected(Fragment.java:2587)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at androidx.fragment.app.FragmentManagerImpl.dispatchOptionsItemSelected(FragmentManager.java:3368)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at androidx.fragment.app.FragmentController.dispatchOptionsItemSelected(FragmentController.java:356)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at androidx.fragment.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:442)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:1199)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:761)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at com.android.internal.view.menu.SubMenuBuilder.dispatchMenuItemSelected(SubMenuBuilder.java:81)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:155)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:904)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:894)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at com.android.internal.view.menu.MenuPopupHelper.onItemClick(MenuPopupHelper.java:216)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at android.widget.AdapterView.performItemClick(AdapterView.java:334)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at android.widget.AbsListView.performItemClick(AbsListView.java:1531)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at android.widget.AbsListView$PerformClick.run(AbsListView.java:3664)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at android.widget.AbsListView$3.run(AbsListView.java:5585)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at android.os.Handler.handleCallback(Handler.java:739)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at android.os.Handler.dispatchMessage(Handler.java:95)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at android.os.Looper.loop(Looper.java:145)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at android.app.ActivityThread.main(ActivityThread.java:5938)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at java.lang.reflect.Method.invoke(Native Method)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at java.lang.reflect.Method.invoke(Method.java:372)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1389)
07-04 09:17:58.079 E/(ExceptionHandler.java:79)#uncaughtException( 4351): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1184)

I’ll look into it.