Can't build app, can't run app on android device


#1

Hi everyone!

I’m back on Ionic, the framework was installed on October 2016 in my notebook, no updates and no dev on ionic to yesterday. I update all dependencies (Java, Ionic, Android SDK)

Ionic works fine on my desktop, but when i try to compile or run in a physical android device i see this error:

$ ionic cordova build android
Running app-scripts build: --iscordovaserve --external-ip-required --nobrowser

[13:19:20]  build dev started ... 
[13:19:20]  clean started ... 
[13:19:20]  clean finished in 3 ms 
[13:19:20]  copy started ... 
[13:19:20]  transpile started ... 
[13:19:24]  transpile finished in 3.63 s 
[13:19:24]  preprocess started ... 
[13:19:24]  deeplinks started ... 
[13:19:24]  deeplinks finished in 16 ms 
[13:19:24]  preprocess finished in 17 ms 
[13:19:24]  webpack started ... 
[13:19:24]  copy finished in 3.91 s 
[13:19:35]  webpack finished in 11.00 s 
[13:19:35]  sass started ... 
[13:19:37]  sass finished in 1.58 s 
[13:19:37]  postprocess started ... 
[13:19:37]  postprocess finished in 5 ms 
[13:19:37]  lint started ... 
[13:19:37]  build dev finished in 16.35 s 
> cordova build android
⠏ Running command [13:19:40]  lint finished in 3.03 s 
✖ Running command - failed!

[ERROR] Cordova encountered an error.
        You may get more insight by running the Cordova command above directly.
        
[ERROR] An error occurred while running cordova build android (exit code 1):
        
        (truncated) ... rustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)
        	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1459)
        	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:213)
        	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:961)
        	at sun.security.ssl.Handshaker.process_record(Handshaker.java:897)
        	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1033)
        	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1342)
        	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1369)
        	... 13 more
        Caused by: java.security.InvalidKeyException: EC parameters error
        	at sun.security.ec.ECParameters.getAlgorithmParameters(ECParameters.java:284)
        	at sun.security.ec.ECPublicKeyImpl.<init>(ECPublicKeyImpl.java:59)
        	at sun.security.pkcs11.P11Key$P11ECPublicKey.getEncodedInternal(P11Key.java:1021)
        	... 28 more
        Caused by: java.security.NoSuchProviderException: no such provider: SunEC
        	at sun.security.jca.GetInstance.getService(GetInstance.java:83)
        	at sun.security.jca.GetInstance.getInstance(GetInstance.java:206)
        	at java.security.Security.getImpl(Security.java:697)
        	at java.security.AlgorithmParameters.getInstance(AlgorithmParameters.java:199)
        	at sun.security.ec.ECParameters.getAlgorithmParameters(ECParameters.java:279)
        	... 30 more
        Error: /home/carlos/Development/dangus/parques-y-senderos/myApp/platforms/android/gradlew: Command failed with exit code 1 Error output:
        Exception in thread "main" javax.net.ssl.SSLException: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error
        	at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
        	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1914)
        	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1872)
        	at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1855)
        	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1376)
        	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1353)
        	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.getInputStream(HttpURLConnection.java:1348)
        	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
        	at org.gradle.wrapper.Download.downloadInternal(Download.java:58)
        	at org.gradle.wrapper.Download.download(Download.java:44)
        	at org.gradle.wrapper.Install$1.call(Install.java:61)
        	at org.gradle.wrapper.Install$1.call(Install.java:48)
        	at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
        	at org.gradle.wrapper.Install.createDist(Install.java:48)
        	at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
        	at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
        Caused by: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error
        	at sun.security.pkcs11.P11Key$P11ECPublicKey.getEncodedInternal(P11Key.java:1024)
        	at sun.security.pkcs11.P11Key.equals(P11Key.java:158)
        	at java.util.ArrayList.indexOf(ArrayList.java:298)
        	at java.util.ArrayList.contains(ArrayList.java:281)
        	at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:239)
        	at sun.security.validator.Validator.validate(Validator.java:260)
        	at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:326)
        	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231)
        	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)
        	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1459)
        	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:213)
        	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:961)
        	at sun.security.ssl.Handshaker.process_record(Handshaker.java:897)
        	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1033)
        	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1342)
        	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1369)
        	... 13 more
        Caused by: java.security.InvalidKeyException: EC parameters error
        	at sun.security.ec.ECParameters.getAlgorithmParameters(ECParameters.java:284)
        	at sun.security.ec.ECPublicKeyImpl.<init>(ECPublicKeyImpl.java:59)
        	at sun.security.pkcs11.P11Key$P11ECPublicKey.getEncodedInternal(P11Key.java:1021)
        	... 28 more
        Caused by: java.security.NoSuchProviderException: no such provider: SunEC
        	at sun.security.jca.GetInstance.getService(GetInstance.java:83)
        	at sun.security.jca.GetInstance.getInstance(GetInstance.java:206)
        	at java.security.Security.getImpl(Security.java:697)
        	at java.security.AlgorithmParameters.getInstance(AlgorithmParameters.java:199)
        	at sun.security.ec.ECParameters.getAlgorithmParameters(ECParameters.java:279)
        	... 30 more

Any suggestions?


#2

Did you also update the package you’re trying to build? Could you plaese output ionic info and your package.json over here?


#3

Looks like a network issue, perhaps a proxy problem. Can you describe the network environment?