Can't build, different daily builds give different errors

Hi folks.

Can no longer build Android on Windows.  Have tried daily builds 3306, 3305, 3304, and several other builds.  Have tried Java 6, 7, and 8.  Followed Corona instructions to the T.

Building to my desktop tells me “BUILD SUCCESSFUL” and results in the expansion file being created, but the main APK file shows up as a 0 byte file without an extension.  Trying to build game “FMC: Classic Muscle 2 LITE” results in expansion file “main.48.com.firerabbit.games.fmc.junk.lite.obb” and main file “FMC” (strange name, no extension, bytes).

Building to D: tells me “BUILD ERROR #1” and results in no files being created.  In the console I see this that looks off:

19:51:33.650  WebServices: download request: http://builds.coronalabs.com/5b0de72163b70-built.zip?AWSAccessKeyId=AKIAIMSD7JG23DSGPRIA&Expires=1527637923&Signature=mTiHlMTdELnOC6LSJOugczbZHrA%3D

19:51:33.650  WebServices:          to file: C:\Users\ender\AppData\Local\Temp\Corona Labs\CLtmpa07232\output.zip

19:51:34.085  WebServices: downloading 10032928 bytes

19:51:38.795  WebServices: Download of 10032928 bytes complete in 5 seconds (1.91MB/s)

19:51:38.795  Build: running: “C:\Program Files (x86)\Java\jdk1.8.0_171\bin\java.exe” -Djava.class.path=“C:\Program Files (x86)\Corona Labs\Corona\Resources/ant.jar;C:\Program Files (x86)\Corona Labs\Corona\Resources/ant-launcher.jar” org.apache.tools.ant.launch.Launcher -v -DTEMP_DIR=“C:\Users\ender\AppData\Local\Temp\Corona Labs\CLtmpa07232” -DSRC_DIR=“D:\Dropbox\fmc.junk\sourcefiles” -DDST_DIR=“D:” -DUSER_APP_NAME=“FMC_ Classic Muscle 2 LITE” -DBUNDLE_DIR=“C:\Program Files (x86)\Corona Labs\Corona\Resources” -DLIVE_BUILD=NO -DLIVE_BUILD_ASSET_DIR= -DKS=“X:\Dropbox_Personal\Documents_encrypted\Keys\EndersLock.keystore” -DKP=“XXXXXX” -DKA=“enderslock” -DAP=“XXXXXX” -DAV=4.0.3 -DEXPANSION_FILE_NAME=“main.48.com.firerabbit.games.fmc.junk.lite.obb” -f “C:\Program Files (x86)\Corona Labs\Corona\Resources”/build.xml build

19:51:39.077  Apache Ant version 1.8.1 compiled on April 30 2010

19:51:39.077  Trying the default build file: build.xml

19:51:39.077  Buildfile: build.xml does not exist!

19:51:39.077  Build failed

19:51:39.077  Picked up JAVA_TOOL_OPTIONS: -Duser.language=en

19:51:39.397  Android build failed (1) after 109 seconds

19:51:39.397  WebServices: Call: user.logout 

19:51:39.397             params:  {

19:51:39.397      “hash” = “da8009b3996df240618257848dd95eae9eafdde3f283fb0e7bff484f74cda693”

19:51:39.397      “domain_name” = “developer.anscamobile.com

19:51:39.397      “domain_time_stamp” = “1527637899”

19:51:39.397      “nonce” = “zzNoFpuDpg”

19:51:39.397      “sessid” = “44eda001885de83f48a3dda83e3192f7”

19:51:39.397  }

19:51:39.879  WebServices: Response received in 0 seconds: <?xml version=“1.0”?>

19:51:39.879  <methodCall><methodName>user.logout</methodName>

19:51:39.879  <params><param><value><boolean>1</boolean></value></param>

19:51:39.879  </params></methodCall>

I have both the debugWebServices and debugBuildProcess enabled in registry.

Any ideas?  I’ve spent hours on this and can’t get this to work.  Our skyrocketing ANR and crash rates are another issue that I’ve posted and I can’t build anything to even try and fix that now.

Please help :frowning:

Can you build any of the sample apps or is it just your app that is the problem?

I’m asking this to give us a starting point.

What kind of a build are you doing?  Simulator or command-line? 

That looks like a simulator build log, but I am still asking.

Great question.  Tried building the Corona Cannon project and have mixed results.

If saving to D:\ I get build failed with build error #1.  Same error in the console.

If saving to desktop it DOES succeed.  The APK was created.  Not sure if it works though but generating the APK is a success.

The type of build is a Production build in Windows for Google Play as the target.  In all examples I used the Production key and not a debug one.  I signed the Corona test project and my own with the same key.

Also note that I’ve tried this on 2 different PCs and both have the same problem: can’t save to anywhere but Desktop, and saving to Desktop only results in the expansion file being created but not the APK.

Cheers,

Chris

Do you have write access to D:?

  1. Do you have a virus scanner or similar program running?  Windows Defender?

  2. What version of Windows are you running?

  3. I suggest building a simpler program as the baseline. 

Corona Cannon is not included with the the simulator last I remember and not what I suggested.  I am trying to help you set a minimum baseline and then to work up (standard debugging strategy).

The goal 

Build “Hello World” from the samples included with the simulator.

  1. You should be able to build and save to any drive in your system as long as you have access to it.  i.e. All drives should be equal.  

  2. Not all folders are equal.  Obviously you should not be able to nor try to build and save to a Windows restricted folder like  “C:\Windows\System32”

I for example have this structure set up (to accommodate my other engine work, past and present work, and using an atypical drive letter):

“X:\Work\00_CurentProjects\Corona”

Sidenote, just in case it assists: I get build error 1 whenever I update to a daily build. I ‘fix’ it by replacing the build.xml with the one in https://forums.coronalabs.com/topic/71138-build-fail-without-error-code/page-2. Something to do with my old keystore.

Have you tried updating your keystore?

Rob

No, I will have to try that.  Is there a guide you wold recommend?  This was never a problem before…

This actually allowed me to build an APK!  Thank you for this link!  For the first time I have been able to create the APK using a daily build.  But what does using this build.xml do?

Using this build.xml it creates the expansion file (as always), creates the 0 byte file, but also creates the APK file.  Strange it would create 3 files instead of 2…

  1. Yes, but it never was a problem before.

  2. Windows 10

  3. I’ll try this.

  4. Yes I agree and it’s never been a problem before.

  5. Yes understood.  Desktop I clearly have rights to.  D: as well.

Yes

To update your keystore, I would look at this thread and the one it links too:  https://forums.coronalabs.com/topic/72872-can%E2%80%99t-build-for-google-with-newer-builds-and-old-signing-certificate/?hl=keytool#entry383018

Rob

Not sure if this is similar to the Simulator/Windows10 build problem I had earlier in April 2018. Here was the thread,

https://forums.coronalabs.com/topic/72535-simulatorwin10-build-android-with-build-error-1/

Hope this helps.

Regards, Luan

Thanks luantiang, this explains the “Build Error #1” when building to the D: drive. 

Thanks, looking into this.

Do you know why builds are failing to create the APK file (but always successfully creates the expansion file) when using the default build.xml that comes with modern daily builds, but works if I use the build.xml that perflubron linked to?  Just by replacing the build.xml file I was able to build successfully and send it to market without issue.  Nothing else changes.

Cheers,

Chris

Hi Rob.  This helped port my key but it doesn’t help.  Even with the new key I am unable to build an APK file, only the expansion files, with the latest Corona Daily Build (this time 3311, but have tried several others).

If I replace the build.xml with the custom one, I can build .apk files again.

Any ideas?  It seemed like Corona ran fine for years and it’s non-stop issues (ANRs, crashes, key issues, build errors, etc) in the last several months :(  

@firerabbit.info, we can’t control what Google does. We can’t control what Oracle (the Java maintainer does). All we can do is adapt to their changes.

Google APK’s get digitally signed with a key/certificate pair, i.e. a keystore. Oracle has changed the default signing method that Java’s “keytool” uses. So unless you want to stay with an old, buggy, insecure and out of date version of Java running on your computer, you have to keep up with modern things. Google knows this and they want APK’s signed with a modern encryption method. We have to adapt to what our upstream vendors require. The modern Corona needs a modern Java with a modern formatted keystore. I’ve never used expansion files, so if you’re using all new stuff and it’s not working I need to get engineering to figure it out. Though looking through one of the build.xml files I saw something about .obb files and something needing uncommented.

As far as the crashes, ANRs and such, you can blame Google for most of these. They changed something in Google Play that required us to update our base Google Play services plugin which meant rebuilding all of our plugins and a lot of other things. It’s not just a matter of dropping in a new library. There were changes involved because Google is moving away from ANT to Gradle based items and it takes a lot of work to keep Android going these days.  Google broke something with OpenAL. They changed something with how apps exited. It’s been a frustrating year because it feels like we can’t work on much new fighting with all of these changes and none of them are easy to find.

If it feels like I’m frustrated by all of this I am and so is the team and we know you’re frustrated by this too because it directly impacts you. Unfortunately there is not a magical fix. We just have to work through all of these issues until we get them done.

Rob

 @Rob, I know you guys are working very hard to solve issues in the daily builds, but I just have to comment on you saying in your post (unfortunately yet again) “…I’ve never used expansion files…”. If i am correct you are also a programmer and work for corona and it’s really strange that you have yet to use one of the most important features of corona, so how can you guys expect developers to use expansion files if you yourself have never even built an app with expansion files? I don’t know who’s job it is in corona to build different samples to make sure corona is working correctly, but as I can see from the forums many of the developers use expansion files and many of them have the same or similar issues when trying to use expansion files after android 6.0.

Thanks Rob.   I know you guys are busy.  Lots of frustration all around this year.  Thanks for always looking into these things for the community. 

Cheers,

Chris

Hi Rob,  I think Corona has done a great job narrowing down and closing some of these problems.  My apps are running much better with 3315 so thanks and a job well done.

Thanks, Greg

Can you build any of the sample apps or is it just your app that is the problem?

I’m asking this to give us a starting point.

What kind of a build are you doing?  Simulator or command-line? 

That looks like a simulator build log, but I am still asking.

Great question.  Tried building the Corona Cannon project and have mixed results.

If saving to D:\ I get build failed with build error #1.  Same error in the console.

If saving to desktop it DOES succeed.  The APK was created.  Not sure if it works though but generating the APK is a success.

The type of build is a Production build in Windows for Google Play as the target.  In all examples I used the Production key and not a debug one.  I signed the Corona test project and my own with the same key.

Also note that I’ve tried this on 2 different PCs and both have the same problem: can’t save to anywhere but Desktop, and saving to Desktop only results in the expansion file being created but not the APK.

Cheers,

Chris