AnsweredAssumed Answered

MUC Invitation from parsing

Question asked by Brian on Jan 20, 2017
Latest reply on Jan 22, 2017 by Brian

Hi, I am using Smack (4.2.0 beta3) to develop an Android client. On some servers I can send/receive MUC invitations without issue. However on other servers, the client receiving the invitation is failing to parse the invite/from. From what I see the invite/from is a bare JID, and that is causing issues for Smack. Please let me know if I'm overlooking anything.


Here is a sample invite:

<message from="" to=""><x xmlns=""><invite from=""><reason>Please join me in a conference</reason></invite></x><x xmlns="jabber:x:conference" jid=""/></message>


However it appears Smack is hardcoded to require a Full JID:

MUCUserProvider.parseInvite() currently around line 101

EntityFullJid from = ParserUtils.getFullJidAttribute(parser, "from");


XEP-0045 apparently does not require a Full JID

The <room@service> itself MUST then add a 'from' address to the <invite/> element whose value is the bare JID, full JID, or occupant JID of the inviter and send the invitation to the invitee specified in the 'to' address; the room SHOULD add the password if the room is password-protected)


Here is the error I receive consistently (with a test Open Fire server)


org.jxmpp.stringprep.XmppStringprepException: XmppStringprepException caused by '': org.jxmpp.stringprep.XmppStringprepException: XmppStringprepException caused by '': org.jxmpp.stringprep.XmppStringprepException: Argument can't be the empty string

  at org.jxmpp.jid.impl.JidCreate.entityFullFrom(

  at org.jivesoftware.smack.util.ParserUtils.getFullJidAttribute( )

  at org.jivesoftware.smackx.muc.provider.MUCUserProvider.parseInvite(MUCUserProvide

  at org.jivesoftware.smackx.muc.provider.MUCUserProvider.parse( :55)

  at org.jivesoftware.smackx.muc.provider.MUCUserProvider.parse( :37)

  at org.jivesoftware.smack.provider.Provider.parse(

  at org.jivesoftware.smack.util.PacketParserUtils.parseExtensionElement(PacketParse

  at org.jivesoftware.smack.util.PacketParserUtils.addExtensionElement(PacketParserU

  at org.jivesoftware.smack.util.PacketParserUtils.parseMessage(PacketParserUtils.ja va:283)

  at org.jivesoftware.smack.util.PacketParserUtils.parseStanza(PacketParserUtils.jav a:149)

  at org.jivesoftware.smack.AbstractXMPPConnection.parseAndProcessStanza(AbstractXMP

  at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$500( 146)

  at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPC

  at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPCon

  at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$