locked
XMPP vCard request keeps saying the fetch stanza's "to" field is invalid RRS feed

Answers

  • After some investigation, I found that the availability of a user tile in a vCard response is based on the client or clients in use by your buddies. This means that a user tile will sometimes not be available regardless. We are evaluating changes to this behavior. Your client should continue to request  vCards and to display user tiles when they are returned, as normal.

    Thanks,

    Bill

    Monday, June 4, 2012 8:57 PM

All replies

  • Hi John,

    You must use the JID format that the Messenger XMPP server returns in the roster.  All requests that your application sends to the Messenger XMPP service need to use this format, which is different than the user's email address.

    In the example you give, it looks like 123456@messenger.live.com/{e9948f4d-e730-42e0-ac8d-198e33f52e90} is the correct format.  cbsomeidblahblah@messenger.live.com is not the right format.

    Thanks,

    Casey

    Monday, January 23, 2012 7:27 PM
  • Thanks Casey.  That helped a lot (forgot I was stripping that off the JID before storing it).

     

    Will keep the bound qualifier, and use it in requests.


    John Carroll Directory of Technology ForgetMeNot Software
    Tuesday, January 24, 2012 5:00 PM
  • Great!  I am glad to hear that it is working.

    Let us know if you run into any other issues or if you have any other questions.

    Thanks,

    Casey

    Tuesday, January 24, 2012 8:52 PM
  • Hi, casey

     

    Sorry, but I spoke too soon.  The roster doesn't include the "bind" suffix, as this extract (modified to hide the CID) shows:

    <iq id="12345566666" to="738373837837@messenger.live.com/{df31103c-6a02-4083-9320-35f34e37cf91}" type="result"><query xmlns="jabber:iq:roster"><item jid="123456@messenger.live.com" name="John Carroll" subscription="both" /><item jid="789282@messenger.live.com" name="xxx xxxxx" subscription="both" /><item jid="72727363726@messenger.live.com" name="ForgetMeNot Software" subscription="both"><group>Friends</group></item><item jid="3333333333@messenger.live.com" name="someone's name" subscription="both" /></query></iq>

    The presence and message stanzas include the suffix, but the roster doesn't.

    So, using just the roster, is there a way to retrieve a VCARD? 


    John Carroll Directory of Technology ForgetMeNot Software
    Wednesday, January 25, 2012 12:08 AM
  • Hi John,

    Omitting the resource part of the JID (the GUID after the slash) should not affect vCard lookup, so the JIDs you are getting back from the roster should be sufficient to do a vCard lookup.

    The error message in your original post indicates a problem looking up a buddy. Can you please send another vCard request to the server, and reply with a copy of the request and the resulting error message, along with the date/time when it was made? With that information, I'll be able to investigate further.

    Thank you,

    Bill

    Friday, January 27, 2012 1:20 AM
  • Hi, Bill

    I saw your response, but we haven't had time to run the test again, as we deferred using the vCard properly till later due this issue (the roster entry name is enough, for now).  Once we get back to it, I'll run the test and post my results here.

    Thanks for your help,

    John


    John Carroll Directory of Technology ForgetMeNot Software
    Saturday, February 4, 2012 4:37 PM
  • Hi, Bill

    I saw your response, but we haven't had time to run the test again, as we deferred using the vCard properly till later due this issue (the roster entry name is enough, for now).  Once we get back to it, I'll run the test and post my results here.

    Thanks for your help,

    John


    John Carroll Directory of Technology ForgetMeNot Software
    Thanks for reporting this issue. We are investigating this issue right now and will get back to you soon. 
    Saturday, February 4, 2012 9:10 PM
  • Hi, Dare

    Has this been fixed yet?

    Thanks,

    John


    John Carroll- Director of Technology, ForgetMeNot Software

    Friday, March 9, 2012 3:14 PM
  • Hi John,

    I previously set up a test case to reproduce the errors you are seeing. The timing of the vCard request can affect the error message you get (see below).

    The roster should be returning JIDs like this: 0000000017146f0b@messenger.live.com, with the user part containing sixteen hexadecimal characters. This is the format for JIDs when working with Messenger via XMPP. If you see responses from our servers that don't obey this pattern, please bring them to our attention. I confirmed that a roster result contains properly formatted JIDs, so you should be able to use those for vCard lookups.

    For reference, here is the request and response pair, with some details omitted:

    <iq id="inCjx-7" to="[buddy address]@messenger.live.com" type="get">
      <vCard xmlns="vcard-temp"/>
    </iq>

    <iq id="inCjx-7" to="[my address]@messenger.live.com/{[my endpoint]}" from="[buddy address]@messenger.live.com" type="error">
      <vCard xmlns="vcard-temp">
        <FN/>
    </vCard>
    <error code="404" type="CANCEL">
        <item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
        <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en">cannot find the contact for vcard fetch</text>
      </error>
    </iq>

    You may either see an error saying "cannot find the contact for vcard fetch" or "no buddy matches the vcard fetch stanza's to field", depending on how soon after login you send the request. You can see this error even for users on your roster; the server should be returning vCards in such cases, but isn't doing so.

    I can't commit to a specific date on which this issue will be fixed, but I am working on the issue.

    Saturday, March 10, 2012 1:19 AM
  • Hi John,

    You should be able to request vCards for logged-in buddies, including name and user tile, at this time. If a buddy does not choose to share his info with an XMPP user, the vCard response will be an error.

    I've tested with a pair of mutual buddies and confirmed that this works in production.

    Thanks,

    Bill

    Thursday, May 24, 2012 12:04 AM
  • Thanks, Bill.  I'll try it out.

    John Carroll- Director of Technology, ForgetMeNot Software

    Thursday, May 24, 2012 12:43 AM
  • Hi John,

    I wanted to find out if you'd had any further issues or questions with this functionality. I'm currently investigating reports that vCard user tiles aren't appearing, but friendly (first) names should be returned for buddies that share this information. If anything else comes up, please let us know. :)

    Thanks,

    Bill

    Thursday, May 31, 2012 2:56 AM
  • Hi, Bill

    Thanks for the query.  I haven't actually had the time to try it out yet.  I plan to do it after the craziness ends this week, and I'm back in the UK.

    Thanks for working on this, and updating this thread so that I know it has been changed.  I'll post once I have results from my own test.

    John


    John Carroll- Director of Technology, ForgetMeNot Software

    Thursday, May 31, 2012 6:56 AM
  • After some investigation, I found that the availability of a user tile in a vCard response is based on the client or clients in use by your buddies. This means that a user tile will sometimes not be available regardless. We are evaluating changes to this behavior. Your client should continue to request  vCards and to display user tiles when they are returned, as normal.

    Thanks,

    Bill

    Monday, June 4, 2012 8:57 PM
  • Hi Bill, this is still happening to me on every vcard fetch from my roster.

    <error code="404" type="CANCEL">
        <item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
        <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en">cannot find the contact for vcard fetch</text>
      </error>

    Is this still not working or am I doing something wrong on my end?

    Thanks in advance,

    Alvaro

    Tuesday, July 3, 2012 12:32 PM
  • Hi Alvaro,

    Can you include the stanzas you are sending to retrieve the vCard?

    Thanks,

    Bill

    Wednesday, July 4, 2012 3:02 AM
  • Hi Bill,

    I'm really sorry, it is working as you said, for logged-in buddies it's retrieving the first name correctly. I wish we could get more info, cause it's sometimes hard to know who the contact is just by a first name (I know that knowing the email address is impossible right?), maybe having at least a last name?. And I can confirm that display picture is being retrieved if it was set through the web (https://profile.live.com/P.mvc#!/cid-1d16ba032febc2ac/details/EditPic.aspx in my case). But if the contact set it through Windows Live messenger, it's not being retrieved.

    Regards and thanks for the help

    Alvaro

    Thursday, July 5, 2012 5:12 PM
  • Hi Alvaro,

    We are investigating including more information than just first name. Per my reply in this thread on June 4, retrieving a display picture can be inconsistent. But I'm glad to hear that you're able to retrieve buddy information. Thanks for the update.

    Thanks,

    Bill

    Thursday, July 5, 2012 5:44 PM