I am having the same issue after upgrading to 4.1.0-rc1 (from 3.5).
After two days of debugging (I should have come earlier to this thread :-() ) , I think I pinpointed the problem to this code in the StreamNegotiator:
Stanza initiateIncomingStream(XMPPConnection connection, StreamInitiation initiation) throws NoResponseException, XMPPErrorException, NotConnectedException {
StreamInitiation response = createInitiationAccept(initiation,
getNamespaces());
// establish collector to await response
PacketCollector collector = connection
.createPacketCollectorAndSend(getInitiationPacketFilter(initiation.getFrom(), initiation.getSessionID()), response);
Stanza streamMethodInitiation = collector.nextResultOrThrow();
return streamMethodInitiation;
}
Smack is generating a IQ result message, which is in fact a result/response of a set IQ, but then start to wait for a response on this result. There is of course no real response, but instead a IQ set is sent (or even two) with the correct From address and SessionID. This IQ set is not picked up by the collector, while – and this is the part I do not understand – in the AbstractXMPPConnection invokePacketCollectorsAndNotifyRecvListeners IQ set and get stanz are handled different, and explicitly is said:
// The following returns makes it impossible for packet listeners and collectors to
// filter for IQ request stanzas, i.e. IQs of type ‘set’ or ‘get’. This is the
// desired behavior.
return;
So either there should be no collector but another type of stanza listener, or the code in the invokePacketCollectorsAndNotifyRecvListeners should be elaborated.
To summarize:
client 1 (anno…) is sending:
http://jabber.org/protocol/bytestreamshttp://jabber.org/protocol/ibb
client 2 (test1…) is answering:
http://jabber.org/protocol/bytestreamshttp://jabber.org/protocol/ibb
and waiting for an answer from “anno…” and sid=‘jsi_8237492034875763688’.
Client 1 is sending/responding with even two answers:
…
but client 2 neither of them accepts them as a proper response, while they are IQ set stanza and not presented to any collector.