powered by Jive Software

Exeption during requsting user last activity: XMPPError: forbidden - auth


#1

Hi,

I try to request user last activity and receive: XMPPError: forbidden - auth. Before that I am succesfully logged in and the presence is available.

The code:

LastActivityManager lam = LastActivityManager.getInstanceFor(xmppConnection);

LastActivity lastUserActivity = lam.getLastActivity(XmppStringUtils.parseBareJid(c.getMailbox()));

The stack trace:

org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPPError: forbidden - auth

at org.jivesoftware.smack.XMPPException$XMPPErrorException.ifHasErrorThenThrow(XMP PException.java:135)

at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:2 32)

at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:2 13)

at org.jivesoftware.smackx.iqlast.LastActivityManager.getLastActivity(LastActivity Manager.java:239)

at …InactiveAccountPurgeService.isInactiveUser(InactiveAccountPurgeService.java: 144)

Smack library ver is 4.1.4.

Thanks in advance!


#2

Resolved by connecting users on openfire.


#3

Hi @Prokhorov_Roman I am getting the same error what you have posted here this is my code to connect to serever

config.setXmppDomain(serviceName)
.setSecurityMode(ConnectionConfiguration.SecurityMode.ifpossible)
.setHost(XMPPConstants.XMPP_HOST)
.setHostAddress(InetAddress.getByName(XMPPConstants.XMPP_HOST))
.setPort(XMPPConstants.XMPP_PORT)
.setDebuggerEnabled(true)
.setSendPresence(true);

xmppConnection = new XMPPTCPConnection(config.build());

please correct me where I am wrong

thanks