XMPPFramework icon indicating copy to clipboard operation
XMPPFramework copied to clipboard

FileTransfer - with Potential Fix: "Unable to send SI offer; the recipient doesn't have the required features."

Open dpasirst opened this issue 2 years ago • 0 comments

XMPPFramework: 4.1.0 Running with eJabberd 23.04

Setup both sides with:

xmppIncommingFileTranser = XMPPIncomingFileTransfer()
xmppIncommingFileTranser.disableIBB = false
xmppIncommingFileTranser.disableSOCKS5 = false

fileTransfer = XMPPOutgoingFileTransfer(dispatchQueue: DispatchQueue.main)
fileTransfer.disableIBB = false
fileTransfer.disableSOCKS5 = false

Client 1 sends the transfer request to Client 2, Client 2 responds to Client 1 with:

<iq xmlns="jabber:client" lang="en" to="[email protected]/ccc" from="[email protected]/ddd" type="result" id="20AB1C3E-CEDD-4A7B-9512-28F50F2DFBDB">
  <query xmlns="http://jabber.org/protocol/disco#info">
  <identity category="client" type="ios-osx"></identity>
    <feature var="http://jabber.org/protocol/si"></feature>
    <feature var="http://jabber.org/protocol/si/profile/file-transfer"></feature>
    <feature var="http://jabber.org/protocol/bytestreams"></feature>
    <feature var="http://jabber.org/protocol/ibb"></feature>
  </query>
</iq>

XMPPFramework on Client 1: results in "Unable to send SI offer; the recipient doesn't have the required features."

I tracked it down to this file: XMPPFramework/Extensions/FileTransfer/XMPPOutgoingFileTransfer.m LINE: 1048 NSXMLElement *query = [iq elementForName:@"query"]; The result of that line is query is NULL.
Changing that line to NSXMLElement *query = [iq childElement]; seems to fix the issue, but I'm not sure if it is specific enough to be a proper fix.

dpasirst avatar Oct 14 '23 16:10 dpasirst