Errors running forked-cloned codeshow project


I forked and cloned codesow project through VS 2013 Professional, yesterday. It shows the message "cloning successful". I installed necessary references from the packages folder from my local clone. And now I'm trying to run the project in VS. It gives me following errors:

xception is about to be caught by JavaScript library code at line 4163, column 25 in ms-appx://microsoft.winjs.2.0/js/base.js

0x800c0005 - JavaScript runtime error: The system cannot locate the resource specified. (For this, it highlights code from here WinJS.xhr({ url: format("/demos/{0}/{0}.html", demo.name), responseType: "document" })
in data.js"

And in JavaScript console, there is this error: The app couldn’t resolve ms-appx://36805codefoster.codeshow/demos/animationlibrary/animationlibrary.html because of this error: RESOURCE_NOT_FOUND.

What can be the problem? How to solve these errors? Thanks
Closed May 13, 2014 at 2:43 PM by codefoster


codefoster wrote May 6, 2014 at 6:26 AM

This is an expected exception. I am guessing that if you press CTRL + ALT + E in Visual Studio and look under the JavaScript Runtime Exceptions line, you'll see a check under Thrown. Otherwise, you're just looking at the Error Panel and seeing the errors.
The way it works is that the system does an xhr call to the .html page of a demo to see if it exists. If it does then it uses that page for the demo. If not, it looks into the subfolders to create a page with sections.
Thanks for playing with the codeShow project. It's under a lot of development right now, so it's a good time to provide feedback if there's something you'd like to see.

sonalmac wrote May 11, 2014 at 7:16 AM

Thanks for the explanation. The project runs by ctrl+F5. But if I want to compile and debug, then it breaks on the error. How do I compile if I add some code?

sonalmac wrote May 11, 2014 at 7:28 AM

I also get this error: An error occurred while trying to restore packages: Unable to find version '1.2.0. of package 'WindowsAzure.MobileServices.WinjS'.

codefoster wrote May 12, 2014 at 4:31 PM

If you debug the project and it breaks at that exception, you only have to hit Continue to keep going. If you don't want it to stop at that exception at all, you uncheck thrown in the CTRL + ALT + E dialog.

codefoster wrote May 12, 2014 at 4:33 PM

The MobileServices issue is a different one and is probably the reason your debug session is breaking. The latest version should resolve this, so try pulling the latest version of the project. In case you want to fix it on your own, simply remove the Mobile Services reference in the Nuget Packaget dialog. It's not necessary. Mobile Services is included in the js/ folder now.

sonalmac wrote May 12, 2014 at 10:21 PM

Yes, If I continue on break, the project runs through all those exceptions and compiles. However, I don't see my code in effect. To try out, I just added an example of slice in arrayFct.js and made that log div scrollable. If the project is compiling I should see these in effect, right?

Also, it seems like atleast Mobileservices.js is required. When I pull, the project shows it is uptodate in Team Explorer of VS 2013. So I changed following reference in this file.
//var $__fileVersion__ = "1.0.20324.0";
var $__fileVersion__ = "1.1.5";                //This is latest, and installed on my machine.

sonalmac wrote May 13, 2014 at 7:49 AM

Ok,, I deleted my local clone and last fork. Created new fork and cloned it to my local machine. Now it looks like working..

codefoster wrote May 13, 2014 at 2:42 PM

Great. In the future, if you haven't committed anything yourself, you can use...
git reset --hard
git clean -fd
...to reset your working files to the last point and clean out any files that are not in the repository.
Glad it's working for you though.