Live build synchronisation loop

Hi,

I’ve been porting my game to Corona for a while now, almost 90% of the way through and it’s been fine. Early on I tested Live Build on Android and it was fine. However, I’ve now reached a point where I need to integrate social (Facebook) which isn’t possible on the simulator, so rely on Live build, as the build deploy cycle is too long for development. Unfortunately, it’s now decided to get stuck in a sync loop. I have modified the build structure a bit since starting, but can’t see any reason why it would suddenly go wrong. I’ve got pretty much everything unnecessary excluded in the build.settings, but nothing seems to work. Every time I do an Android build and push to device with Live Build enabled, it just keeps starting and restarting on the device.

Completely stuck, and so close.

Any advice as to how I can debug what is causing this loop would be most appreciated at this point.

Cheers

Paul Gregory

Look at this doc:  https://docs.coronalabs.com/guide/distribution/liveBuild/index.html

There is a troubleshooting guide at the bottom that might help.  

Rob

Thanks, been through all that, even though it relates to a different problem. The suggestion there is that the troubleshooting steps are for if the Live Build  doesn’t sync/refresh, I have the opposite problem, it won’t stop syncing :slight_smile:

What I need is some logging that tells me what is causing the system to think it needs to synchronise, that might help me to identify what is causing it.

Paul

I would consider still trying to remove the .CoronaLiveBuild file and see if it helps.

If that doesn’t help, I’ll get an engineer to look into this.

Rob

Tried it. I uninstalled from the Android device, deleted the .CoronaLiveBuild file, closed down Corona Simulator and Corona Live Server, checked the .CoronaLiveBuild file was still deleted, then restarted and rebuilt. Exactly the same sync loop I’m afraid.

Cheers

Paul

Are you developing on windows or on mac? Does logcat say something? If you have a lot of messages going on, you can grep by “LiveBuild”

I’m on Mac, High Sierra. It did work for a while, in fact, I think if I go back to a previous version of this project it still works, but the latest codebase integrated into the other platforms, doesn’t. I did a logcat grepping for LiveBuild and it only shows one message, 

01-27 16:52:43.655 18509 19401 I LiveBuild: Discovered server 192.168.0.10:20604

If I do a logcat grepping for Corona, I get the attached stream. There is a line in there with text “Corona : Availability: true” which is what I output when successfully connecting to GameSparks. It sits there for a short while, 3-5 seconds, and then restarts, and the whole sequence repeats.

I have been having the same problem on my machine since about around the last public release. I figured it was my router. On a mac using Sierra. Any android device will continue to loop over and over again. It use to work perfectly fine at one point.

Any changes to the core files will restart a live build so if you are doing anything to change anything in your core files you will get stuck in an endless loop.

Try rolling back to an earlier version of Corona and see if that helps - daily builds are not always stable builds!

Also, I’ve found “issues” can be solved by creating a proper build and installing to device and then returning to live builds.

Not sure about others who were experiencing this, but for me, I certainly wasn’t changing anything, nor was I using a daily build, just the current stable one, as far as I know. It was just constantly refreshing, over and over again, I wasn’t touching anything, let along changing anything. The problem is, because there appears to be no logging or information output, it’s next to impossible to actually determine what is causing the refresh. I would suggest adding some informational or logging output to the live build server to help analyse things like this, and other sync issues that might arise. This is a very powerful capability, but it loses it’s value if it’s unreliable and difficult or impossible to identify and solve problems with it.

Paul

Probably a good idea to print out why sync is initiated. I’ll take a look in it. Thanks.

Hey, guys. If you’ll try to rebuild (and re-deploy!) your android LiveBuilt apps, they should now log why it resyncing. You can do

adb logcat | grep " LiveBuild:"

To filter out everything else. Cheers!

Good job vlad :slight_smile:

Thanks for this, I’ll try to take a look and see if that additional information gives any clue as to why this was happening for me, in the hope that it might help anyone else experiencing the same problem. Unfortunately, the resolution comes a little too late for this particular project, I’ve since ported to Godot and am ready to launch, but perhaps it will be of use in a future project.

@vlad: What version has this extra logging. Here is what I see so far (notice how fast it is cycling):

02-05 13:11:20.712: V/Corona(3618): Loading via reflection: plugin.liveBuild.LuaLoader 02-05 13:11:22.362: V/Corona(3618): \> Class.forName: plugin.liveBuild.LuaLoader 02-05 13:11:22.362: V/Corona(3618): \< Class.forName: plugin.liveBuild.LuaLoader 02-05 13:11:22.362: V/Corona(3618): Loading via reflection: plugin.liveBuild.LuaLoader 02-05 13:11:23.992: V/Corona(3618): \> Class.forName: plugin.liveBuild.LuaLoader 02-05 13:11:23.992: V/Corona(3618): \< Class.forName: plugin.liveBuild.LuaLoader 02-05 13:11:23.992: V/Corona(3618): Loading via reflection: plugin.liveBuild.LuaLoader 02-05 13:11:25.472: V/Corona(3618): \> Class.forName: plugin.liveBuild.LuaLoader 02-05 13:11:25.482: V/Corona(3618): \< Class.forName: plugin.liveBuild.LuaLoader 02-05 13:11:25.482: V/Corona(3618): Loading via reflection: plugin.liveBuild.LuaLoader

Got more info this time:

java.lang.NullPoin Feb 05 03:28:19.965 terException: Attempt to read from field 'int android.graphics.Point.y' on a null object reference K88: at plugin.admob.LuaLoader$Load$1.run(LuaLoader.java:890) K88: at android.os.Handler.handleCallback(Handler.java:751) K88: at android.os.Handler.dispatchMessage(Handler.java:95) K88: at android.os.Looper.loop(Looper.java:163) K88: at android.app.ActivityThread.main(ActivityThread.java:6228) K88: at java.lang.reflect.Method.invoke(Native Method) K88: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) K88: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) K88: Skipping crash dialog of ProcessRecord{1265ceb 11363:com.cabagomez.bletchley/u0a69}: background Feb 05 03:28:20.083 K88: Scheduling restart of crashed service com.cabagomez.bletchley/plugin.liveBuild.LauncherService in 18876ms K88: Scheduling restart of crashed service com.cabagomez.bletchley/shared.google.play.services.base.PackageStateChangedService in 28876ms Feb 05 03:28:28.967 K88: Scheduling restart of crashed service com.zte.backup.mmi/com.zte.backup.service.RestoreAppService in 29993ms Feb 05 03:28:38.961 K88: Scheduling r Feb 05 03:28:38.962 estart of crashed service com.cabagomez.bletchley/plugin.liveBuild.LauncherService in 29998ms Feb 05 03:28:48.970 K88: Scheduling restart of crashed service com.cabagomez.bletchley/shared.google.play.services.base.PackageStateChangedService in 29990ms

It seems that admob plugin doesn’t play well with Live Builds. We should definitely look at it. Thanks!

Not sure it is admob that error might be caused by it launching over and over so fast. I removed the admob plugin and I still have the same issue. Will continue testing and let you know what I find.

Ok. 100 sure it was GameSpark plugin for me. I went back to the file version of the plugin and it works great (fairly old, but works for me). Not sure what was introduced with the Marketplace version but it doesn’t work with LiveBuild.

The standalone version of Gamespark I am using is: VERSION = “0.9.2”,

Look at this doc:  https://docs.coronalabs.com/guide/distribution/liveBuild/index.html

There is a troubleshooting guide at the bottom that might help.  

Rob