XEP-0198: unexpected-request when resuming stream

Igor Khomenko
Added over 4 years ago

We have Tigase 5.2 onboard and trying XEP-0198

everything works ok, but for session resumption we get unexpected-request:


<resume xmlns="urn:xmpp:sm:3" previd="513c8212-2e50-4813-bd7b-6221c869e57e" h="12"></resume>


<failed xmlns="urn:xmpp:sm:3"><unexpected-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></failed>

We don't bind a resource when resuming a session

I checked src code and found this check in StreamManagementIOProcessor.resumeStream method:

// if stream has resource binded then we should not resume
if (service.getUserJid() != null) {
    service.writeRawData("<failed xmlns='" + XMLNS + "'>"
                    + "<unexpected-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>"
                    + "</failed>");

does this make sense? even without binded resource service.getUserJid won't be null, it will be a bare jid

please advise

Replies (1)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 4 years ago

Yes, there was an issue in Tigase XMPP Server 5.2.0 which caused unexpected-request on stream resumption. It is already fixed in development branch and fix for this issue was released in maintenance version 5.2.1 of Tigase XMPP Server