{ "id": "172206", "key": "TIMOB-26377", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-09-12T21:40:45.000+0000", "created": "2018-09-11T03:55:41.000+0000", "epic": { "id": 172002, "key": "TIMOB-26258", "name": "Android P: Implement Support", "summary": "Android P: Implement Support", "color": { "key": "color_8" }, "done": false }, "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "http", "httpclient", "network", "security" ], "versions": [], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-09-24T20:59:56.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\nAn Android P device will block cleartext \"http\" requests by default for apps that target Android P.\r\nhttps://developer.android.com/training/articles/security-config#CleartextTrafficPermitted\r\n\r\nThe Java {{HttpUrlConnection}} on Android P will throw the following exception when attempt to do a non-https request...\r\n{code}\r\njava.io.IOException: Cleartext HTTP traffic to raw.githubusercontent.com not permitted\r\n{code}\r\n\r\n*Steps to reproduce:*\r\n# Set up \"tiapp.xml\" to target API Level 28.\r\n# Acquire an Android P device that has Internet access.\r\n# Build and run [^HttpGetTest.js] on the Android P device.\r\n# Tap on the \"HTTP Get\" button.\r\n# Notice that you get a \"Cleartext HTTP traffic to not permitted\" error.\r\n\r\n*Note:*\r\nThis is also an issue with a {{WebView}} loading \"http:\" pages too.\r\nCan be reproduced with the following...\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow();\r\nwindow.add(Ti.UI.createWebView({ url: \"http://www.google.com\" }));\r\nwindow.open();\r\n{code}\r\n\r\n*Possible Solution:*\r\nSimplest solution may be to set the following \"AndroidManifest.xml\" {{}} attribute \"android:usesCleartextTraffic\" to {{true}} for all Titanium built apps by default. This way apps are backward compatible. But allow the Titanium developer to set this to {{false}} in the \"tiapp.xml\".\r\nhttps://developer.android.com/guide/topics/manifest/application-element#usesCleartextTraffic\r\n\r\nExample...\r\n{code:xml}\r\n\r\n\t\r\n\r\n{code}\r\n", "attachment": [ { "id": "65518", "filename": "HttpGetTest.js", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-11T22:57:17.000+0000", "size": 923, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "Android: Allow non-https requests to work when targeting Android P", "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, "comment": { "comments": [ { "id": "441490", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/10319", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-12T01:02:04.000+0000", "updated": "2018-09-12T01:02:04.000+0000" }, { "id": "441517", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nPR Merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-12T21:40:39.000+0000", "updated": "2018-09-12T21:40:39.000+0000" }, { "id": "442008", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix with sdk 7.5.0.v20180924090601. Works fine.Closing.\r\n{code}\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.13.6\r\n Architecture = 64bit\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nTitanium SDK\r\n SDK Version = 7.5.0.v20180924090601\r\nDevice\t\t\t\t= samsung galaxy s5 -Android 6\r\n\t\t\t\t\tPixel emulator -Android 8 ,pixelAndroid 9 device\r\n{code}", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-09-24T20:59:47.000+0000", "updated": "2018-09-24T20:59:47.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }