Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2581] TiAPI: "appcelerator.https" Example needs updating

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2020-05-05T14:58:07.000+0000
Affected Version/sRelease 9.0.0
Fix Version/sn/a
ComponentsHttps
Labels2020-Q2, example, https, module
ReporterSamir Mohammed
AssigneeAkansha Maheshwari
Created2020-02-10T15:53:32.000+0000
Updated2020-05-05T14:58:07.000+0000

Description

When running the example in appcelerator.https the following error can be seen when Load Wellsfargo is clicked. (Example states request must succeed).
[WARN]  ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@e4eaeac
[WARN]  OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
[WARN]  Gralloc3: mapper 3.x is not supported
[INFO]  I/r.https.exampl: Background concurrent copying GC freed 26031(3082KB) AllocSpace objects, 6(136KB) LOS objects, 49% free, 1923KB/3847KB, paused 4.765ms total 161.204ms
[ERROR] TiHTTPClient: (TiHttpClient-1) [47905,48292] HTTP Error (javax.net.ssl.SSLHandshakeException): Certificate could not be verified with provided public key
[ERROR] TiHTTPClient: javax.net.ssl.SSLHandshakeException: Certificate could not be verified with provided public key
[ERROR] TiHTTPClient: 	at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:231)
[ERROR] TiHTTPClient: 	at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:196)
[ERROR] TiHTTPClient: 	at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:153)
[ERROR] TiHTTPClient: 	at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116)
[ERROR] TiHTTPClient: 	at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186)
[ERROR] TiHTTPClient: 	at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
[ERROR] TiHTTPClient: 	at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
[ERROR] TiHTTPClient: 	at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
[ERROR] TiHTTPClient: 	at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
[ERROR] TiHTTPClient: 	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
[ERROR] TiHTTPClient: 	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:411)
[ERROR] TiHTTPClient: 	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:542)
[ERROR] TiHTTPClient: 	at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:106)
[ERROR] TiHTTPClient: 	at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:30)
[ERROR] TiHTTPClient: 	at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1343)
[ERROR] TiHTTPClient: 	at java.lang.Thread.run(Thread.java:919)
[ERROR] TiHTTPClient: Caused by: java.security.cert.CertificateException: Certificate could not be verified with provided public key
[ERROR] TiHTTPClient: 	at appcelerator.https.PinningTrustManager.checkServerTrusted(PinningTrustManager.java:90)
[ERROR] TiHTTPClient: 	at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:228)
[ERROR] TiHTTPClient: 	at com.android.org.conscrypt.ConscryptFileDescriptorSocket.verifyCertificateChain(ConscryptFileDescriptorSocket.java:407)
[ERROR] TiHTTPClient: 	at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
[ERROR] TiHTTPClient: 	at com.android.org.conscrypt.NativeSsl.doHandshake(NativeSsl.java:387)
[ERROR] TiHTTPClient: 	at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:226)
[ERROR] TiHTTPClient: 	... 15 more
*+Test Steps:+*

Download module from (https://github.com/appcelerator-modules/appcelerator.https/releases/tag/android-4.0.0)

CD into example directory

Run appc run

Click Load Wellsfargo

*Expected result* Request must succeed *Actual result* Above error is shown

Comments

  1. Akansha Maheshwari 2020-04-13

    PR: https://github.com/appcelerator-modules/appcelerator.https/pull/59
  2. Samir Mohammed 2020-05-05

    Closing ticket, verified module change in https://github.com/appcelerator-modules/appcelerator.https/releases/tag/v4.0.0-android.

JSON Source