OfflineMessageManager throws NPE (beta2-snapshot)

Using tigase server. Specifically the connection.getUser returns null. However the user variable seems to be populated in a deprecated code.

01-28 21:23:52.806 23874-24299/co.intouch W/KronosKonnection﹕ Error initing connection null

01-28 21:23:52.807 23874-24299/co.intouch W/System.err﹕ java.lang.NullPointerException

01-28 21:23:52.808 23874-24299/co.intouch W/System.err﹕ at org.jivesoftware.smack.filter.IQReplyFilter.(IQReplyFilter.java:92)

01-28 21:23:52.808 23874-24299/co.intouch W/System.err﹕ at org.jivesoftware.smack.AbstractXMPPConnection.createPacketCollectorAndSend(Abst ractXMPPConnection.java:721)

01-28 21:23:52.809 23874-24299/co.intouch W/System.err﹕ at org.jivesoftware.smackx.disco.ServiceDiscoveryManager.discoverInfo(ServiceDisco veryManager.java:531)

01-28 21:23:52.809 23874-24299/co.intouch W/System.err﹕ at org.jivesoftware.smackx.offline.OfflineMessageManager.getMessageCount(OfflineMe ssageManager.java:94)

01-28 21:23:52.809 23874-24299/co.intouch W/System.err﹕ at com.kronos.androidapp.xmpp.KronosConnection.initConnection(KronosConnection.jav a:198)

All I am trying to do is

OfflineMessageManager offlineMessageManager = new OfflineMessageManager(xmppConnection);

int x= offlineMessageManager.getMessageCount();

Any work arounds for this?

Was your connection connected at least once when doing this?

Yes but not logged in. I guess I should invoke this after the user is logged in?

Yep, would be pretty bad if one could fetch offline messages without being authenticated.