locked
Runtime error running beginner's sample RRS feed

  • Question

  • I downloaded the Getting started with JavaScript: Hello World and Blog reader samples. Without any changes to the code, I open the solution in VS2012 to see how it works, but when I start the debug, I get a 800c0008 runtime error.

    The msg box says:

    Exception is about to be caught by JavaScript library code at line 2351, column 21 in ms-appx://microsoft.winjs.1.o/js/base.js   

    800c0008 - The download of the specified resource has failed.

    The Call Stack shows that the application made a call to acquireSyndication[data.js] at line 117, which makes a call to xhr[base.js]

    Is there any solution to this?

    The funny thing is that I was building the app following the tutorial, and the first time I ran that code I got the blog data displayed on the first app page. But the app hung while being scrolled and then never ran past this exception again. So I downloaded the demo code to run, and got the same error right away.

    Saturday, October 20, 2012 11:55 PM

Answers

  • I found an answer to the problem. It was a mistake in the tutorial I guess and it needed to return this instead of "return WinJS.xhr({url: url});

    return WinJS.xhr({ url: url, headers: { "Cache-Control": "no-cache", "If-Modified-Since": "Mon, 27 Mar 1972 00:00:00 GMT" }});

    Guess it needs those exceptions when running? Not sure why, I would be interested to know though.

    • Proposed as answer by gtrussell Thursday, October 25, 2012 7:09 PM
    • Marked as answer by Bruce Martin Thursday, October 25, 2012 7:11 PM
    Thursday, October 25, 2012 6:46 PM

All replies

  • Hi,

    I have tested the code on my side. And there is no problem. Please upgrade vs2012 to the latest. Also try to debug in Simulator.

    Any more questin, please feel free to reply.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com
    Microsoft One Code Framework

    Monday, October 22, 2012 6:28 AM
  • Hi, Bruce Martin

    Lest check your Visual studio version,
    in this case. your error message appears like that column 21 in ms-appx://microsoft.winjs.1.o/js/base.js 

    thats win js its doesn't support, you need change the win JS

    kind regard

    • Proposed as answer by r aditya gumay Monday, October 22, 2012 7:50 AM
    • Unproposed as answer by Bruce Martin Thursday, October 25, 2012 2:06 PM
    Monday, October 22, 2012 7:50 AM
  • Thanks for the answer. I'm running Visual Studio Express 2012 for Windows 8, under Windows 8 Enterprise Evaluation Build 9200 . Where do I go to find the latest upgrade? Don't updates get announced via notifications to the user?

    In the simulator, running the sample, the error happens after the data.js code at line 117 makes this call into WinJS.xhr():

          return WinJS.xhr({ url: url });

    The url parameter value is:

       'http://windowsteamblog.com/windows/b/developers/atom.aspx'

    That url works when pasted into a browser window.

    The code that I'm running is unchanged from the downloaded Hello World and Blog reader samples found here: http://code.msdn.microsoft.com/windowsapps/Getting-started-with-310271df

    Since I running everything straight as it came from Microsoft, seems like the problem is in the MS code somehow. Is the sample code not handling the async download correctly? That part of the JS code is all new to me, and is the reason the I'm learning from the samples, so I'm not in a position now to judge that. I'm trying to become familiar with the "WinJS.Promise" functionality, and it seems like that operation was initiated earlier in the calling sequence. Should it have been done here at the call to WinJS.xhr instead?

        


    Bruce Martin

    Monday, October 22, 2012 1:40 PM
  • Hi,

    Generally, VS2012 will update automatically. But you can check the update manually.

    #Visual Studio 2012

    http://www.microsoft.com/visualstudio/eng/downloads


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com
    Microsoft One Code Framework

    Tuesday, October 23, 2012 1:45 AM
  • Hi,

    I downloaded another copy of my VS2012, and installed the repair operation. When it was finished, I still had the same version 11.0.5.0727.1. And the same run time error. Seems like I'm stuck, so I'm gonna see if I can get through coding the blog reader demo by keeping the dummy data instead of reading in the blogs. I mainly want to get to the layout and navigation part anyway as that applies to my own app.

    But it sure seems like a run time error in an unmodified sample should not be happening for new comers.


    Bruce Martin

    Tuesday, October 23, 2012 2:30 AM
  • Hi,

    Then please check the winjs reference whether as follow:

    <!-- WinJS references -->
        <link href="//Microsoft.WinJS.1.0/css/ui-light.css" rel="stylesheet" />
        <script src="//Microsoft.WinJS.1.0/js/base.js"></script>
        <script src="//Microsoft.WinJS.1.0/js/ui.js"></script>

    If there still has problem, please change a pc to test.

    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com
    Microsoft One Code Framework

    • Marked as answer by Song Tian Thursday, October 25, 2012 6:37 AM
    • Unmarked as answer by Bruce Martin Thursday, October 25, 2012 2:05 PM
    Wednesday, October 24, 2012 2:23 AM
  • I'm experiencing the same error and in the same spot but not in the Getting started with JavaScript: Hello World and Blog reader samples application. I'm getting it when I follow the Blog Reader walk through in Part 3: Create a blog reader (Windows Store apps using JavaScript and HTML). I'm on the step where you run the application after "Update the split PageControl" and before "Add the item detail PageControl".

    I also downloaded the Getting Started sample code and it runs without errors. Both applications point to the same base.js file. Visual Studio is up-to-date with the latest version. Both applications have the same WinJS references in the html files.

    I've tried everything I can think of and I can't see any differences in the project properties or the package.appxmanifest capabilities. 

    There must be some property or setting that we're both missing somewhere.

    Thursday, October 25, 2012 1:18 AM
  • Update:

    I copied the code from my desktop PC (the one that presents the error) over to a tablet and it runs with no issues. Both systems are up-to-date with Windows Update, the version of Visual Studio is the same and the code is exactly the same.

    I'm at a loss.

    Update 2:
    After installing the latest NuGet Package Installer update the app now errors out on my tablet as it does on the desktop. I uninstalled the NuGet Extension and it didn't fix the problem.
    • Edited by gtrussell Thursday, October 25, 2012 3:43 PM
    Thursday, October 25, 2012 2:20 PM
  • I'm waiting until tomorrow when I can install the released OS on another PC, and I can test the problem there. I will also replace the evaluation version I'm using on this PC to see if that changes anything.

    Bruce Martin

    Thursday, October 25, 2012 3:20 PM
  • I found a workaround that seems to work for me: Delete the bin directory before running the application. I don't know why that makes a difference because I compared the files and folders for a "good" run and a "bad" run and there are no differences. FWIW, Clean and Rebuild apparently doesn't remove the debug directory and doesn't prevent the error from occurring.

    So, in the short-term for this application I'm going to delete the bin\debug directory before running every time. In the long-term, I'm hoping there will be a fix for this.

    Thursday, October 25, 2012 5:25 PM
  • I found an answer to the problem. It was a mistake in the tutorial I guess and it needed to return this instead of "return WinJS.xhr({url: url});

    return WinJS.xhr({ url: url, headers: { "Cache-Control": "no-cache", "If-Modified-Since": "Mon, 27 Mar 1972 00:00:00 GMT" }});

    Guess it needs those exceptions when running? Not sure why, I would be interested to know though.

    • Proposed as answer by gtrussell Thursday, October 25, 2012 7:09 PM
    • Marked as answer by Bruce Martin Thursday, October 25, 2012 7:11 PM
    Thursday, October 25, 2012 6:46 PM
  • @gtrussell.

    Yes, your workaround works for me too. I've confirmed that Clean and Rebuild does not work; you have to delete the bin folder after each run.

    @Song Tian,

    In your first response you said "I have tested the code on my side. And there is no problem." Did you run the project a 2nd time? That is when the error shows up. The first run is always good.


    Bruce Martin

    Thursday, October 25, 2012 6:50 PM
  • @auburnfan,

    Your solution works for me. Of course, I have no idea what your modification does, but maybe MS can fix the problem based on your good work.


    Bruce Martin

    Thursday, October 25, 2012 7:14 PM
  • I found an answer to the problem. It was a mistake in the tutorial I guess and it needed to return this instead of "return WinJS.xhr({url: url});

    return WinJS.xhr({ url: url, headers: { "Cache-Control": "no-cache", "If-Modified-Since": "Mon, 27 Mar 1972 00:00:00 GMT" }});

    Guess it needs those exceptions when running? Not sure why, I would be interested to know though.

    This worked for me. I never would have thought of it.

    Also note that I scrolled down to the "Community Additions" section on the walk through and it appears that yesterday MSFT has acknowledged this as an issue in the tutorial (as such it'd also be an issue in the Getting Started code).

    Thursday, October 25, 2012 7:17 PM