AnsweredAssumed Answered

Received IQ dropping elements between RCV and processPacket

Question asked by Dan Devine on Aug 29, 2014
Latest reply on Aug 31, 2014 by Dan Devine

I'm attempting to receive a custom IQ result packet on Smack 4.1.0-alpha1-SNAPSHOT, and some of the XML elements are being dropped between the reception of the packet and the delivery to my listener.


I've set SmackConfiguration.DEBUG_ENABLED = true, and I receive the following stanza: (Cleaned up a little to make readable)


11:11:59 PM RCV  (1631684231): 
<iq type="result" id="j6p8N-33" from=""
     <account xmlns="">


However, by the time it reaches my PacketFilter/PacketListener, it looks like this...

<iq id='j6p8N-33' to='' 
          from='' type='result'>
          .... missing bits....


I've configured a PacketFilter to accept everything, and add the listener for it just before sending the outgoing IQ like this:


    public void sendAccount() {
        AccountIQ accountIQ = new AccountIQ(getUsername(), "", true, 0L);
        accountIQ.setType(IQ.Type.set);"Sending AccountInfo:" + accountIQ.toString());
        try {
            mConnection.addPacketListener(this, new AcceptEverythingPacketFilter());
        } catch (SmackException.NotConnectedException e) {
            LOG.error("Caught exception", e);



Here is the PacketFilter and handler:


    public void processPacket(Packet packet) throws SmackException.NotConnectedException {
        if (packet instanceof IQ) {
  "Received IQ:" + packet.toXML());

    private class AcceptEverythingPacketFilter implements PacketFilter {
        public boolean accept(Packet packet) {
  "Checking packet:" + packet.toString());
            return true;



Thanks for any help, I'm not able to determine where the characters are getting lost.