Build Error #1 - Plugins

Trying to build using 2020.3601 and I keep getting this error above. Details in the console is below. Funny thing is any plugin added to build.settings throws this error, as well as compiling an app without any plugins included as well!

Any ideas?

Error while fetching plugins: 

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\john\AppData\Local\Temp\Corona Labs\CLtmpa03664\template\app\build.gradle.kts' line: 516

* What went wrong:
Error while fetching plugins: 

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

What windows are you using?

Win 10 Pro latest updates (Version 2004)
Solar2D 2020.3601

I cant even compile a test app without any pluginsā€¦ still gives a ā€œError while fetching pluginsā€ message.

Try enabling verbose output

reg ADD "HKEY_CURRENT_USER\Software\Ansca Corona\Corona Simulator\Preferences" /f /v debugBuildProcess /d 5

It will produce more verbose logā€¦

Well, I get a lot more log entries, but still the same problem with no additional information.

Error while fetching plugins: 

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\john\AppData\Local\Temp\Corona Labs\CLtmpa03664\template\app\build.gradle.kts' line: 516

* What went wrong:
Error while fetching plugins:

As I mentioned before, I even created a new test app with NO plugins, and I am still getting this error.

Anyone have any ideas?

After uninstalling/reinstalling, looking through these logs, etc., I just dont know where else to troubleshoot.

I created a test app, with no plugins, and I still get a ā€œError fetching pluginsā€ message when I try to build for Android on my Win machine.

Is anyone have this issue?

I canā€™t compile an Android app at all. I tried it on my PC and Mac with various success.

  • "Error fetching pluginsā€ on a new, empty application.
  • Different plugins missing when building on PC vs. Mac

Getting ready to just throw in the towel, but I need to get 64 versions of my games out there by end of month.

I have similar, if not, exact problem when building for Android, using just debug key, and without any plugin in build.settings. It gives ā€œBuild Error #1ā€.

  • Where:
  • Build file ā€˜C:\Users\me\AppData\Local\Temp\Corona Labs\CLtmpa03076\template\app\build.gradle.ktsā€™ line: 516

Building to window ā€œexeā€ and html" are okay.

I am using Solar2D 2020.3601 Simulator on Windows 10 Home.

Lines (514 to 517) on ā€œbuild.gradle.ktsā€, I found, were,

   if (execResult.exitValue != 0) {
        logger.error("Error while fetching plugins: $builderOutput")
        throw InvalidPluginException("Error while fetching plugins: $builderOutput")
    }

Lines (508 to 513) are,

  val execResult = exec {
        commandLine(coronaBuilder, "plugins", "download", "--android-offline-plugins", "builderInput=${builderInput.absolutePath}")
        standardOutput = builderOutput
        errorOutput = builderOutput
        isIgnoreExitValue = true
    }

It seems to be related to ā€œpluginsā€. However, I was not using any plugins and there is no ā€œpluginsā€ section in the ā€œbuild.settingsā€, in a very simple test program.

PS. I have just managed to successfully install Solar2D today. I have always been using the legacy Corona.

@luantiang This is the exact problem I am having.

On PC, I get a Build Error 1, with the same plugin error, even if I am not using any plugins. Running in the simulator is fine.

On Mac, it seems to compile into an APK, but when I load it to a device and use adb logcat, there are a ton of errors and crashes due to plugins missing.

Using 2020.2601 (and also tried 2020.3600). Funny thing is that this was working when I last tried it 2 weeks ago.

Today, I am trying again on my PC and I cannot even run the app in the simulatorā€¦ I get errors for missing pluginsā€¦ even when I copy the plugin directly into my appā€™s folder.

@vlads Any ideas?

Hello @schizoid2k.

2020.3601 is my first Solar2D. I have always been using the legacy Corona, till yesterday. I am not sure about earlier releases of Solar2D. Sorry, I only have MS Windows 10 Home Edition PC, and no Apple Mac.

I have ā€œgone-backā€ to try a a basic ā€œHello Worldā€ app which I have used in the past. It does not use any plugins. In fact, there is no ā€œconfig.luaā€ nor ā€œbuild.settingsā€. It does not use any assets nor any module nor any ā€œrequireā€. In fact, it is just one ā€œmain.luaā€ file, with newText() and newLine().

It runs well in Solar2D simulator. It builds to and runs as Windows ā€œexeā€ well. It builds to and runs on Web browser ā€œhtmlā€ well. But it fails to build to Android, with following error on simulator,

  • ERROR: Could not create build.properties:
  • Failed to access the ā€œbuild.settingsā€ file.
  • Android build failed (1) after 0 seconds.

This error ā€œ#1ā€ may or may not be related to the above ā€œ#1ā€ error. But if my memories served me right, this ā€œHello Worldā€ is one of those app that I ran, without problem, on many of the earlier legacy Corona releases.

I am not sure if it helps you or @vlads. Just sharing what I have observed so far.

I have un-installed 2020.3601 and installed 2020.3600 release version. Tried it with the same basic ā€œHello Worldā€ app, with only ā€œmain.luaā€ and ā€œbuild.settingsā€ files. No plugin and no ā€œrequireā€, with debug keystore. It gives the same results as below,

  1. Simulator run okay.
  2. Windows build ā€œexeā€ run okay.
  3. Web build ā€œhtmlā€ run okay.
  4. Android build failed with messages below,
  • FAILURE: Build failed with an exception.
  • Build file ā€˜C:\Users\me\AppData\Local\Temp\Corona Labs\CLtmpa17280\template\app\build.gradle.ktsā€™ line: 516
  • What went wrong: Error while fetching plugins:
  • Android build failed (1) after 8 seconds

My PC is Windows 10 Home Edition. Java version is ā€œ1.8.0_161ā€. Gradle version is ā€œ5.4.1ā€.

@vlads Please help to advise. Thanks!

I am running a different version of Java:

C:\java - version 

java version "11.0.7" 2020-04-14 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.7+8-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.7+8-LTS, mixed mode)

Last time I updated, I downloaded ā€˜jdk-11.0.7_windows-x64_bin.exeā€™ and installed it.

Looks like the current version is 11.0.8
https://www.oracle.com/java/technologies/javase-jdk11-downloads.html

I was hopeful for a momentā€¦ but I still has a sad :cry:

I am having the same problem as @luantiangā€¦ in fact I started this thread 2 weeks ago. Previously, everything was working, but for 2 weeks now, I get ā€œBuild Error #1 - Error while fetching pluginsā€ when trying to build an Android app.

What I have tried, all to no avail:

On my PC, using 2020.3601, and then downgrading to 2020.3600:

  • Building a test app with no plugins, and I get the same ā€œBuild Error #1 - Error fetching pluginsā€ message.
  • Building existing apps (with pluginsā€¦ confirmed that all plugins are on the Free Plugin Directory, including my own authored ā€œGBCā€ plugins which I cannot seem to use anymore), I get simulator errors on some plugins. For some other plugins, I do not get simulator errors, but when I try to build, I get an error that the plugin does not exist.
  • According to this page, I am supposed to install jdk-8u251-windows-i586.exe. I just tried @roaminggamerā€™s suggestion and installed jdk-11.0.7_windows-x64_bin.exe ā€“ same results

Then I moved to my Mac, and tried this with both 2020.3601 and 2020.3600:

  • I never get an error about missing plugins on the Simulator, but when I build an Android app, it appears to build successfully, but when I run it on my device (and use adb logcat), I see ā€œmissing pluginsā€ errors in the adb log and the app crashes or freezes.

3rd Try:

  • I then tried building a Android app on a ā€œnewā€ Win10 PCā€¦ wiped the drive, installed Win10 and all updates, Solar2D, Java, and I get a ā€œBuild Error #1ā€ error about plugins, whether I use plugins or not.

I have to say, 2 weeks of this is getting beyond frustrating. I have no idea what to try next. Any help appreciated.

ā€“john

I still use your plugins so here are a couple of options (on a Mac):

  1. Make sure that your plugin is visible here (this folder called Solar2dPlugins is in my home directory):

Screen Shot 2020-07-15 at 10.43.04 PM

  1. If you get the simulator error make sure you have at least the lua stub here:

  1. And you probably know you can also just drop your plugin in the project folder inside the plugin folder. Just grab it from option 1 above:

Screen Shot 2020-07-15 at 10.56.56 PM

This is the version of java that I am using:

APhone:ISAmazon adriangomez$ java -version

openjdk version ā€œ1.8.0_242ā€

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)

OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

This is very unfortunate. Letā€™s try some things out.
Can you try running CoronaBuilder.exe from the Native/corona/win/bin

1 Like

I have found the step that makes the Android build works for me (for the first time since I moved from the legacy Corona to Solar2D on 25 June 2020).

  • Copy ā€œlua.dllā€ into the folder, ā€œSolar2D/Native/Corona/win/binā€.

Tested the build ā€œapkā€ on an actual Android device, for both my ā€œHello Worldā€ and ā€œSampleā€ apps. Works okay.

I am not sure if this is a solution. I am not sure if there should be a ā€œlua.dllā€ in this folder, but it works for me. This may be related to my problem encountered with the anti-virus software. McAfee ā€œfalse alarmsā€ and ā€œauto virus removeā€ may have to do with it.

This is the thread on the McAfee ā€œfalse alarmsā€,
https://forums.solar2d.com/t/solar2d-windows-install-binaries-flagged-by-anti-virus/351693

I have configured ā€œDo Not Scan Theseā€ on McAfee for all the ā€œlua.dllā€ that I have on the PCs.

@schizoid2k Not sure if this step will work for you. You may want to check it out and give it a try if your ā€œlua.dllā€ is missing there as well.

@roaminggamer Thanks for suggestion. I have both Java ā€œ1.8.0_161ā€ and latest Java ā€œ14.0.2ā€. But Solar2D only picks up the ā€œ1.8.0_161ā€ for its use (as seen on the simulator console). Maybe this has to do with that ā€œ1.8.0_161ā€ is 32-bit and the ā€œ14.0.2ā€ is 64-bit.

@agramonte I was not aware that there was an OpenJDK distribution out there. Thanks.

@vlads Many thanks. Your most recent advice guided me to to put the ā€œlua.dllā€ in there.

Thank you everyone for your time!

I am making a bit of progressā€¦ but still have some issues.

@luantiang I did copy lua.dll to win/bin, and I can now compile an Android app that has no plugins!

@vlad The resulting error messages when I run CoronaBuilder.exe. It appears it is looking for the old Corona Marketplace. I am not sure why.

ERROR: plugin could not be validated: plugin.gpgs.v2 (com.coronalabs)
ERROR: Activate plugin at: https://marketplace.coronalabs.com/plugin/com.coronalabs/plugin.gpgs.v2
ERROR: plugin could not be validated: plugin.google.iap.v3 (com.coronalabs)
ERROR: Activate plugin at: https://marketplace.coronalabs.com/plugin/com.coronalabs/plugin.google.iap.v3
ERROR: plugin could not be validated: plugin.GBCDataCabinet (com.gamesbycandlelight)
ERROR: Activate plugin at: https://marketplace.coronalabs.com/plugin/com.gamesbycandlelight/plugin.GBCDataCabinet
ERROR: plugin could not be validated: plugin.flurry.analytics (com.coronalabs)
ERROR: Activate plugin at: https://marketplace.coronalabs.com/plugin/com.coronalabs/plugin.flurry.analytics
ERROR: plugin could not be validated: plugin.iap_badger (uk.co.happymongoose)
ERROR: Activate plugin at: https://marketplace.coronalabs.com/plugin/uk.co.happymongoose/plugin.iap_badger
ERROR: plugin could not be validated: plugin.admob (com.coronalabs)
ERROR: Activate plugin at: https://marketplace.coronalabs.com/plugin/com.coronalabs/plugin.admob
ERROR: exiting due to plugins above not being activated.

Hello,

my two cents on this issue (had a similar experience, no plugins, Simulator 2020.3601 (2020.6.25)):

When I run the corona simulator from ZeroBrane IDE I can test my app in the simulator but I get an error when building an android apk [Build Error #1]
When I open the Corona Simulator directly (as normal windows app) --> open the project in the simulator and then build an apk --> the build process is successful.

For me this works fine, I only have to remember that fact, as I am not building apks that often ;-))

ERRORS Building apks with Simulator started from ZeroBrane

[Build Error #1]
ā€¦
FAILURE: Build failed with an exception.

  • Where:
    Build file ā€˜C:\Users\mk\AppData\Local\Temp\Corona Labs\CLtmpa09720\template\app\build.gradle.ktsā€™ line: 516

  • What went wrong:
    Error while fetching plugins:

ERRORS Building apks with Simulator started from ZeroBrane

WINDOWS:
Version 1903 (Build 18362.900)

ZeroBrane Studio(1.90; mobBebug 0.706)

java -version
openjdk version ā€œ13.0.2ā€ 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 13.0.2+8)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 13.0.2+8, mixed mode, sharing)

-mike

@schizoid2k How do you test your ā€œcoronaBuilder.exeā€? Do you test it against a standard ā€œbuild.settingsā€ or a ā€œbuilder input jsonā€?

I tried with the standard ā€œbuild.settingsā€ file. First, it seems to hang. Second, I got the following error. Below is one failure instance,

ERROR: plugin could not be validated: CoronaProvider.native.popup.social (com.coronalabs)
ERROR: Activate plugin at: https://marketplace.coronalabs.com/plugin/com.coronalabs/CoronaProvider.native.popup.social
ERROR: exiting due to plugins above not being activated.

While I am not sure if my experimental method below is the right way to run ā€œcoronaBuilder.exeā€ (would need @vlads to confirm). I am just using trial-and-error method to figure things out. It is a custom-built-for-testing ā€œbuilder input jsonā€ file. I tried three plugins in this json file.

  • Bytemap from Xibalba Studios
  • GBCDataCabinet
  • Social popup native

I checked the before-and-after state of the ā€œSolar2dPlugins/Caches/ā€¦ā€ to confirm if all the relevant plugins got downloaded, and copied to the right folders. It seem to works.

I also confirmed it with an app which has a ā€œBytemapā€ plugin from ā€œcom.xibalbastudiosā€. It was simulator built to an Android ā€œapkā€ successfully. The ā€œapkā€ was installed on an actual Android device, and it runs well.

Please let me know if you would like to try the experimental method, as above. Thank you.

@luantiang,

It was a bit of trial and error as wellā€¦ I ran CoronaBuilder.exe (after copying lua.dll into the folderā€¦ thanks for that suggestion!) without arguments to see what the expected syntax is. I then ran it on an existing project:

CoronaBuilder.exe plugins download android <full path to my project)\build.settings

I tried it again this morning and got the same list of errors as aboveā€¦ it looks like it is trying (and failing) to connect to the old corona marketplace. I am also not 100% sure if the swytax is correct, but reading the help that is displayed, it looks like the ā€œdownloadā€ argument should pull down the plugins defined in the build.settings fileā€¦ which is not happening.

I guess we will have to wait for @vlad to respond. I also see a new version was released yesterday, and I may give that a try.