[r154] Windows 8 Export breaks Index.html - jQuery

Bugs will be moved here once resolved.

Post » Sat Dec 14, 2013 10:45 am

[Updated 12/16/2013] Updated with screenshots of different files in the new exported version. At bottom of this post.

In the latest build when you create a windows 8 app or any app and export as a windows 8 app, the index.html file does not have everything it should. I can compare it with my older windows 8 export that works fine, but with exporting using the latest build I consistently get the javascript error. I can confirm it is an issue with the way the page is formed by copying the contents of my old index.html file in place of the new one and the new app will start working. There are a bunch of little differences between the structure of the new index.html files and the old ones that C2 would generate.

I am in the process of rebuilding my windows 8 application and cannot use the export functionality for a new build due to this issue. Here are Links to the old and new index.html as well that will help you find the issue.

Old Index.html file(working): http://dl.dropboxusercontent.com/u/138635871/C2BugCapx/indexOLDWorking.html

New Index.html file(broken): http://dl.dropboxusercontent.com/u/138635871/C2BugCapx/indexNEWBroken.html

Link to .capx file (required!):
http://dl.dropboxusercontent.com/u/138635871/C2BugCapx/win8adtest.capx

Steps to reproduce:
1. Open the capx
2. Export to windows 8
3. Open in visual studio
4. add the test certificate
5. Run the app (F5)


Observed result:
App Fails to run and displays a javascript error that jQuery is undefined.

Here is the Error Text:
Unhandled exception at line 77, column 3 in ms-appx://1195e6d7-3fa5-4ca5-ba49-a39875d7e345/index.html

0x800a1391 - JavaScript runtime error: 'jQuery' is undefined

Here is the code from line 77:

jQuery(window).resize(function () {
              cr_sizeCanvas(jQuery(window).width(), jQuery(window).height());
          });



Expected result:
App should run and display in windows 8

Browsers affected:
Chrome: N/A
Firefox: N/A
Internet Explorer: N/A

Operating system & service pack:
Windows 8.1 (All current updates)

Construct 2 version:
r154
    

Just wanted to update this, I am seeing differences in the files that are generated in the solution as well. Some also seem to be missing according to visual studio... Did something get changed or mixed up between the windows 8.1 and windows 8.0 options? I export as windows 8.0 and here is the difference between my old and new exports (old is r152, new is r154)

New is on the left, old (working) is on the right...


I figure you guys are probably off for the weekend, so I am just trying to add as much detail as I can to get the windows 8 export piece fixed as it is currently broken and I cannot run the generated solutions from Visual Studio any more...BluePhaze2013-12-16 16:51:55
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Tue Dec 17, 2013 12:52 am

Just wanted to check in on this... is this a new structure that just isn't documented yet? Are there new steps involved for exporting to windows 8?
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Tue Dec 17, 2013 3:00 pm

Closing as can't reproduce, I exported your .capx for both Windows 8.0 and 8.1 and it worked fine. The index.html has a script tag to load jQuery just before the script tag which handles resizes using jQuery, which means jQuery is always loaded before it's used, and I verified the app starts and runs OK. Your links to Dropbox files do not work because you cannot upload Windows 8 exports, they must be run from within Visual Studio only - you should use the HTML5 export if you want to run them off the web.
Scirra Founder
B
395
S
233
G
88
Posts: 24,376
Reputation: 193,842

Post » Tue Dec 17, 2013 7:35 pm

Thanks @Ashley that's really odd... I wasn't wanting to run them off the web, they were links to the index files so that you could see the differences in them code wise. Not to run the game from there.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Tue Dec 17, 2013 7:38 pm

It looks like you manually edited it and broke it. The HTML file references jQuery 1.7.1, which Construct 2 hasn't exported for a long time now.
Scirra Founder
B
395
S
233
G
88
Posts: 24,376
Reputation: 193,842

Post » Tue Dec 17, 2013 9:15 pm

@Ashley That is odd... maybe due to adding Podes Div or the Metro plugin and then removing them... Thanks for the info!BluePhaze2013-12-17 21:16:04
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Tue Dec 17, 2013 9:27 pm

@Ashley any idea on those extra files that Visual studio is marking in the solution explorer? For some reason it keeps adding those references when I export:

In-App-Purchase-TestingOnly.xml
Settings-About.html
Settings-GamePreferences.html
Settings-Help.html
Settings-Purchase.html
viewstates.css

I don't see these in my old Windows 8 Export (r152). This is a Windows 8.0 (VS2012) export...
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Tue Dec 17, 2013 10:05 pm

Those files definitely don't come from Construct 2. They are probably dependencies of a third party plugin.
Scirra Founder
B
395
S
233
G
88
Posts: 24,376
Reputation: 193,842

Post » Tue Dec 17, 2013 10:40 pm

@Ashley Thanks!
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Tue Dec 17, 2013 10:49 pm

@Ashley looks like that Metro plugin totally hosed the export index.html for Windows 8 applications. Reinstalling and hoping that it will clean itself up. I deleted the plugin directory for it. Are there any other steps for safely cleaning up plugins or returning Construct back to default project templates if a plugin altered them?
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Next

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 5 guests