Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty screen #6

Open
Er-rchydy opened this issue Sep 27, 2018 · 6 comments
Open

Empty screen #6

Er-rchydy opened this issue Sep 27, 2018 · 6 comments

Comments

@Er-rchydy
Copy link

i followed everything you mentioned, but at the end when i run cordova emulator androind the emulator started but i only got empty white screen.
cordova version: 8.1.0
React version: 16.5.2

@towfiqi
Copy link

towfiqi commented Dec 9, 2018

Same here... with Cordova 7

@gitcalculus
Copy link

Maybe
npm install --save babel-polyfill
and
import 'babel-polyfill';
to index.js will fixed empty screen. make sure import this before import 'react'.
I have got blank white screen too. and i use Android Studio to debug. find some erro log.(what i found is "Set is not defined"). find something like This.

@towfiqi
Copy link

towfiqi commented Dec 17, 2018

Hi, I am here to report that I made a premature comment before. it works fine with Cordova 7, the issue was with my end.

@lMoshe
Copy link

lMoshe commented Jan 7, 2019

Hey @towfiqi, what did you do to make it work? I still get an empty screen.

@WTFlay
Copy link

WTFlay commented Mar 7, 2019

Hello,

The empty screen is about by the line:

<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' data: content:;">

When you run the index.html in a browser, you got some error about the Content-Security-Policy.

@salmanul
Copy link

salmanul commented Sep 9, 2020

add 'unsafe-inline' to default-src,

<!--
        Customize this policy to fit your own app's needs. For more guidance, see:
            https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md#content-security-policy
        Some notes:
            * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
            * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
            * Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
                * Enable inline JS: add 'unsafe-inline' to default-src
        -->

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants