Authorizing plugins Error while fetching plugin

windows 10 solar2D 2021.3655.

I tried all previous solution on this forum with no success.

Authorizing plugins
10:20:27.840 Error while fetching plugins:
10:20:27.840
10:20:27.840 FAILURE: Build failed with an exception.
10:20:27.840
10:20:27.840 * Where:
10:20:27.840 Build file ‘C:\Users\Richarles\AppData\Local\Temp\Corona Labs\CLtmpa09856\template\app\build.gradle.kts’ line: 554
10:20:27.840
10:20:27.840 * What went wrong:
10:20:27.840 Error while fetching plugins:
10:20:27.840
10:20:27.840 * Try:
10:20:27.840 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.
10:20:27.840
10:20:27.840 * Get more help at https://help.gradle.org
10:20:27.840
10:20:27.840 BUILD FAILED in 7s
10:20:27.840 Picked up JAVA_TOOL_OPTIONS: -Duser.language=en
10:20:28.130 Android build failed (1) after 12 seconds

can you help me please ???
I tested all releases versions of solar2D with a brand new computer. I get the same error.
what does that means ???

Look like a android plugin is no downloading properly

Can you post build.settings


– For more information on build.settings, see the Project Build Settings guide at:
https://docs.coronalabs.com/guide/distribution/buildSettings

settings =
{
orientation =
{
– Supported values for orientation:
– portrait, portraitUpsideDown, landscapeLeft, landscapeRight

             default = "portrait",
         supported = { "portrait", },

},

--
-- Android section
--
android =
{
	usesPermissions =
	{
		"android.permission.INTERNET",
	},
},

--
-- iOS section
--
iphone =
{
	plist =
	{
		UIStatusBarHidden = false,
		UILaunchStoryboardName = "LaunchScreen",
		CFBundleIconFiles =
		{
			"Icon-40.png",
			"Icon-58.png",
			"Icon-76.png",
			"Icon-80.png",
			"Icon-87.png",
			"Icon-120.png",
			"Icon-152.png",
			"Icon-167.png",
			"Icon-180.png",
		},
	},
},

--
-- Plugins section
--
plugins =
{

},

--
-- Project section
--
excludeFiles =
{
	-- Exclude unnecessary files for each platform
	ios = { "Icon.png", "Icon-*dpi.png", },
	android = { "Icon.png", "Icon-??.png", "Icon-???.png", "LaunchScreen.storyboardc", },
},

}

1 Like

it’s looks like a Solar2D simulator bug. I got the same error while building a sample corona’s project.
I thank something is wrong while solar2D working with gradle.
I try with several computer I got the same error.
I see also the build file : build.gradle.kts is deleted automatically by itself when the build become fail. I do a copy of all converted files of my project during the process.
let me show you the content of the lines of file that generated the error. build.gradle.kts (40.6 KB)

// Download plugins
logger.lifecycle("Authorizing plugins")
if (reDownloadPlugins) {

    delete(coronaPlugins)
    file(coronaPlugins).mkdirs()

    val buildDataStr = coronaBuildData?.let { file(it).readText() } ?: run {
        val fakeBuildData = (parsedBuildProperties.obj("buildSettings") ?: JsonObject())
        fakeBuildData["targetAppStore"] = coronaTargetStore
        fakeBuildData["dailyBuildYear"] = dailyBuildYear
        fakeBuildData["dailyBuildRevision"] = dailyBuildRevision
        fakeBuildData["appName"] = coronaAppFileName ?: "Corona App"
        fakeBuildData.toJsonString()
    }
    val buildParams = JsonObject(mapOf(
            "appName" to coronaAppFileName,
            "appPackage" to coronaAppPackage,
            "build" to dailyBuildRevision,
            "buildData" to buildDataStr,
            "modernPlatform" to "android",
            "platform" to "android",
            "pluginPlatform" to androidDestPluginPlatform,
            "destinationDirectory" to coronaPlugins.absolutePath
    )).toJsonString()
    val builderInput = file("$buildDir/tmp/builderInput.json")
    builderInput.parentFile.mkdirs()
    builderInput.writeText(buildParams)
    val builderOutput = ByteArrayOutputStream()
    val execResult = exec {
        commandLine(coronaBuilder, "plugins", "download", "--android-offline-plugins", "builderInput=${builderInput.absolutePath}")
        standardOutput = builderOutput
        errorOutput = builderOutput
        isIgnoreExitValue = true
    }
    if (execResult.exitValue != 0) {
        logger.error("Error while fetching plugins: $builderOutput")
        throw InvalidPluginException("Error while fetching plugins: $builderOutput")
    }
    if((System.getenv("DEBUG_BUILD_PROCESS")?.toIntOrNull() ?: 0) > 0 ) {
        logger.lifecycle("Plugins collector output: $builderOutput")
    }
    logger.lifecycle("Unpacking plugins")
    fileTree(coronaPlugins) {
        include("*/data.tgz")
    }.forEach { data ->
        copy {
            from(tarTree(resources.gzip(data)))
            into(data.parent)
        }
        data.delete()
    }
}
processPluginGradleScripts()

Can you post a basic a sample project of this issue? I need to be able to reproduce this on my computer to be able to help you.

test.zip (85.6 KB) attached is the test project.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.