Project

General

Profile

No response from server when asking for (empty) list of chats

Łukasz Soszyński
Added almost 5 years ago

Asking for list of chats:

<iq id='cccc' type='get'>
    <list xmlns='urn:xmpp:archive' start='1970-01-01T00:00:00.001+0000'>
        <set xmlns='http://jabber.org/protocol/rsm'>
            <max>50</max>
        </set>
    </list>
</iq>

Server response:

None

According to XEP, it should be empty list:

<iq type='result' to='romeo@montague.net/orchard' id='list1'>
  <list xmlns='urn:xmpp:archive'/>
</iq>

Replies (8)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam almost 5 years ago

Could you check if there is any exception in server logs? and could you upload this part of a log which is related to processing of this request?

Usually when server is not sending any results we may expect that something failed on server side and we need to check in logs what was it.

Added by Łukasz Soszyński almost 5 years ago

Ok, I will check logs and notify you as soon as possible.

Added by Łukasz Soszyński almost 5 years ago

Yes, I see NullPointerException in log:

2014-03-27 13:30:36.928 [in_0-message-archive] AbstractMessageReceiver$QueueListener.run() SEVERE: [in_0-message-archive] Exception during packet processing: from=sess-man@dev, to=message-archive@dev, DATA=<iq from="000000000101@localhost/one" id="cccc" xmlns="jabber:client" type="get">
<list xmlns="urn:xmpp:archive" start="1970-01-01T00:00:00.001+0000">
<set xmlns="http://jabber.org/protocol/rsm">
<max>50</max>
</set>
</list>
</iq>, SIZE=266, XMLNS=jabber:client, PRIORITY=NORMAL, PERMISSION=AUTH, TYPE=get
java.lang.NullPointerException
at tigase.archive.MessageArchiveDB.getCollections(MessageArchiveDB.java:457)
at tigase.archive.MessageArchiveComponent.listCollections(MessageArchiveComponent.java:292)
at tigase.archive.MessageArchiveComponent.processActionPacket(MessageArchiveComponent.java:214)
at tigase.archive.MessageArchiveComponent.processPacket(MessageArchiveComponent.java:107)
at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1475)
2014-03-27 13:30:51.575 [hostnames] UserRepoRepository.reload() CONFIG: All loaded items:
{localhost=Domain: localhost, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}

I hope log contains all necessary informations :)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam almost 5 years ago

Yes, thank you for this log. It contained all necessary details. I've already found and issue and will fix it tomorrow.

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam almost 5 years ago

I've just fixed this bug. New snashot build of Message Archiving which will be created, will contain fix for this issue. Thank you for reporting this bug.

Added by Łukasz Soszyński almost 5 years ago

Now it works fine :)

REQUEST:

<iq id='cccc' type='get'>
    <list xmlns='urn:xmpp:archive' start='2500-01-01T00:00:00.001+0000'>
        <set xmlns='http://jabber.org/protocol/rsm'>
            <max>50</max>
        </set>
    </list>
</iq>
RESPONSE:
<iq type="error" to="000000000131@localhost/dev" id="cccc">
<list xmlns="urn:xmpp:archive" start="2500-01-01T00:00:00.001+0000">
        <set xmlns="http://jabber.org/protocol/rsm">
            <max>50</max>
        </set>
    </list>
<error type="cancel" code="404">
<item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
<text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en">No items in specified period</text>
</error>
</iq>

But from my point of view it will be better if we receive response like this:

<iq type='result' to='romeo@montague.net/orchard' id='list1'>
  <list xmlns='urn:xmpp:archive'/>
</iq>

The above response doesn't require special handling.

I tested on version 5.3.0-SNAPSHOT b3491 2014-04-01

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam almost 5 years ago

Please verify that you properly upgraded installation to snapshot version. I just used tigase-message-archiving.jar from a build you mentioned and I received correct results. I know that this error is not possible in current version as I removed lines responsible for returning this error.

How you upgraded this installation?

Did you changed all files or just a single file?

Did you used files from -dist archive or from -dist-max archive?

Added by Łukasz Soszyński almost 5 years ago

After upgrade in proper way everything works OK :) Thanks

    (1-8/8)