Welcome Developers!

in

Welcome!

in

500 server error makeRequest JSON

Last post 10-26-2010 11:08 AM by Joel. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 10-25-2010 5:05 AM

    500 server error makeRequest JSON

    Hi there,

    I'm in the process of building a gallery but i am consistently having issues with using makeRequest trying to parse a json document. I have stripped out all unnecessary code from my app but even with this core i'm getting constant 500 server errors. I hav eset up obj checks to confirm the errors:

    obj.text = undefined
    obj.errorCode = internalError
    obj.errorMessage = The operation has timed out

    I have included my bare-bones app content below. I have two urls in there the request to the json feed on my server "http://www.thewoom.co.uk/bbc/mscdn/radio1/5532.json" works perfectly fine but the call to the BBC url "http://www.bbc.co.uk/radio1/photos/chrismoyles/5532.json" gives me the errors listed above every time. Any help on this would be greatly appreciated:

    ////////////////////// Begin app src /////////////////////////////////////////////////

    <div id="content_div"></div>

    <script type="text/javascript">
       
        // Request Function
        function makeJSONRequest() {
       
            var params = {};
           
            params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.JSON;
           
            var url = "http://www.bbc.co.uk/radio1/photos/chrismoyles/5532.json";
            //var url = "http://www.thewoom.co.uk/bbc/mscdn/radio1/5532.json";
           
            gadgets.io.makeRequest(url, response, params);
       
        };
       
        // Response
        function response(obj) {
           
            var html = obj.text + "<br /><br />";
            html += obj.errorCode + "<br />";
            html += obj.errorMessage;
             
            document.getElementById('content_div').innerHTML = html;
       
        };
     
         // Call request function
        makeJSONRequest();
     
    </script>

    ////////////////////// End app src /////////////////////////////////////////////////

    Filed under: , ,
  • 10-25-2010 2:23 PM In reply to

    Re: 500 server error makeRequest JSON

     Can you get a Wireshark .pcap http capture of the request and 500 response so we can see exactly what is being sent over that is causing a server problem? You can send to developerrelations@myspace-inc.com.

     

    thanks,

    Joel

  • 10-25-2010 7:04 PM In reply to

    Re: 500 server error makeRequest JSON

    The error seems to be just what it says: a timeout. When I try to retrieve that URL, it takes 50 seconds. I suggest proceeding like you are doing now, caching the URL on your server. You wouldn't want to make your users wait for 50 seconds even if it was possible. I confirmed that other URLs work fine (I tested with "http://www.xul.fr/ajax-json-menu.json").
  • 10-26-2010 2:56 AM In reply to

    Re: 500 server error makeRequest JSON

    Hi Joel, Bemmu,

    Many thanks for your replies and looking into this.

    Bemmu, unfortunately this file needs to be served from the BBC servers and so catching on my server is not an option.

    Joel, i have run the Wireshark .pcap http capture as requested and this data has now been sent to developerrelations@myspace-inc.com as you suggested so thanks for that.

    Whilst i'm new to Network Analysis i could glean certain information from the file and that was from the 500 response. From that i can see that some of the .json file is returned but it is never fully returned i believe due to the network timeout. I'm sure the guys at Developer Relations would be able to get more information from the .pcap file than i can but it does seem that the timeout is at the root of the issues.

    Once again thanks for your time.

    Regards
    Brendan

  • 10-26-2010 11:08 AM In reply to

    Re: 500 server error makeRequest JSON

     Yes, there is a time out issue:

    HTTP/1.1 500 The operation has timed out.

     

    There is a LONG delay and I don't see anything we could possibly do on our end. I don't understand why this would be delayed by so much, but our server cannot wait forever, so this is something that would need to be improved on your end.

     

    thanks,

    Joel

Page 1 of 1 (5 items)