Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maybe I find the answer about "Unable to send SI offer; the recipient doesn't have the required features" #30

Open
pengwj opened this issue Mar 15, 2016 · 9 comments

Comments

@pengwj
Copy link

pengwj commented Mar 15, 2016

problem:Error Domain=XMPPOutgoingFileTransferErrorDomain Code=-1 "Unable to send SI offer; the recipient doesn't have the required features." UserInfo=0x15e59910 {NSLocalizedDescription=Unable to send SI offer; the recipient doesn't have the required features.}

I find the query will be null after [iq elementForName:@"query"] which in the method [- (void)handleRecipientDiscoInfoQueryIQ: withInfo:] .

Then I found in the method elementForName: (NSXMLElement+XMPP.m),robbiehanson write as so.

    // There is a bug in the NSXMLElement elementsForName: method.
    // Consider the following XML fragment:
    // 
    // <query xmlns="jabber:iq:private">
    //   <x xmlns="some:other:namespace"></x>
    // </query>
    // 
    // Calling [query elementsForName:@"x"] results in an empty array!
    // 
    // However, it will work properly if you use the following:
    // [query elementsForLocalName:@"x" URI:@"some:other:namespace"]
    // 
    // The trouble with this is that we may not always know the xmlns in advance,
    // so in this particular case there is no way to access the element without looping through the children.
    // 
    // This bug was submitted to apple on June 1st, 2007 and was classified as "serious".
    // 
    // --!!-- This bug does NOT exist in DDXML --!!--

so I replace the "NSXMLElement *query = [iq elementForName:@"query"]; " by

      NSXMLElement *query;
      NSArray *queryArray = [iq elementsForLocalName:@"query" URI:@"http://jabber.org/protocol/disco#info"];
      if (queryArray.count == 0) {
          query = nil;
      }
      else
      {
          query = queryArray[0];
      }

in XMPPOutgoingFileTransfer.m.

@pengwj pengwj changed the title maybe i find the answer about Unable to send SI offer; the recipient doesn't have the required features maybe i find the answer about "Unable to send SI offer; the recipient doesn't have the required features" Mar 15, 2016
@pengwj pengwj changed the title maybe i find the answer about "Unable to send SI offer; the recipient doesn't have the required features" maybe I find the answer about "Unable to send SI offer; the recipient doesn't have the required features" Mar 15, 2016
@yasiriqbal
Copy link

What is your target JID? is it full or bare?

@pengwj
Copy link
Author

pengwj commented Mar 16, 2016

fullJID,with a resource

@yasiriqbal
Copy link

Try this! (This is in swift)

    self.xmppOutgoingFileTransfer.disableDirectTransfers = false
    self.xmppOutgoingFileTransfer.disableIBB = false
    self.xmppOutgoingFileTransfer.disableSOCKS5 = false

    self.xmppIncomingFileTransfer.disableDirectTransfers = false
    self.xmppIncomingFileTransfer.disableIBB = false
    self.xmppIncomingFileTransfer.disableSOCKS5 = false

@laizhenwei
Copy link

i also met it,
i find the features need to contain some namespase like "http://jabber.org/protocol/si/profile/file-transfer", but there is nothing match it.
see my IQ:

<iq xmlns="jabber:client" type="result" to="c2@come.in/comein" id="A3EE5CF4-0758-438D-906C-0FA5908F02A6" from="c5@come.in/comein">
  <query xmlns="http://jabber.org/protocol/disco#info">
    <feature var="http://jabber.org/protocol/disco#info"/>
    <feature var="http://jabber.org/protocol/caps"/>
  </query>
</iq>

see method - (void)handleRecipientDiscoInfoQueryIQ: withInfo:

@pengwj
Copy link
Author

pengwj commented Mar 18, 2016

yasiriqbal,I would try it,thanks.

@pengwj
Copy link
Author

pengwj commented Mar 18, 2016

laichanwai,this is the second problem in this project, but I am not sure whether to have so much to write.I want to look for information to verify.

@x3mall1986
Copy link

someone has solved the problem?

@leeshuangai
Copy link

I have the same the problem.how to resolve it?
Error Domain=XMPPOutgoingFileTransferErrorDomain Code=-1 "Unable to send SI offer; the recipient doesn't have the required features." UserInfo={NSLocalizedDescription=Unable to send SI offer; the recipient doesn't have the required features.}

@ashokt
Copy link

ashokt commented Jan 8, 2019

Try this! (This is in swift)

    self.xmppOutgoingFileTransfer.disableDirectTransfers = false
    self.xmppOutgoingFileTransfer.disableIBB = false
    self.xmppOutgoingFileTransfer.disableSOCKS5 = false

    self.xmppIncomingFileTransfer.disableDirectTransfers = false
    self.xmppIncomingFileTransfer.disableIBB = false
    self.xmppIncomingFileTransfer.disableSOCKS5 = false

@yasiriqbal do you full working project, if it is there please share code with me.
I am struggling lot to workout from last one week.
It is very very helpfull for me if yoou share
Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants