Black screen afters splash with live reload on device


#1

Hey guys,

I have searched around the forums, but couldn’t find anything that described my issue.

Over the past week I have been running ionic serve --device -l to test on my Android L device with live reload. It had always worked pretty much perfectly, however yesterday with, as far as I can tell, the same code base, the app builds, installs and launches to the splash screen, but then switches to a black screen and stops there.

All I can think of is I updated ionic as prompted around a similar time, has anyone else had the same issue?

The app launches just fine with ionic run --device, it is just the live reload flag that causes the issue.

Phone is a LG G3.

Thanks, and awesome work on the framework.


#2

I also have this issue sometimes, though I’ve yet to put my finger on what actually brings it about…

It’s actually quite infuriating, as it seems to begin randomly and end just as randomly…

Like now… Why I am replying to this thread is because the black screen issue began randomly again and so I again went looking for info on how to resolve it… Just as you’ve described, I can run without livereload using this exact codebase without any issues…

I’ve been working in this app all day without so much as the first issue. Out of the blue, I start getting the black screen on the device after saving a few simple CSS changes… I can kill every node.exe instance, I can uninstall and reinstall the app, I can reboot my PC and tablet - all to no avail…

If this time is like the dozens of other times I’ve encountered this, I will come back later tonight or in the morning and things will just be working again… No indication of anything useful in server or console logs… It has really made working in this environment very challenging when dealing with deadlines and scheduled deliverables as I’ve randomly lost hours of development time randomly without warn or reason due to this issue.

Edit: Like now… 30+ mins dead in the water and the moment I click save on this post (on another PC), the black screen is magically replaced with my app’s screens without any intervention from me (other then sending mental deathrays at it).


#3

I feel your pain mate, much the same experience with me, though one computer I dev on seems to not have the issue at all, while another gets it on occasion sometimes, and now it seems permanently. Makes me wonder if there is a node issue perhaps, or something different between the two computer set ups that might be causing it.

If I find the reason, I will post it here of course, let us know also Matt if you have any luck.


#4

I have the exact same problem. Very annnoying.

It seems it started happening after I installed the genymotion emulator and android SDK 19.
Uninstalling both did not fix the problem.

Has anyone got any idea on how to fix this ?


#5

I found how to fix this problem just after posting this :stuck_out_tongue_winking_eye:

When using the livereload option, the IP adress of the virtualbox installed with genymotion was used as the server, instead of my local ip address.

The command ionic address prompted me to choose my local address as the server and it fixed the problem.


#6

Thanks for the tip @matdev, I have tried setting the address before with no success, but now it has me thinking perhaps my vagrant boxes were causing issues somehow seeings the machine that had the issues were running some, where my home machine wasn’t. Will investigate that possibility today and report back.


#7

Mine was caused by me not having my phone on the same WiFi as my dev machine.


#8

Thanks, this made me notice the message:

Note that the emulator/device must be able to access the given IP address

when running ionic run ios --device -l


#9

If Wifi is turned off livereload results in black screen. Turn your Wifi on!