{ "id": "167180", "key": "TIMOB-24594", "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": [ { "id": "20432", "name": "Release 8.0.1", "archived": false, "released": true, "releaseDate": "2019-05-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-03-19T19:57:20.000+0000", "created": "2017-04-19T02:14:35.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "imageView" ], "versions": [ { "id": "19275", "description": "Patch release for 6.0.x regressions or important fixes", "name": "Release 6.0.3", "archived": false, "released": true, "releaseDate": "2017-03-22" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-03-19T19:57:20.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Summary:*\r\nImages loaded via HTTPS from a server that uses a TLS 1.1 or TLS 1.2 certificate will fail to load on an Android OS version older than 5.0.\r\n\r\n*Steps to reproduce:*\r\n# Copy and paste the below code to a Titanium project.\r\n# Run it on an Android 4.x device.\r\n# Result: Notice that the image fails to load.\r\n# Run it on an Android 5.x or newer device.\r\n# Result: Image is successfully loaded and displayed.\r\n\r\n{code:javascript}\r\nvar imageFilePath = \"https://eoimages.gsfc.nasa.gov/images/imagerecords/73000/73751/world.topo.bathy.200407.3x21600x21600.B2.jpg\";\r\nvar window = Titanium.UI.createWindow();\r\nvar imageView = Ti.UI.createImageView(\r\n{\r\n\timage: imageFilePath,\r\n\theight: Ti.UI.FILL,\r\n\twidth: Ti.UI.FILL,\r\n});\r\nwindow.add(imageView);\r\nwindow.open();\r\n{code}\r\n\r\n*Reason:*\r\nAndroid 5.0 and newer devices support TLS 1.0, 1.1, and 1.2 by default without any code changes, but older Android OS versions only support TLS 1.0 by default.\r\n\r\n*Work-around:*\r\nDevelopers can work-around this issue by download the image themselves via the HTTPClient API and then displaying the downloaded file. Titanium's HTTPClient supports TLS 1.1 and 1.2 on Android 4.1 and higher.", "attachment": [], "flagged": false, "summary": "Android: Loading images via HTTPS TLS 1.1 or newer fails on Android 4.x", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1106, "state": "closed", "name": "2019 Sprint 1", "startDate": "2018-12-31T19:39:58.070Z", "endDate": "2019-01-11T19:39:00.000Z", "completeDate": "2019-01-14T17:17:47.552Z", "originBoardId": 114 }, { "id": 1108, "state": "closed", "name": "2019 Sprint 2", "startDate": "2019-01-14T17:20:19.067Z", "endDate": "2019-01-26T17:20:00.000Z", "completeDate": "2019-01-28T17:38:11.580Z", "originBoardId": 114 }, { "id": 1109, "state": "closed", "name": "2019 Sprint 3", "startDate": "2019-01-28T17:38:43.075Z", "endDate": "2019-02-09T17:38:00.000Z", "completeDate": "2019-02-08T21:37:29.498Z", "originBoardId": 114 }, { "id": 1112, "state": "closed", "name": "2019 Sprint 4", "startDate": "2019-02-11T16:16:38.316Z", "endDate": "2019-02-23T16:16:00.000Z", "completeDate": "2019-02-24T18:35:43.422Z", "originBoardId": 114 }, { "id": 1118, "state": "closed", "name": "2019 Sprint 5", "startDate": "2019-02-24T18:36:06.435Z", "endDate": "2019-03-08T18:36:00.000Z", "completeDate": "2019-03-07T22:19:47.057Z", "originBoardId": 114 }, { "id": 1104, "state": "closed", "name": "2018 Sprint 26", "startDate": "2018-12-17T15:56:00.172Z", "endDate": "2018-12-21T15:56:00.000Z", "completeDate": "2018-12-26T17:42:17.145Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "417637", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Recommended Solution:*\r\nUse an SSLSocketFactory derived class like what we have in Titanium's core network module \"TiSocketFactory.java\", which is what Titanium's HTTPClient JavaScript API uses.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-19T02:21:54.000+0000", "updated": "2017-04-19T02:21:54.000+0000" }, { "id": "417670", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-19T15:16:41.000+0000", "updated": "2017-04-19T15:17:11.000+0000" }, { "id": "417807", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~gmathews], yes, I've seen the \"TiSocketFactory\" code and that's definitely the solution to this issue. That's why I stated that a developer can work-around this by downloading the image his/herself via the HTTPClient. :)\r\n\r\nThe issue is that setting \"image\" and \"backgroundImage\" via a URL goes through our \"TiDownloadManager\" instead, which does not set up a custom SSLSocketFactory that handles TLS 1.1/1.2. It also does not handle redirects between protocols, such as HTTP->HTTPS and vice-versa (I'm currently correcting this last one).", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-20T21:15:32.000+0000", "updated": "2018-12-21T01:12:42.000+0000" }, { "id": "444762", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/10553", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-12-19T23:16:23.000+0000", "updated": "2018-12-19T23:16:23.000+0000" }, { "id": "445108", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "8_0_X: https://github.com/appcelerator/titanium_mobile/pull/10588", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-08T22:09:49.000+0000", "updated": "2019-01-08T22:09:49.000+0000" }, { "id": "446623", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "FR Passed. PR merged", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-03-07T21:19:51.000+0000", "updated": "2019-03-07T21:19:51.000+0000" }, { "id": "446985", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix SDK 8.1.0.v20190319060446 and 8.0.1.v20190318134648. Closing.\r\n{code}\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.13.6\r\n Architecture = 64bit\r\n # CPUs = 8\r\n Memory = 17179869184\r\nNode.js\r\n Node.js Version = 8.12.0\r\n npm Version = 6.4.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nTitanium SDK\r\n SDK Version = 8.1.0.v20190319060446\r\n Device = samsung 5 android 6\r\nEmulator =PIXEL android 9\r\n{code}", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-03-19T19:57:14.000+0000", "updated": "2019-03-19T19:57:14.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }