Getting Started app hangs on black screen after launch on gs3 device

I’m having an issue getting a basic Getting Started app running on my galaxy s3 - 4.2 (API18).

I am running CLI version 1.2.6-beta1

ionic start gs3-test tabs
ionic platform add android
ionic run android -c -s

The app builds and deploys to the device, then launches. But the app never fully loads - it is just a black screen (with the OS status bar at the top). There are no errors to the console.

I tried the build on an emulator (Genymotion using their GS3 4.3 box). I unplug the gs3 and rerun:

ionic run android -c -s

The app builds and deploys to the emulator, and it runs the app fine.

I would switch on debugging and run adb logcat while running the app. You might need to pipe that command through grep to filter out log output.

Thanks @eno - good call on logcat via adb. I installed log-color and found a good filter for Cordova entries.

So, am getting this from logcat:

7149             CordovaLog  I  Changing log level to DEBUG(3)
7149             CordovaLog  I  Found start page location: http://192.168.50.1:8100
7149        CordovaActivity  D  CordovaActivity.onCreate()
7149         CordovaWebView  D  CordovaWebView is running on device made by: samsung
7149        CordovaActivity  D  CordovaActivity.init()
7149         CordovaWebView  D  >>> loadUrl(http://192.168.50.1:8100)
7149         CordovaWebView  D  >>> loadUrlNow()
7149             CordovaLog  I  Changing log level to DEBUG(3)
7149             CordovaLog  I  Found start page location: http://192.168.50.1:8100
7149        CordovaActivity  D  Resuming the App
7149        CordovaActivity  D  CB-3064: The errorUrl is null
7149   CordovaWebViewClient  D  onPageStarted(http://192.168.50.1:8100/)
7149        CordovaActivity  D  onMessage(onPageStarted,http://192.168.50.1:8100/)
7149         CordovaWebView  E  CordovaWebView: TIMEOUT ERROR!

No E or W level entries except for the TIMEOUT, which fires a good 10secs after launch, presumably because the app has borked.

I’m not sure about the HTTP requests - shouldn’t these be loading files rather than remote resources?

OK - app started working now, and I have NOOOO idea why !?! I just uninstalled app, and re-ran “ionic run -c -s” and app ran fine. :confused:

Hi,

I just published my app and it seems to not work and Galaxy S 3…
Unfortunately, I don’t have this phone to test :frowning:

Do you have any hint on how to solve this ?

If you want to try : https://play.google.com/store/apps/details?id=com.cookers.assistant.android

I get this output in logcat when running your app on my s3:

 20306   CordovaWebViewClient  D  onPageFinished(file:///android_asset/www/index.html#/intro)
 20306        CordovaActivity  D  onMessage(onPageFinished,file:///android_asset/www/index.html#/intro)

Suspect the extra ‘/’ could an issue.

Or maybe not - I get the same ‘file:///something’ URLs with the app I’m testing, so looks to be normal with Cordova.

Hi,

Thanks for your quick answer.
The protocol file:/// is right, it’s used to get local file (you can open an html file in a browser in your computer, you will get the same).

I’ve got 3 users with galaxy 3s and they have black screen :frowning:
And I don’t know how to solve, or investigate…

FYI, I think Ionic only supports recent versions of Android (I could be wrong but worth checking). If the S3 devices are too old you should update your Android Manifest so that only devices with versions of Android >= Ionic supported version see the app in the Google Play store. (Its also possible that Ionic does this - check your Android manifest file). I havent looked at your app but if its using some specific feature that isn’t on the S3, that might be a problem :slight_smile: You can restrict app distribution in the Google Play developer console.

You could also try setting up a Samsung S3 emulator and test with that (though device-specific stuff may not work since its not a real device). You would need to make an emulator image with the same version of Android and with Samsung’s images (can’t remember if they are available inside the ADT Manager or if you have to download and install images manually from Samsung).

Forgot to mention: there are several services online that allow you to do device-specific testing remotely (Im thinking of services like DeviceAnywhere - there are others). Some of these services charge by the hour so it might be expensive but you might see the problem right away.

Hi thanks for your answer.

Ionic supports Android 4+ and I have some troubles with phones having Android 4.1.2, 4.2.2 and others…
So, it should be compatible :frowning:

I don’t think I use very specific features but even if I am, I think the app would load a bug. Here it does not load at all…
And as I don’t have this device… I can’t test properly :frowning:

I will try Galaxy s3 emulator and, why not, DeviceAnywhere…

I keep you posted !

To conclude a little with my galaxy S problems, they are solved now :slight_smile:
But I’m not really sure what was the problem… :frowning:

I think the CSS background: cover; for images could be the culprit.
Doing minor changes and removing it strangely make my app working on theses devices.

Anyone with a Galaxy S could confirm ?

1 Like

Hi, could you please describe, how you solved the problem?
I’m facing maybe the same problem, but I don’t understand your conclusion.
Thank you very much