-
Notifications
You must be signed in to change notification settings - Fork 190
Closed
Description
In the OMEMO branch.
2019-05-29 20:06:43 D/ComposeMessage: error storing message
2019-05-29 20:06:43 D/ComposeMessage: org.greenrobot.eventbus.EventBusException: Invoking subscriber failed
at org.greenrobot.eventbus.EventBus.handleSubscriberException(EventBus.java:527)
at org.greenrobot.eventbus.EventBus.invokeSubscriber(EventBus.java:509)
at org.greenrobot.eventbus.EventBus.postToSubscription(EventBus.java:451)
at org.greenrobot.eventbus.EventBus.postSingleEventForEventType(EventBus.java:411)
at org.greenrobot.eventbus.EventBus.postSingleEvent(EventBus.java:384)
at org.greenrobot.eventbus.EventBus.post(EventBus.java:265)
at org.kontalk.MessagesController$1.call(MessagesController.java:149)
at org.kontalk.MessagesController$1.call(MessagesController.java:131)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.kontalk.service.msgcenter.MessageCenterService$IdleConnectionHandler.release()' on a null object reference
at org.kontalk.service.msgcenter.MessageCenterService.sendMessage(MessageCenterService.java:2584)
at org.kontalk.service.msgcenter.MessageCenterService.handleSendMessage(MessageCenterService.java:1384)
at java.lang.reflect.Method.invoke(Native Method)
at org.greenrobot.eventbus.EventBus.invokeSubscriber(EventBus.java:507)
... 11 more
In this case, the message center was either shutting down or just starting (probably the former), therefore the IdleHandler was already (or still) null.
We should handle NotConnectedException (and probably others) while setting up OMEMO with the server. In fact, there was a signal that the connection was going down:
2019-05-29 20:06:42 W/Keyring: unable to setup advanced coder, falling back to basic
2019-05-29 20:06:42 W/Keyring: org.jivesoftware.smack.SmackException$NotConnectedException: The connection KontalkConnection[[email protected]/7e0fba524a0dd3ef] (0) is no longer connected while waiting for response with IQReplyFilter: iqAndIdFilter (AndFilter: (OrFilter: (IQTypeFilter: type=error, IQTypeFilter: type=result), StanzaIdFilter: id=7D73w-66)), : fromFilter (OrFilter: (FromMatchesFilter (full): beta.kontalk.net))
at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:263)
at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:219)
at org.jivesoftware.smackx.disco.ServiceDiscoveryManager.discoverInfo(ServiceDiscoveryManager.java:531)
at org.jivesoftware.smackx.disco.ServiceDiscoveryManager.discoverInfo(ServiceDiscoveryManager.java:505)
at org.jivesoftware.smackx.omemo.OmemoManager.serverSupportsOmemo(OmemoManager.java:526)
at org.kontalk.crypto.OmemoCoder.init(OmemoCoder.java:108)
at org.kontalk.crypto.OmemoCoder.<init>(OmemoCoder.java:66)
at org.kontalk.provider.Keyring.getEncryptCoder(Keyring.java:77)
at org.kontalk.service.msgcenter.MessageCenterService.sendMessage(MessageCenterService.java:2502)
at org.kontalk.service.msgcenter.MessageCenterService.handleSendMessage(MessageCenterService.java:1384)
at java.lang.reflect.Method.invoke(Native Method)
at org.greenrobot.eventbus.EventBus.invokeSubscriber(EventBus.java:507)
at org.greenrobot.eventbus.EventBus.postToSubscription(EventBus.java:451)
at org.greenrobot.eventbus.EventBus.postSingleEventForEventType(EventBus.java:411)
at org.greenrobot.eventbus.EventBus.postSingleEvent(EventBus.java:384)
at org.greenrobot.eventbus.EventBus.post(EventBus.java:265)
at org.kontalk.MessagesController$1.call(MessagesController.java:149)
at org.kontalk.MessagesController$1.call(MessagesController.java:131)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)
When this kind of stuff happens, just skip the message as unsent and it will be sent at the next reconnection.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working