Webview+ BLACK SCREEN OF DEATH Jan 2018 Problem


#1

Can someone please help me with this new black screen of death problem? I use the same framework for all my apps, month after month (all I do is reskin), and everything always works fine - I’ve never seen this black screen before. I’ve never changed the make, export or build configuration of the app, so I have absolutely no clue where this problem came from. Can someone please help?

  • Cocoon Version:
    Latest

  • Basic description of the problem:
    Cocoon build works fine, but when I try to open the apk on my Samsung phone, I get nothing but a black screen. My other app worked just last week, and I’ve changed absolutely nothing in this project regarding the build export and build configuration.

  • Device info:
    Android 4.4.2

  • Steps will reproduce the problem:

  1. Export on Construct 2 with these options in place…
    Fullscreen in browser: Scale inner
    Fullscreen scaling: High Quality
    Use High-DPI display: Yes
    First Layout: Preload
    Use Loader Layout: Yes
    Physics: Box2D asm.js
    Loader Style: Nothing (not recommended)
    Enable WebGL: On

  2. Export with Minify script unchecked.

  3. Delete all xml files, and zip to www.

  4. Upload www zip file to Cocoon with these options in place…
    Cocoon Version: Latest
    Webview engine: Webview+
    minSDKVersion: 16
    targetSDKVersion: default
    Install Location: Internal Only
    Multidex enabled: No

  • Expected result:
    To build as usual and see the app work, as it did in the past.

  • Error log
    There was no log error, because the build works fine. The build’s not the problem. I’m getting the black screen of death afterwards.

  • Used plugins (if relevant):
    Recently I installed a new effect in Construct 2. It was called “outline”. Is it possible that the effect is causing the problem?

  • Framework/game engine (if relevant):
    Construct 2


#2

If you are using “Latest” as cocoon version, you use 2.2.0.
This need a little ajdsutment in the config.xml.

See here.

If you want to use v2.5.4, you’ll need to manually set that Canvas+ plugin version in you project config.xml:

<plugin name="com.ludei.canvasplus.android" spec="2.5.4"/>

The V8 update is a Canvas+ Android only feature.

Regards
Andy


#3

But I want to use Webview+, not Canvas+. Can I not use Webview+ anymore? I’m pretty sure my app only works correctly (runs smoothly) when using Webview+.

I manually changed the Canvas+ spec to 2.5.4 like you said, but it still didn’t work… Still completely black.

This is what my config.xml looks like now…

<?xml version="1.0" encoding="utf-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:cocoon="http://cocoon.io/ns/1.0" xmlns:cdv="http://cordova.apache.org/ns/1.0" id="com.dailyoccultcorrespondences.magicmotherboard" version="1.0.0">
	<name>Occult Correspondences</name>
	<description>
																																																																																									        A sample Cocoon application that responds to the deviceready event.
																																																											    </description>
	<author email="sbstn@live.ca" href="https://cocoon.io">
																																																																																									        Magick Motherboard Productions
																																																											    </author>
	<content src="index.html"/>
	<plugin name="cordova-plugin-whitelist" version="1"/>
	<access origin="*"/>
	<allow-intent href="http://*/*"/>
	<allow-intent href="https://*/*"/>
	<allow-intent href="tel:*"/>
	<allow-intent href="sms:*"/>
	<allow-intent href="mailto:*"/>
	<allow-intent href="geo:*"/>
	<platform name="android">
		<allow-intent href="market:*"/>
		<preference name="enabled" value="true"/>
	</platform>
	<platform name="ios">
		<allow-intent href="itms:*"/>
		<allow-intent href="itms-apps:*"/>
	</platform>
	<preference name="Orientation" value="landscape"/>
	<preference name="Fullscreen" value="true"/>
	<preference name="android-minSdkVersion" value="16"/>
	<plugin name="com.ludei.webviewplus.ios" spec="*"/>
	<plugin name="com.ludei.webviewplus.android" spec="*"/>
</widget>

#4

This of course only applies when you built for Canvas+.
also I’m not aware that WebView+ isn’t supported anymore, so it should basically work.
I haven’t tried WebView+ yet, because I only use Canvas+ for my built. But I’ll check it out once I’m back at home.

Regards
Andy


#5

Thanks. Please, get back to me.


#6

Has no one else been having black screen issues with Cocoon’s Webview+?


#7

Hmm… This makes no sense! This problem came out of nowhere. I’m thinking it’s a problem on Cocoons side. I’m trying to see if anyone else is having this same issue. @Ashley, you haven’t heard of anyone else having this Webview+ black screen problem?


#8

I actually don’t think it’s Cocoon. I just tried Webview+ with another app and it worked fine, so I’m guessing it’s the new Construct 2 effect plugin, I’m using with this app. The effect is called ‘Outline’.

Could someone please help me out, by installing/including the same effect plugin (‘Outline’) in a Construct 2 project, then seeing what happens when you build with Cocoon’s Webview+? If you get the black screen as well, I’ll know it’s the effect, and I’ll stop using it.

Here’s the link to R0J0hound’s ‘Outline’ effect plugin… https://www.scirra.com/forum/effect-outline_t75574


#9

But have you tried to get the log from the chrome debugging tool?


#10

Hi,

not sure if im late to the party on this but i had a similar issue.

When i debugged on ios the cause was because webview could no longer load from file:// system and instead was looking for http:// ? and i was getting a whole bunch of cors errors.

After a little investigation on stack overflow, I fixed the issue by adding the following plugin cocoon-cordova-labs-local-webserver

hope that helps you too.

Andy


#11

Hi,
My build get error after install cocoon-cordova-labs-local-webserver, Do you have any suggestion ?
thanks,


#12

Well, what’s the compilation error?


#13

COMPILER ERROR:

Failed to fetch plugin https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git via git.
Either there is a connection problems, or plugin spec is incorrect:
Error: git: Command failed with exit code 128 Error output:
Cloning into ‘/tmp/git/1517274447579’…
fatal: repository ‘https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git/’ not found

CORDOVA LOG:

(node:2549) DeprecationWarning: ‘root’ is deprecated, use 'global’
e[36m[2018-01-30 01:07:27.431] [DEBUG] AndroidBuilder - e[39m[prepare] cordova restore plugins
e[36m[2018-01-30 01:07:27.434] [DEBUG] AndroidBuilder - e[39m[prepare] adding plugin cocoon-cordova-labs-local-webserver@*
e[36m[2018-01-30 01:07:28.378] [DEBUG] AndroidBuilder - e[39mFailed to fetch plugin https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git via git.
Either there is a connection problems, or plugin spec is incorrect:
Error: git: Command failed with exit code 128 Error output:
Cloning into ‘/tmp/git/1517274447579’…
fatal: repository ‘https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git/’ not found


#14

There is the problem. Try to open the link and you get a 404 error.

https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git

That’s why the builder cannot fetch the plugin.

Regards
Andy


#15

add ‘cordova-plugin-file’ to your installed plugins list!


#16

did doing all that fix your black screen?


#17

No, the black screen still there. Thanks.


#18

Please open a topic in the Problems & Troubleshooting category.
To get the best help, provide a test case (capx file).

Regards
Andy


#19

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.