Deploy Enact framework app

Hi All,

Does anyone use the Enact framework? I followed the instructions on Using ReactJS with VoltBuilder | VoltBuilder to generate an android app.

The app was successfully installed on my phone but it gave me a white screen when I ran it. It runs fine in a browser.

Any pointer would be greatly appreciated.

Thank you!

There’s a note in our Troubleshooting doc which might be a good place to start:

CORS error and white screen on startup

If your app has a white screen on startup, you probably have an error in your code which stops it from running. To see the error, check out Remote Debugging (at the bottom).

The most common reason is Content Security Policy (CSP) errors. Both Android and iOS require apps only access URLs which are known and secure. The CSP sets those rules. Here’s a very simple CSP - put this in your index.html file:

<meta http-equiv="Content-Security-Policy" content="default-src 'self' ">

(You’ll want to make this more restrictive, so that only the files you actually need are authorized)

Errors messages you might see include Cross origin requests are only supported for HTTP and XMLHttpRequest cannot load ... due to access control checks.

You may also need to add lines to your config.xml file:

    <!-- To allow connections to other resources, you must explicitly permit them using `access` tags. -->
    <!-- -->
    <!-- Example:
    <access allow="" />

    <!-- To control which URLs the WebView itself can be navigated to, use the `allow-navigation` tags. -->
    <!-- -->
    <!-- Example:
    <allow-navigation href="*" />

    <!-- To control which URLs the app is allowed to ask the system to open, use the `allow-intent` tags. -->
    <!-- -->
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />

Thank you so much for the pointer! I have Remote Debugging set up and found the cause was some json files not included in the package. Really appreciate all the hard work done by VoltBuilder!