If i read the XEP right, a session resume request should always be answered with a 'item-not-found' error, if the session timed out or is non existent for any reason.
Openfire does throw that error sometimes, but sometimes it also throws 'unexpected-request' which seems weird and i guess there is some other cause than not finding the session for it.
Its also not just about timeout, i see this error also when the session is not timed out, as in reconnect after 30 seconds.
could it be that nbxmpp does not wait for the features before it sends the resume? maybe there is some race condition there, maybe OF enables sm after it has sent the features?
Can you test this against 4.3.0 Beta?
XEP-0198 does not specify that only item-not-found is a valid response. The item-not-found is just the sole explicitly spelled out error case. But that does not in turn imply that the other error conditions are disallowed The schema lists err:stanzaErrorGroup as valid elements, which IIRC include other elements too.
Yes XEP-198 says server SHOULD use item-not-found. So yes strictly that is no MUST.
The bug here is that it returns unexpected-request for no apparent reason
@wroot: I asked if they can try on openfire beta, i will return once i have results
So it seems the beta fixes the problem, this can be closed for now
As it can't be reproduced in 4.3.0, marking as fixed in that version.