Android build failure (error 256)

Using a MacOS Monterrey 12.6 box, latest version of Solar 2d (3706), also tried 3702 and the one I previously built with (3668), all have the same error after saying the build is successful.

What do I need to do here?

WARNING: issue found in /Users/davemikesell/Devl/Corona/iDash/build-HD-production/build.settings:
WARNING: deprecated key: settings.iphone.plist.CFBundleIconFile (string)
WARNING: deprecated key: settings.iphone.plist.UIAppFonts[] (string)

Copyright (C) 2009-2022 C o r o n a L a b s I n c .
Version: 3.0.0
Build: 2022.3668
Loading project from: ~/Devl/Corona/iDash/build-HD-production
Project sandbox folder: ~/Library/Application Support/Corona Simulator/build-HD-production-70DC9EDFC414DEE2180C0DC461A4D837
Platform: iPhone / x86_64 / 12.6.0 / AMD Radeon Pro 560 OpenGL Engine / 2.1 ATI-4.8.101 / 2022.3668 / en-US | US | en_US | en
Using openjdk version “1.8.0_242-release”
OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
OpenJDK 64-Bit Server VM (build 25.242-b3-6915495, mixed mode)
Testing credentials for ‘/Users/davemikesell/Devl/Corona/idash.keystore’:
jar signed.
Using openjdk version “1.8.0_242-release”
OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
OpenJDK 64-Bit Server VM (build 25.242-b3-6915495, mixed mode)

BUILD SUCCESSFUL
Total time: 1 second
Downloading https://services.gradle.org/distributions/gradle-6.8.3-all.zip

Exception in thread “main” javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
at org.gradle.wrapper.Download.downloadInternal(Download.java:83)
at org.gradle.wrapper.Download.download(Download.java:66)
at org.gradle.wrapper.Install$1.call(Install.java:68)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:450)
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:317)
at sun.security.validator.Validator.validate(Validator.java:262)
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:237)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)
… 20 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:445)
… 26 more
Android build failed (256) after 2 seconds
ERROR: Build Failed: Error code: 256

Is nobody else really seeing this? Can’t believe I’m the only one. What could I be overlooking? Do I need to provide more information?

After throwing a couple of the error messages (sun.security.validator.ValidatorException: PKIX path building failed, etc.) into Google, it looks to me like you’re having a Java problem.

Maybe you need to update your Java version? I’m also on a Mac, but I’m running system 14.2, so what I’ve got is a whole different animal. I think you’re going to have to Google around until you can find something that corresponds to what you have in terms of system, Java version, etc.

Doesn’t Solar2D come with its own version of Java?

True this is, but it still looks like you’re having a Java problem. All your errors are from Sun.

I build for Android all the time, and no one else has chimed in with a “me too”, so it’s seemingly not a wide-spread problem. If I were experiencing this problem, I would uninstall Solar2d, including all Java libraries that aren’t shared by other applications, and do a clean install of the last version that worked for you (3668?). If that works, I’d then install 3695 since that’s the version that targets API 33.

I’m not a Java expert by any stretch of the imagination- I’m just throwing some general problem-solving thoughts out there.

Thanks, I appreciate it – I’ll give those things a try.

Found another forum post on a different board that suggested downloading the gradle zip manually and putting in the right folder under. $HOME/.gradle, which got me past that error, but not out of the woods. Underlying problem appears to be a cert issue, not able download libraries now.

BUILD SUCCESSFUL
Total time: 1 second
Apr 29 20:06:45.439:
FAILURE: Build failed with an exception.

  • What went wrong:
    Could not resolve all files for configuration ‘classpath’.

Could not resolve com.beust:klaxon:5.0.1.
Required by:
unspecified:unspecified:unspecified
Could not resolve com.beust:klaxon:5.0.1.
Could not get resource ‘https://dl.google.com/dl/android/maven2/com/beust/klaxon/5.0.1/klaxon-5.0.1.pom’.
Could not GET ‘https://dl.google.com/dl/android/maven2/com/beust/klaxon/5.0.1/klaxon-5.0.1.pom’.
The server may not support the client’s requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: Build Environment
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Could not resolve com.beust:klaxon:5.0.1.
Could not get resource ‘https://jcenter.bintray.com/com/beust/klaxon/5.0.1/klaxon-5.0.1.pom’.
Could not GET ‘https://jcenter.bintray.com/com/beust/klaxon/5.0.1/klaxon-5.0.1.pom’.
The server may not support the client’s requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: Build Environment
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

This is insanely frustrating. I successfully imported the certs from dl.google.com and jcenter.bintray.com into ./Corona Simulator.app/Contents/jre/jdk/Contents/Home/lib/security/cacerts in my /Applications/Corona folder, still the same errors.

How does this just not work out of the box? Is building from Corona Simulator no longer a valid option?