MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

App with Freshly Updated XML Returns Old App Data Erratically

Last post 09-03-2008 3:51 PM by Daniel. 17 replies.
Page 1 of 2 (18 items) 1 2 Next >
Sort Posts: Previous Next
  • 06-23-2008 9:15 AM

    App with Freshly Updated XML Returns Old App Data Erratically

     I experienced this problem on Friday 6/20/2008.  I came in today, 6/23/2008, and the problem seemed to be gone.  

     The problem is that I'll go to my canvas page, make changes to the app data, then go to other views, and sometimes the views load up the most up-to-date AppData, and sometimes they load up AppData from previous interactions.  It seems totally random.  I go back to the canvas, sometimes it's got the newest AppData, sometimes it's old AppData.  Fire up a different browser, sometimes it's the latest AppData, sometimes it's old.  

     The reason I pointed out that the problem seemed resolved today is the following:  Once I uploaded some new XML, the problem reappeared.  It seems like everything's fine until new XML goes up.  Then the servers (?) don't quite know what to do and get their data from somewhere else.  

    My problem resembles http://developer.myspace.com/Community/forums/p/2610/11312.aspx#11312 , but I created a new thread because I think it's related to updating the App XML.  

    Filed under: ,
  • 06-23-2008 9:34 AM In reply to

    Re: App with Freshly Updated XML Returns Old App Data Erratically

    Hey there..

    I almost made an xml thread this AM because there were some xml issues that were fixed last week and I was getting confused on what exactly the issue is. :)  So thanks for the rundown.

    I'll send this in :)

  • 06-23-2008 9:36 AM In reply to

    Re: App with Freshly Updated XML Returns Old App Data Erratically

    ok wait, just re-read your post.

    Are you still having an issue or not?? Tongue Tied

  • 06-23-2008 10:33 AM In reply to

    Re: App with Freshly Updated XML Returns Old App Data Erratically

    Yeah.  Sorry for the ambiguity, but I am still experiencing the issue.  

    The gist of it is that I'm seeing a lot of AppData inconsistency.  I've got four parameters.  Each one gets a form element on my canvas.  The parameters feed some flash content.

    So I'll go into the canvas view, change between one and four of the parameters, hit my save link, and then go to a different view.  Sometimes I see all of my parameters as I just saved them, sometimes the parameters reflect the last time I saved, and sometimes I get a mix of parameters from the most recent save and parameters from older save(s).  

    I'm currently using Firefox 3 for the bulk of my testing.  When I load up IE7, I see parameter values that are hours(?) old that refuse to update.  (But IE7 has its own set of problems that I have yet to tackle.)  Signing out and signing back in have no effect, but restarting IE7 seems to do the trick.  

    I did say that this morning, the problem appeared to be gone.  And it's true.  I couldn't reproduce the problem.  Then I updated my XML and uploaded it with the refresh button, and I'm seeing the problems described here.  

    ... I just took a break on this post for about 30 minutes trying to come up with some good reproduction steps, but nothing ever turns out the way I expect.  That's not to say the problem is gone.  Sometimes I'll change one parameter, hit the save link, go to the Home view, everything looks good, go back to the canvas view, and that change -- which was just recognized by the home view -- now seems to be gone.  

    My function to save settings provides zero user feedback that it has executed successfully.  I'm thinking about executing the req.send with the multiple newUpdatePersonAppDataRequest, and then do the new req.send with the newFetchPersonAppDataRequest repeatedly on a one-second interval until all of the server parameters match the parameters I just sent.  Maybe waiting a particular amount of time will ensure all of the settings have been saved ... ?

  • 06-23-2008 12:44 PM In reply to

    Re: App with Freshly Updated XML Returns Old App Data Erratically

     Brief update.  I added a link to my canvas view that goes to the canvas view -- effectively a page refresh, or one would think.  I changed and saved one parameter, and then I just hit that Canvas View link repeatedly.  It seems pretty random, but I'd guess one time out of eight, I get the old value for that one parameter.  

    [Edit:] Maybe it's closer to 50-50 ...

  • 06-24-2008 2:41 PM In reply to

    Re: App with Freshly Updated XML Returns Old App Data Erratically

     Yes, I'm still updating this thread. 

     So I've got four user-definable parameters.  I've found that it's good to test changing two and only two parameters, then hitting the save link.  When I click on canvas link (from the canvas, of course),  I rarely get the same output twice in a row.  And -- here's what I think is important -- it seems that each reload shows only one change from the previous save -- not two.  

    Is this a database issue somewhere?  A parser goes through each change that my script passed up, and rather than send all changes to each server, sends the first change to server A, then the second change to server B, then the first change to server C, etc?  

     

  • 06-25-2008 6:42 AM In reply to

    Re: App with Freshly Updated XML Returns Old App Data Erratically

     Hi,

    I had some guys check out this problem last week and they could not replicate the issue. Please list your app ID, and I'm going to hopefully have someone check into this thread directly today.

     

    Rhonda 

  • 06-25-2008 9:49 AM In reply to

    Re: App with Freshly Updated XML Returns Old App Data Erratically

     Hi Rhonda,

     I've been doing research today and not uploading XML.  I tried to show the issue to a coworker here and could not reproduce it.  Then I saw your post in this thread.  I tried several more times to reproduce the problem and couldn't.  

    But, my main suspicion has been that the problem pops up after I upload new XML.  So I changed a few lines and uploaded new XML ... and I get the problem again.  I'm seeing the problem now.  

    My App ID is 109737 (at least, that's what it looks like from the URL of the canvas page).  The URL of my app is: http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=386557640 

    It seems like no matter how many parameters I update (and commit), typical refreshes show me one of the new parameter values with the others appearing unchanged.  Subsequent refreshes show perhaps a different one of the parameters with its new values, and all other parameters with old values.  (Possibly a few minutes later I'll sometimes get all parameters with their new values, or all parameters with their old values ... ?)  Hopefully you can reproduce.  

    PS - I've got the same XML running in Orkut and Hi5 and I don't (ever) see this issue.  

    Thanks,
    Daniel

  • 06-26-2008 8:31 AM In reply to

    Re: App with Freshly Updated XML Returns Old App Data Erratically

     I haven't heard anything from you guys in about 24 hours, so I'm going to go ahead and try updating my parameters with four DataRequests that have one field each, rather than one DataRequest that has four fields.  I'm vaguely optimistic that it will work.  

  • 06-30-2008 9:39 AM In reply to

    Re: App with Freshly Updated XML Returns Old App Data Erratically

     I changed my app to use multiple datarequests instead of a single batch dataquest.  Although on Friday I thought this had resolved the problem, today it appears that it didn't do the trick.  

    I can reproduce this error with near 100% success.  

    Also, I've seen similar data issues on other applications when installed to my profile.  I don't see anyone else describing this problem on the forums.  

    I'm in Atlanta, GA.  Is it possible that this is an East Coast issue?  

  • 07-11-2008 12:58 PM In reply to

    Re: App with Freshly Updated XML Returns Old App Data Erratically

    Hi,


    We've been witnessing similar a issue, albeit via a "non-xml" authored app.  To complete installation, our application stores two data points, as a pair, from its canvas:


    function saveSelection(artist, dirname, callback)
    {
      os = opensocial.Container.get();

      var dr = os.newDataRequest();

      var v = opensocial.DataRequest.PersonId.VIEWER;

      dr.add(os.newUpdatePersonAppDataRequest(v, 'artist', artist));
      dr.add(os.newUpdatePersonAppDataRequest(v, 'dirname', dirname));
      dr.send(callback);
    }


    On the profile, it then retrieves the latter dirname value in the expected manner.  In production only, we are seeing an intermittent bug that results in our application loading improperly.  Sometimes, around noon today for example, the bug occurs with a 50/50 chance with each refresh of the profile.

    Using firebug, to find what I suspected to be a timeout issue, I was surprised to find that the response to our AppDataRequest would occasionally contain one value (artist) but not the other (dirname, the one that matters, of course).  So, I've submitted an update to our app to retry the request a few times whenever we get a value for "artist" but not "dirname".

    I'm pretty confident this workaround will do the job in production, having simulated it there using firebug.  None the less, I thought I should bring it to your attention in this forum despite being unable to provide you with steps to reproduce in a guaranteed fashion.  We know it to be intermittent and suspect it to be load related as it happens most often midday.  Finally, I've never experienced it in the development sandbox.


    Thanks,

    JP


    P.S.: we are east coasters, if you're thinking CDN...

  • 07-11-2008 4:40 PM In reply to

    Re: App with Freshly Updated XML Returns Old App Data Erratically

    Hey there,

    So just to clarify,  you have not seen this issue in development but only in production after your application was published, correct? Have you seen this issue with non-Developer accounts and users that aren't friends of the application's profile?

    We do cache the surface of the application for 5 mins on our servers but only for the live application surfaces. When then app is in development or being viewed by one of the application developers we don't cache the surface at all. Does the issue resolve itself after 5 mins or does it stick around?

    If you can replicate this issue again and provide steps to replicate and post the response headers you are seeing for both the correct and incorrect versions that would probably be helpful too.

    Thanks!

  • 07-11-2008 6:59 PM In reply to

    Re: App with Freshly Updated XML Returns Old App Data Erratically

     So just to clarify,  you have not seen this issue in development but only in production after your application was published, correct?

    >> correct


    Have you seen this issue with non-Developer accounts and users that aren't friends of the application's profile?

    >> yes, our regular users have brought it to our attention


    Does the issue resolve itself after 5 mins or does it stick around?

    >> at first that seemed to be the case, but now, during what appear to be periods of higher load for MySpace, installations that had been reliable can exhibit the problem with a 50% chance during each page load.


    If you can replicate this issue again and provide steps to replicate and post the response headers you are seeing for both the correct and incorrect versions that would probably be helpful too.

    >> sure, here's an example.  First the request which is exactly the same regardless of the outcome:


    GET /opensocial-api-v1.svc/XML/opensocial/OWNER/appdata?opensocial_surface=profile.right&ts=1215825868276 HTTP/1.0
    Accept: */*
    Accept-Language: en-us
    x-opensocial-authorization: OPENSOCIAL opensocial_token="3Fd7z%2fC0xUsMqT8UVBPGjWX9BFqpOtS7p3E3qBCuYAaBSyePK8RbPcXYlZ5cWbQLm8x%2bJYS%2f%2bj2O2UxzT6gGoZ4SAo6NwYz8jrVC9oPOcl8%3d"
    Content-Type: application/x-www-form-urlencoded
    Referer: http://api.msappspace.com/apprendering/108829/profile.right/render.app#3Fd7z%2fC0xUsMqT8UVBPGjWX9BFqpOtS7p3E3qBCuYAaBSyePK8RbPcXYlZ5cWbQLm8x%2bJYS%2f%2bj2O2UxzT6gGoZ4SAo6NwYz8jrVC9oPOcl8%3d&opensocial_surface=profile.right&userLoggedOut=1&ownerId=67988645&installState=0&country=US&lang=en
    UA-CPU: x86
    User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; .NET CLR 2.0.50727)
    Host: api.msappspace.com


    >> next, a successful response:

    HTTP/1.1 200 OK
    Cache-Control: max-age=5, must-revalidate
    Content-Length: 421
    Content-Type: application/xml; charset=utf-8
    Server: Microsoft-IIS/6.0
    X-Server: 9df52e28852641dae7d1e0d9bb3b0efbb4a5a638f45138c9
    Set-Cookie: SessionDDF1=a44b75717894c407e2d963454eef343145925a7e693d8008; domain=.myspace.com; path=/
    Date: Sat, 12 Jul 2008 01:24:41 GMT
    Connection: keep-alive


    <user xsi:schemaLocation="http://api.myspace.com/MySpaceAPI_1.1.xsd" xmlns="api-v1.myspace.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <userid>
    67988645
    </userid>
    <uri>
    http://api.msappspace.com/opensocial-api-v1.svc/XML/opensocial/OWNER
    </uri>
    <appdata count="2">
    <key name="artist" value="Joe Buck Yourself" />
    <key name="dirname" value="bucketcity" />
    </appdata>
    </user>


    >> finally, and hopefully most useful, a failed response:

    HTTP/1.1 200 OK
    Cache-Control: max-age=5, must-revalidate
    Content-Length: 381
    Content-Type: application/xml; charset=utf-8
    Server: Microsoft-IIS/6.0
    X-Server: ELS2MWEBAPI0024
    Date: Sat, 12 Jul 2008 01:24:40 GMT
    Connection: keep-alive


    <user xsi:schemaLocation="http://api.myspace.com/MySpaceAPI_1.1.xsd" xmlns="api-v1.myspace.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <userid>
    67988645
    </userid>
    <uri>
    http://api.msappspace.com/opensocial-api-v1.svc/XML/opensocial/OWNER
    </uri>
    <appdata count="1">
    <key name="artist" value="Joe Buck Yourself" />
    </appdata>
    </user>

    The more generic X-Server header and lack of a session id look suspect...

    Hope this helps!  Thanks for looking into it.


    JP

  • 07-11-2008 7:09 PM In reply to

    Re: App with Freshly Updated XML Returns Old App Data Erratically

    P.S. To reproduce, if you've got Charles (or another client-side proxy tool), view the activity sequentially and set the filter to "appdata".  Then, visit our Nimbit OMT app at this user's profile (I suspect the volume of stuff on the page may contribute):

    http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=67988645

    Open the app's frame in a dedicated tab (so it's easier to repeatedly refresh the page).  Then, while refreshing the page, watch for successive calls to:

    http://api.msappspace.com/opensocial-api-v1.svc/XML/opensocial/OWNER/appdata?opensocial_surface=profile.right&ts=1215825868276

    If more than one occurs during a single page load it's because our app has detected the problem and tried the request again.


    JP
     

  • 07-15-2008 3:02 PM In reply to

    Re: App with Freshly Updated XML Returns Old App Data Erratically

    To answer your specific questions:

    My app is not open to the public, so I see this problem in development.  It's only been tested with Developer accounts that *are* friends of the application's profile.  

    The issue does not resolve itself after 5 minutes, but I assume this is moot since my app is dev only.  

    I haven't worked on this particular issue in a week or two so I don't have code in place to record the headers.  When I do, I'll post to this thread again.  

    Thanks,
    Daniel

Page 1 of 2 (18 items) 1 2 Next >