Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Christian_S_10
Beginner
145 Views

Intel XDK and Construct 2 Error on iOS build

Jump to solution

The issue I am having is that when I attempt to simulate my title on either the XDK emulator or on an actual device it just loads a black screen, to the device or onscreen emulator device, and give me an error that says "Error fetching data.js".  Any idea why this might be happening?  All help is appreciated.  Before this issue it was giving me an error due to some "CorHttpd" Plugin.  I've been combing these forums for solutions but have yet to find any.

Tags (2)
0 Kudos
1 Solution
PaulF_IntelCorp
Employee
145 Views

This "smells" like a CSP rule problem. See this link for help regarding adding a CSP rule to your index.html file > https://software.intel.com/en-us/forums/intel-xdk/topic/685395 <

View solution in original post

11 Replies
Shahab_L_Intel
Employee
145 Views

Christian, I'll ask some Intel XDK engineers if they have any ideas about this issue.  I did a search on this and found some threads on Scirra forums such as this one: https://www.scirra.com/forum/export-to-ios-blackscreen-on-intel-xdk_t179895.  In the meantime you can check to see if the suggestions there are helpful.

Please also provide other information that might be helpful in identifying the problem:

The version of your construct2, Version of XDK, iOS version, how you imported your C2 project to XDK, whether you're able to export any other C2 project to XDK and see it on the device/simulator.

 

 

Christian_S_10
Beginner
145 Views

Shahab L. (Intel) wrote:

Christian, I'll ask some Intel XDK engineers if they have any ideas about this issue.  I did a search on this and found some threads on Scirra forums such as this one: https://www.scirra.com/forum/export-to-ios-blackscreen-on-intel-xdk_t179895.  In the meantime you can check to see if the suggestions there are helpful.

Please also provide other information that might be helpful in identifying the problem:

The version of your construct2, Version of XDK, iOS version, how you imported your C2 project to XDK, whether you're able to export any other C2 project to XDK and see it on the device/simulator.

 

 

Here is some more information about this issue and my project:

XDK version 3522, iOS version 9.0+ on the emulator and 10.0.2 on my test device.  I used the new export as XDK file Cordova export function in Construct 2, which is the only option you are allowed on Construct 2 in the version I am using, r236.  I export to a newly built and named file and then use the green "OPEN AN INTEL XDK PROJECT" button to open the project.  once it finishes building the project in XDK I then try to use the "Simulate" tab in XDK to test the title on the emulator (iPhone 6) and get a white screen for about 1 second, followed promptly by a black screen and then nothing.

If I downsize the emulator window then I can see a little popup window behind it, in front of the XDK main simulate window, that states, "UNHANDLED EXEC CALL"  "There is no handler for the following exec call:   CorHttpd.startServer   Please enter a value below to be returned for this call, then indicate whether this represents success or failure.  If you wish to always respond to this call with this result select the 'persist' option."  Then there is a white box for me to enter a value and two buttons on the bottom "Success" and "Failure".  I can export from C2 to the "www" folder in my project using the "HTML5 Website" then it will run in the simulator and on the device, but it will not run on the device after build, it still launches into a black screen.

I can upload pics if needed.

Shahab_L_Intel
Employee
145 Views

Christian, this is the response one of the engineers provided:

In the case of the simulator, it sounds like you have included an unsupported plugin.  This causes the dialog to appear which asks you to provide a return value for CorHttpd.startServer.  You can refer to the release notes for this - also to the Simulator doc page:

https://software.intel.com/en-us/xdk/docs/intel-xdk-simulator-limitations

See the "Unhandled Exec Call" section.

In the case of the device, this sounds like a bug in Contruct2 that Paul F. recently uncovered.  The technique that Construct2 was using to detect whether the app is running in WKWebView or UIWebview does not work on iOS 10.  The result is that the Construct2 engine throws an unhandled error - this results in a white screen.

There is a sticky on the forums about this issue (iOS 10 + Construct2):

https://software.intel.com/en-us/forums/intel-xdk/topic/685395

Christian_S_10
Beginner
145 Views

Shahab L. (Intel) wrote:

Christian, this is the response one of the engineers provided:

In the case of the simulator, it sounds like you have included an unsupported plugin.  This causes the dialog to appear which asks you to provide a return value for CorHttpd.startServer.  You can refer to the release notes for this - also to the Simulator doc page:

https://software.intel.com/en-us/xdk/docs/intel-xdk-simulator-limitations

See the "Unhandled Exec Call" section.

In the case of the device, this sounds like a bug in Contruct2 that Paul F. recently uncovered.  The technique that Construct2 was using to detect whether the app is running in WKWebView or UIWebview does not work on iOS 10.  The result is that the Construct2 engine throws an unhandled error - this results in a white screen.

There is a sticky on the forums about this issue (iOS 10 + Construct2):

https://software.intel.com/en-us/forums/intel-xdk/topic/685395

So, I checked out both of the above forum links and blog posts to see if I could probably figure this thing out.  One of them seemed to work, but it was only a band aid and when the project fully updated it stopped running in the simulator as well.  For some reason even if the title works in the emulator or on my 10.0.2 device using the XDK app preview app to test it out, it does NOT work when it is built and then uploaded to my iTunes Connect account and run as a native app using Test Flight.  I am happy to upload/send any files that might help in figuring this thing out, just let me know.

I also would like to note that I am running this whole setup, C2 export to XDK build from a Virtual Machine (Construct 2) to my Mac(XDK location).       I have never had this issue before when attempting to build, but I have only made Android Builds up until now.

Thank you for all of your help and suggestions so far!

PaulF_IntelCorp
Employee
145 Views

Christian -- create a set of "development" certificates in you Apple dev account and push those into the XDK certificate manager. Then use that dev certificate to build your app for iOS. You can then install that app onto your iOS device and use remote web inspector to debug the issue directly on your phone, with the built app > https://software.intel.com/en-us/xdk/articles/debugging-xdk-cordova-apps-built-for-ios-using-mac-and... <

Christian_S_10
Beginner
145 Views

Paul F. (Intel) wrote:

Christian -- create a set of "development" certificates in you Apple dev account and push those into the XDK certificate manager. Then use that dev certificate to build your app for iOS. You can then install that app onto your iOS device and use remote web inspector to debug the issue directly on your phone, with the built app > https://software.intel.com/en-us/xdk/articles/debugging-xdk-cordova-apps... <

I'm gonna try this right now and I will post what I find.  Thanks

Christian_S_10
Beginner
145 Views

 

Alright, Here is what I've found so far and it is all based on the "data.js" requests being unable to find the "data.js" file for my title.

I have no idea why the build is not including the data.js file when I build it... any and all help is appreciated.

Christian_S_10
Beginner
145 Views

This might also be a helpful image in figuring this issue out

PaulF_IntelCorp
Employee
146 Views

This "smells" like a CSP rule problem. See this link for help regarding adding a CSP rule to your index.html file > https://software.intel.com/en-us/forums/intel-xdk/topic/685395 <

View solution in original post

Christian_S_10
Beginner
145 Views

Hey paul,

where would it be best to put that CSP code snippet in my index.html file?

PaulF_IntelCorp
Employee
145 Views
Reply