{ "id": "138315", "key": "TIMOB-17879", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "6", "description": "", "name": "Hold" }, "resolutiondate": "2014-11-06T17:38:54.000+0000", "created": "2014-10-20T22:36:35.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "look1", "parity", "qe-3.4.1" ], "versions": [ { "id": "16676", "description": "Release 3.4.1", "name": "Release 3.4.1", "archived": false, "released": true, "releaseDate": "2014-11-14" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-24T18:25:35.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h6.Issue Description\r\nToday now that Google released what should be the final builds of Android L we upgraded our Nexus 5 device to it from the Google Page: \r\nhttp://developer.android.com/preview/index.html \r\n\r\nI just loaded this in the iPhone Sim and I got the success alert as expected. I tried it on the Android Phone running 4.2.2 and it also got the success alert. On the Nexus 5 running Android 5.0 I get an error alert with this error in the logs attached.\r\n\r\nh6.Sample code\r\n{code}\r\nvar url = \"https_url\";\r\nvar xhr = Ti.Network.createHTTPClient({\r\n onload: function(e) {\r\n Ti.API.debug(this.responseText);\r\n alert('success');\r\n },\r\n onerror: function(e) {\r\n Ti.API.debug(e.error);\r\n alert('error');\r\n },\r\n timeout:5000 /* in milliseconds */\r\n});\r\nxhr.open(\"GET\", url);\r\nxhr.send(); \r\n{code}\r\n\r\nh6.Logs\r\n{code}\r\n10-20 13:05:18.293: D/Window(27268): Checkpoint: postWindowCreated() \r\n10-20 13:05:18.296: E/TiHttpClient(27268): (TiHttpClient-1) [143,143] HTTP Error (javax.net.ssl.SSLHandshakeException): Connection closed by peer \r\n10-20 13:05:18.296: E/TiHttpClient(27268): javax.net.ssl.SSLHandshakeException: Connection closed by peer \r\n10-20 13:05:18.296: E/TiHttpClient(27268): at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method) \r\n10-20 13:05:18.296: E/TiHttpClient(27268): at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:302) \r\n10-20 13:05:18.296: E/TiHttpClient(27268): at com.android.org.conscrypt.OpenSSLSocketImpl.waitForHandshake(OpenSSLSocketImpl.java:598) \r\n10-20 13:05:18.296: E/TiHttpClient(27268): at com.android.org.conscrypt.OpenSSLSocketImpl.getInputStream(OpenSSLSocketImpl.java:560) \r\n10-20 13:05:18.296: E/TiHttpClient(27268): at org.apache.http.impl.io.SocketInputBuffer.(SocketInputBuffer.java:70) \r\n10-20 13:05:18.296: E/TiHttpClient(27268): at org.apache.http.impl.SocketHttpClientConnection.createSessionInputBuffer(SocketHttpClientConnection.java:83) \r\n10-20 13:05:18.296: E/TiHttpClient(27268): at org.apache.http.impl.conn.DefaultClientConnection.createSessionInputBuffer(DefaultClientConnection.java:170) \r\n10-20 13:05:18.296: E/TiHttpClient(27268): at org.apache.http.impl.SocketHttpClientConnection.bind(SocketHttpClientConnection.java:106) \r\n10-20 13:05:18.296: E/TiHttpClient(27268): at org.apache.http.impl.conn.DefaultClientConnection.openCompleted(DefaultClientConnection.java:129) \r\n10-20 13:05:18.296: E/TiHttpClient(27268): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:172) \r\n10-20 13:05:18.296: E/TiHttpClient(27268): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164) \r\n10-20 13:05:18.296: E/TiHttpClient(27268): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119) \r\n10-20 13:05:18.296: E/TiHttpClient(27268): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360) \r\n10-20 13:05:18.296: E/TiHttpClient(27268): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555) \r\n10-20 13:05:18.296: E/TiHttpClient(27268): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:653) \r\n10-20 13:05:18.296: E/TiHttpClient(27268): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:637) \r\n10-20 13:05:18.296: E/TiHttpClient(27268): at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1328) \r\n10-20 13:05:18.296: E/TiHttpClient(27268): at java.lang.Thread.run(Thread.java:818) \r\n10-20 13:05:18.311: D/TiAPI(27268): Connection closed by peer \r\n{code}\r\n\r\nh6.Tiapp.xml\r\nhttp://docs.appcelerator.com/titanium/3.0/#!/guide/Installing_the_Android_SDK-section-29004851_InstallingtheAndroidSDK-SupportforAndroidWearandAndroidLSDKs", "attachment": [], "flagged": false, "summary": "Android 5.0: javax.net.ssl.SSLHandshakeException: Connection closed by peer", "creator": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 3.4.0.GA, 3.4.1.v20141016180124 and 3.5.0.v20141016172512 \r\nAndroid-18 SDK & Android-21 SDK", "closedSprints": [ { "id": 241, "state": "closed", "name": "2014 Sprint 22 SDK", "startDate": "2014-10-27T22:25:43.407Z", "endDate": "2014-11-08T01:00:00.000Z", "completeDate": "2014-11-10T20:10:00.899Z", "originBoardId": 114 }, { "id": 230, "state": "closed", "name": "2014 Sprint 21 SDK", "startDate": "2014-10-13T22:00:57.270Z", "endDate": "2014-10-25T00:00:00.000Z", "completeDate": "2014-10-27T16:33:06.432Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "328718", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Do we have to use such a vendor-specific URL? I would imagine we could use something more generic.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-20T22:50:31.000+0000", "updated": "2014-10-20T22:50:31.000+0000" }, { "id": "328835", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~egomez] I'm confused:\r\n\r\n# So, using the above code snippet, it fails with the vmdev URL, but succeeds with another HTTPS url like link.opera.com?\r\n# Both URLs load successfully using the Nexus 5 browser\r\n# When you say that \"It's tricky that this only fails on Android-L,\" I would encourage you to use either Android L or Android 5.0. They are the same thing.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-21T16:24:22.000+0000", "updated": "2014-10-21T16:24:22.000+0000" }, { "id": "328836", "author": { "name": "tcrist", "key": "tcrist", "displayName": "Travis Crist", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Ingo,\r\n{quote}\r\nSo, using the above code snippet, it fails with the vmdev URL, but succeeds with another HTTPS url like link.opera.com?\r\n{quote}\r\nYes it fails on the vmdev URL but it succeeds with other HTTPS url's like link.opera.com. I have been trying to find a generic one that fails in the same way but have not been successful. I have our internal support team looking at the server to see if there is an issue with its SSL cert or its configuration I will update this ticket with their results. On the same device running Android 4.4.4 it connects to the vmdev URL successfully but as soon as its upgraded to Android 5.0 then it starts failing. \r\n\r\n{quote}\r\nBoth URLs load successfully using the Nexus 5 browser\r\n{quote}\r\nYes, In the browser on the Nexus 5 running Android 5.0 both urls load successfully.\r\n\r\n{quote}\r\nWhen you say that \"It's tricky that this only fails on Android-L,\" I would encourage you to use either Android L or Android 5.0. They are the same thing.\r\n{quote}\r\nThis only occurs on Android 5.0 sorry for the confusion. ", "updateAuthor": { "name": "tcrist", "key": "tcrist", "displayName": "Travis Crist", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-21T16:37:14.000+0000", "updated": "2014-10-21T16:37:14.000+0000" }, { "id": "328838", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~tcrist] Can you instead try this with a simple native test case? I want to confirm first then it's not an Android bug.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-21T16:40:54.000+0000", "updated": "2014-10-21T16:40:54.000+0000" }, { "id": "328840", "author": { "name": "tcrist", "key": "tcrist", "displayName": "Travis Crist", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ingo,\r\n\r\nI would be happy to try out a simple native test case but I don't have the time to develop one on my own. Can you provide a simple Android test case that I can try out?\r\n\r\nThanks,\r\nTravis", "updateAuthor": { "name": "tcrist", "key": "tcrist", "displayName": "Travis Crist", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-21T16:46:33.000+0000", "updated": "2014-10-21T16:46:33.000+0000" }, { "id": "328899", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am able to reproduce this issue with above sample code and:\r\n\r\nDevice: Nexus 5, Android 5.0\r\nAppcelerator Studio 3.4.0.201409261245\r\nTitanium SDK 3.4.0.GA\r\nCLI 3.4.0\r\nAndroid API 21 (5.0)\r\n", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-10-21T21:34:35.000+0000", "updated": "2014-10-21T21:34:35.000+0000" }, { "id": "328900", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~egomez] is the sample app a Titanium application or a native application?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-21T21:42:12.000+0000", "updated": "2014-10-21T21:42:12.000+0000" }, { "id": "328901", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Native. Attempts to make the Http Request to the URL under test.\r\n", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-10-21T21:45:24.000+0000", "updated": "2014-10-21T21:45:24.000+0000" }, { "id": "328908", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks. So, if it works (natively) in 4.3, but does not work (natively) in 5.0, that would suggest to me an Android bug, no?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-21T21:52:48.000+0000", "updated": "2014-10-21T21:52:48.000+0000" }, { "id": "328914", "author": { "name": "tcrist", "key": "tcrist", "displayName": "Travis Crist", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Ingo, I think that means it could be an Android bug. There is the possibility that Google changed an Android API that you are accessing. On this page http://developer.android.com/preview/index.html they say that the new API's are finalized. \r\n\r\nThe page here http://developer.android.com/sdk/api_diff/21/changes.html has the diff report of the old versus new API's. \r\n\r\nIt does appear that the X509TrustManagerExtensions class had some changes made to it so maybe that new method isUserAddedCertificate needs to be used. http://developer.android.com/sdk/api_diff/21/changes.html\r\n\r\nThere are also some changes to the android.net area. I could be an Android bug but I think that this system image should be very close to the final version to be released on Nov 3rd since it was uploaded by Google last Thursday so even if it is an Android bug we may have to find a workaround depending on what drops on Nov 3rd.", "updateAuthor": { "name": "tcrist", "key": "tcrist", "displayName": "Travis Crist", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-21T22:07:51.000+0000", "updated": "2014-10-21T22:07:51.000+0000" }, { "id": "328921", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~tcrist] and [~egomez] is it possible to get the native application working correctly, and then we can review whatever changes need to be made for the Titanium SDK? If we can't find a workaround for native, I don't know how we can fix it for Titanium.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-21T22:17:48.000+0000", "updated": "2014-10-21T22:17:48.000+0000" }, { "id": "331037", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolving as on-hold until Google responds.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-11-06T17:38:54.000+0000", "updated": "2014-11-06T17:38:54.000+0000" } ], "maxResults": 18, "total": 18, "startAt": 0 } } }