question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Need help: white screen on adobe phonegap build

See original GitHub issue

Background:

Hi,

I purchased the apple developer program, and don’t have a Mac. I need to build an app for both android and iphone.

I work in my own docker image with docker-compose (config), and test the code on an android with usb plugged.

The live-reload works. It shows blank screen sometimes, but it’s not annoying. One can simply press return on the phone, the page will reload again.

The build command also works, install the right .apk (~28 MB)

export NODE_ENV=development
phonegap analytics off
phonegap run android -d --device

Issue:

However, when I use the adobe phonegap build to build the app, it build a much smaller .apk (~3.4 MB), and shows a white screen.

test project generated with phonegap run android:

β”œβ”€β”€ AndroidManifest.xml
β”œβ”€β”€ assets
β”‚Β Β  └── www
β”‚Β Β      β”œβ”€β”€ c28e4029ac8795ebc20a.main.js
β”‚Β Β      β”œβ”€β”€ cordova.js
β”‚Β Β      β”œβ”€β”€ cordova-js-src
β”‚Β Β      β”œβ”€β”€ cordova_plugins.js
β”‚Β Β      β”œβ”€β”€ i-f7-ios.png
β”‚Β Β      β”œβ”€β”€ index.html
β”‚Β Β      └── styles.css
β”œβ”€β”€ classes.dex
β”œβ”€β”€ META-INF
β”‚Β Β  β”œβ”€β”€ CERT.RSA
β”‚Β Β  β”œβ”€β”€ CERT.SF
β”‚Β Β  └── MANIFEST.MF
β”œβ”€β”€ res
...
β”‚Β Β  └── xml
β”‚Β Β      └── config.xml
└── resources.arsc

test project generated in phonegap service:

β”œβ”€β”€ AndroidManifest.xml
β”œβ”€β”€ assets
β”‚Β Β  └── www
β”‚Β Β      β”œβ”€β”€ assets
β”‚Β Β      β”œβ”€β”€ cordova.js
β”‚Β Β      β”œβ”€β”€ cordova_plugins.js
β”‚Β Β      β”œβ”€β”€ hooks
β”‚Β Β      β”œβ”€β”€ index.html
β”‚Β Β      β”œβ”€β”€ main.js
β”‚Β Β      β”œβ”€β”€ main.vue
β”‚Β Β      β”œβ”€β”€ package.json
β”‚Β Β      β”œβ”€β”€ phonegap.js
β”‚Β Β      β”œβ”€β”€ routes.js
β”‚Β Β      β”œβ”€β”€ webpack
β”‚Β Β      β”œβ”€β”€ webpack.config.js
β”‚Β Β      └── www
β”œβ”€β”€ classes.dex
β”œβ”€β”€ META-INF
β”‚Β Β  β”œβ”€β”€ CERT.RSA
β”‚Β Β  β”œβ”€β”€ CERT.SF
β”‚Β Β  └── MANIFEST.MF
β”œβ”€β”€ res
...
β”‚Β Β  └── xml
β”‚Β Β      └── config.xml
└── resources.arsc

Questions:

  1. Does it mean that the phonegap build service ignore the hooks?
  2. I don’t have a Mac right now. So I can only build the app on
    • Linux - How?
    • Windows - How?
    • Build services - Any suggestions?

Any other suggestions please?

What I’ve tried

1. folder structure

I thought the issue may be the folder structure. So I make a test project

my project:

β”œβ”€β”€ app
β”‚Β Β  β”œβ”€β”€ config.xml
β”‚Β Β  β”œβ”€β”€ Dockerfile
β”‚Β Β  β”œβ”€β”€ hooks
β”‚Β Β  β”œβ”€β”€ node_modules
β”‚Β Β  β”œβ”€β”€ package.json
β”‚Β Β  β”œβ”€β”€ platforms
β”‚Β Β  β”œβ”€β”€ plugins
β”‚Β Β  β”œβ”€β”€ src
β”‚Β Β  β”œβ”€β”€ webpack
β”‚Β Β  β”œβ”€β”€ webpack.config.js
β”‚Β Β  └── www
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ gradle
β”‚Β Β  └── wrapper
β”œβ”€β”€ gradlew
β”œβ”€β”€ gradlew.bat
└── README.org

test project:

β”œβ”€β”€ config.xml
β”œβ”€β”€ hooks
β”œβ”€β”€ node_modules
β”œβ”€β”€ package.json
β”œβ”€β”€ platforms
β”œβ”€β”€ plugins
β”œβ”€β”€ src
β”œβ”€β”€ webpack
β”œβ”€β”€ webpack.config.js
└── www

the test project resulted an .apk with white screen, and smaller size (141 KB vs 2.1 MB) too.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
caiobioderecommented, Jan 22, 2018

You probably are going to try using the new 2.0.0 version and cordova build πŸ‘

1reaction
centrualcommented, Feb 28, 2017

Hello @luckynum7

You can debug your app with http://geeklearning.io/apache-cordova-and-remote-debugging-on-ios/. It will display network errors (missing files), html structure and javascript errors. This infos can be very helpful for fix the problem.

You don’t need mac for build iphone apps. You can use virtual machine ( you can run mac os image in wmware workstation ). You can develop inside of vm. You can install linux or windows too.

Lastly problem probably about phonegap. If phonegap not working well, you can use cordova too for fast development.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix blank white screen after sign-in | Creative Cloud apps
Find a solution to the issue of a blank white screen appearing when you try to open Creative Cloud application or the Creative...
Read more >
is PhoneGap Developer not working / having issues for you?
Do you have PhoneGap Developer app problems? We have instructions to fix the not working issue, loading problems or the common black screen...
Read more >
PhoneGap Build iOS app has blank white screen after splash ...
In my case using PhoneGap build and Git, I added a javascript file to my app but failed to include and push the...
Read more >
A Warning - The White Screen of Death with ColdFusion ...
So as I was saying - I needed to build an extension - and they prefer web root. So I created a new...
Read more >
Bubble.is and Adobe PhoneGap Build issues - Apple Developer
Has anyone built an app on Bubble.is and experienced issues with the app crashing at launch once the app is uploaded to an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found