Black Screen on CocoonJS / Cordova export for IOS

Ideas and discussion about publishing and distributing your games

Post » Mon Feb 23, 2015 7:06 pm

Hi,

I am trying to publish a game through Cordova / CocoonJS for IOS by following those instructions:
https://www.scirra.com/blog/154/evolvin ... rt-options
https://www.scirra.com/tutorials/71/how ... h-phonegap

In CocoonJS I am using Webview-based platforms (not Canvas+ since it is a non-browser wrapper),
so I chose Webview+ or System Webview.

However I always get a black screen after the launch image on my real device (IOS 8) with no error in xcode console whatsoever.

Actually the last lines I see are:

IDTK_LOG_INFO: [IDTK] Invoked in ludei::framework::ServiceRegistry::registerService line 93: Registering service: SplashService, version: jenkins-2.1.1_cocoon_services_Splashes-51-0-gd59ddd4
2015-02-23 19:48:35.846 FSR [823:221723] Ludei CocoonJS: Using WKWebView
IDTK_LOG_INFO: [IDTK] Invoked in void ludei::gui::IOSWebView::loadURL line 119: loadURL: file:///private/var/mobile/Containers/Bundle/Application/43A75F62-16D7-4C27-840F-C4B2E0377FAB/FSR.app/game/index.html
2015-02-23 19:48:39.254 FSR[823:221723] Ludei CocoonJS: Using WKWebView


The only thing I noticed so far is that there is no cordova.js file in the export folder. I know Phonegap creates one automatically (when I try to publish the game via phone gap it works, but the performance is terrible). Could that be the issue?

Have anybody else experienced this?

*** UPDATE: I created a post at Ludei Cocoon Forum as well: http://support.ludei.com/hc/communities/public/questions/201890379-Black-Screen-on-C2-Export-Cordova-IOS-Webview- ***
B
3
Posts: 8
Reputation: 191

Post » Sat Feb 28, 2015 5:40 pm

Update: I also get a black screen in cocoonjs Laucher (no fps are showing) and no error in the javascript error console. However it works fine with HTML export only but as soon as I export it as Cordova it hangs right after the splash screen.

This also happens with Intel xdk by the way.

I removed all plugins that I think could cause the error (iAd, iap, Audio) and all audio files, but still the game doesn't load. I feel a little lost here...

Does anyone know if there is any way to debug this error deeper than using the "default" cocoonJS launcher console?
B
3
Posts: 8
Reputation: 191

Post » Wed Mar 04, 2015 1:17 pm

Hello,

The first thing I noticed after testing the exporter is that our plugin prelude is missing in the exportation (I will try to solve it later). So if you were trying to use the plugin, it won't work.

Apart from that, after exporting, are you just compressing the folder and uploading it to the cloud? If so, that might be the problem. The cloud compiler is expecting a www folder + a config.xml file.

I need to have a further look at this issue, but I hope this can help a little.

In addition:

flymke wrote:Does anyone know if there is any way to debug this error deeper than using the "default" cocoonJS launcher console?


You can try the "adb logcat" command for Android or the device log provided by xcode.

Oh, and one thing more: the cordova.js file is something that cordova will add automatically to your project. Do not worry for that.

Regards.
B
9
S
4
G
4
Posts: 383
Reputation: 3,616

Post » Wed Apr 15, 2015 9:46 am

any update on this?
i've created just a sample construct 2 project with only 2 sprites and no functionality and exported it using Cordova, created a zip file with the exported content, copied the file to my phone and tried to launch the app using the launer

result:
black screen
canvas+ error: JavaScript Exception (Tag: 'script'): ReferenceError: jQuery is not defined at Window.<anonymous>(<anonymous>:2:17)
B
5
Posts: 42
Reputation: 313

Post » Thu Apr 16, 2015 8:28 am

metameta wrote:any update on this?
i've created just a sample construct 2 project with only 2 sprites and no functionality and exported it using Cordova, created a zip file with the exported content, copied the file to my phone and tried to launch the app using the launer

result:
black screen
canvas+ error: JavaScript Exception (Tag: 'script'): ReferenceError: jQuery is not defined at Window.<anonymous>(<anonymous>:2:17)


Hello,

Canvas+ does not support JQuery and Cordova exporter requires it. In addition, Canvas+ is not meant to be used with cordova exporter, please use the deprecated one, because it is working perfectly even if it is deprecated.
Once we publish the new cloud, it will be possible to use cordova exporter for Canvas+. Cordova exporter in the actual cloud only works if you plan to use the CLI, and the CLI is only ready for the Webview+.

Regards
B
9
S
4
G
4
Posts: 383
Reputation: 3,616

Post » Tue Apr 28, 2015 10:33 am

Tried everything but still getting the same old black screen using intelxdk app .....
Image
B
36
S
13
G
1
Posts: 99
Reputation: 3,051

Post » Wed Apr 29, 2015 5:48 am

tried everything still getting the same blackscreen ?
Image
B
36
S
13
G
1
Posts: 99
Reputation: 3,051

Post » Thu Apr 30, 2015 10:03 am

I have the same problem, no Cordova export from Construct 2 works anywhere. I tried webview+ on CocoonJS Launcher, I tried hosting & launching via Firefox and Safari etc... And I tried with multiple projects and samples as well.
I really need a functional export. Anyone solved this yet, please?
Is there a bug with Construct's Cordova export option? Should someone post it into the bugs thread?
B
3
Posts: 1
Reputation: 177

Post » Fri May 01, 2015 2:32 pm

Hi All - Im also getting this - I have used intel XDK and emulator works fine but when loading it onto a device that is not a nexus all i get is the splash "If i have set it" and then a blank screen - this is also the case with phone gab. not sure what is going on but I hope its something so minor "Even used the template games to make sure its not me" am also getting the results for Android via crosswalk
B
4
S
1
Posts: 14
Reputation: 403

Post » Sat May 02, 2015 12:37 am

Hi Dev's,

Have been running through debug and think I may of found an error that could cause this, I am using the latest stable release so no sure if it is fixed in daily builds.

the error I have found is

JavaScript Exception (Line: 2 Tag:'script'): SyntaxError: Unexpected Token '<'

Could you please let us know?

Thanks

Mitch
B
4
S
1
Posts: 14
Reputation: 403

Next

Return to Distribution and Publishing

Who is online

Users browsing this forum: No registered users and 0 guests