{ "id": "171088", "key": "TIMOB-25771", "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": "19957", "description": "", "name": "Release 7.1.0", "archived": false, "released": true, "releaseDate": "2018-03-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-02-28T19:42:54.000+0000", "created": "2018-02-12T21:20:18.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "build", "proxy" ], "versions": [ { "id": "20060", "description": "", "name": "Release 7.0.2", "archived": false, "released": true, "releaseDate": "2018-02-09" } ], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-10-02T15:37:37.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\nIf the developer's system uses a proxy to access the Internet, then Android apps will fail to build as of Titanium 7.0.2.\r\n\r\n*Steps to Reproduce:*\r\n# Delete the following folder on Mac, if it exists: ~/.gradle/caches\r\n# Set up the machine to access the Internet via a proxy.\r\n# Configure the proxy settings in Appcelerator Studio via its \"Proxy Setup\" window or via the CLI's \"appc config set proxyServer\".\r\n# Attempt to do an Android build.\r\n\r\n*Result:*\r\nThe build fails with follow logged errors...\r\n{code}\r\n[ERROR] Failed to run dexer:\r\n[ERROR] \r\n[ERROR] FAILURE: Build failed with an exception.\r\n[ERROR] \r\n[ERROR] * What went wrong:\r\n[ERROR] A problem occurred configuring root project 'android'.\r\n[ERROR] > Could not resolve all files for configuration ':classpath'.\r\n[ERROR] > Could not resolve net.sf.proguard:proguard-gradle:5.3.3.\r\n[ERROR] Required by:\r\n[ERROR] project :\r\n[ERROR] > Could not resolve net.sf.proguard:proguard-gradle:5.3.3.\r\n[ERROR] > Could not get resource 'https://repo1.maven.org/maven2/net/sf/proguard/proguard-gradle/5.3.3/proguard-gradle-5.3.3.pom'.\r\n[ERROR] > Could not GET 'https://repo1.maven.org/maven2/net/sf/proguard/proguard-gradle/5.3.3/proguard-gradle-5.3.3.pom'.\r\n[ERROR] > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target\r\n[ERROR] \r\n[ERROR] * Try:\r\n[ERROR] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.\r\n[ERROR] \r\n[ERROR] * Get more help at https://help.gradle.org\r\n[ERROR] \r\n[ERROR] BUILD FAILED in 1s\r\n{code}\r\n\r\n*Cause:*\r\nA new \"gradle\" build step has been added to Titanium 7.0.2 to perform ProGuard and multidexing apps. Gradle is failing to download its module(s) from maven repositories since it is not configured to work through a proxy.\r\n\r\n*Recommended Solution:*\r\nDevelopers currently have to configure Titanium/Appc to use a proxy according to our docs here...\r\nhttp://docs.appcelerator.com/platform/latest/#!/guide/Using_Studio_From_Behind_a_Proxy\r\nhttp://docs.appcelerator.com/platform/latest/#!/guide/Appcelerator_CLI_Getting_Started\r\n\r\nWhen the Titanium build system generates the \"gradle-wrapper.properties\" file, it should add the CLI's proxy settings to that gradle property file as well. Gradle documents these proxy settings here...\r\nhttps://docs.gradle.org/current/userguide/build_environment.html#sec:accessing_the_web_via_a_proxy\r\n\r\n*Work-Around:*\r\nTitanium developers can work-around this issue by configuring a global \"gradle.properties\" file with these proxy settings according to the docs here...\r\nhttps://docs.gradle.org/current/userguide/build_environment.html#sec:accessing_the_web_via_a_proxy\r\n\r\nOn Mac, the global file goes here...\r\n{code}~/.gradle{code}\r\n\r\nOn Windows, the global file goes here...\r\n{code}C:\\Users\\\\.gradle{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: Apps fail to build as of 7.0.2 if system requires proxy to access Internet", "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": "434391", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Set up a temporary proxy server on Mac:*\r\n# Open the Mac \"Terminal\" app.\r\n# At the command line, enter the following: {{npm install -g proxy}}\r\n# At the command line, enter the \"Proxy Command Line\" shown down below to start the server.\r\n# Open Appcelerator Studio.\r\n# Click menu item \"Appcelerator Studio\\Preferences\".\r\n# Go to preference page \"General\\Network Connections\".\r\n# Click the \"Active Provider\" drop-down and select \"Manual\".\r\n# Under \"Proxy entries\" list, double click on \"HTTP\".\r\n# Enter host \"127.0.0.1\", port \"3128, user \"foo\", password \"bar\", check \"Requires Authentication\", and click OK.\r\n# Under \"Proxy entries\" list, double click on \"HTTPS\".\r\n# Enter host \"127.0.0.1\", port \"3128, user \"foo\", password \"bar\", check \"Requires Authentication\", and click OK.\r\n# Click the Preferences dialog OK button to save the settings.\r\n# Open Mac's \"System Preferences\" window.\r\n# Click \"Network\".\r\n# Select the active network connection (in green) on the left.\r\n# Under the \"Configure\" drop-down box, select \"Off\" to disconnect.\r\n# Click the \"Apply\" button.\r\n# Attempt to do an appc build. (It'll do it via the local proxy server.)\r\n\r\n*Proxy Command Line:*\r\n{code}\r\nproxy --authenticate 'if \\\r\n [ \"$PROXY_AUTH_USERNAME\" = \"foo\" ] && \\\r\n [ \"$PROXY_AUTH_PASSWORD\" = \"bar\" ]; \\\r\n then exit 0; \\\r\n fi; \\\r\n exit 1;'\r\n{code}\r\n\r\n*Notes:*\r\n* To restore Internet access under \"System Preferences\\Network\", change your \"Configure\" drop-down back \"Using DHCP\".\r\n* To kill the running proxy server at the terminal, press Ctrl-C.\r\n* To uninstall the proxy server from the command line (when you're done testing), enter the following at the command line: {{npm uninstall proxy}}\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-12T22:42:17.000+0000", "updated": "2018-02-14T00:04:47.000+0000" }, { "id": "434508", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/9822\r\nPR (7.1.x): https://github.com/appcelerator/titanium_mobile/pull/9823", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-15T04:43:17.000+0000", "updated": "2018-02-15T04:43:17.000+0000" }, { "id": "435024", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nPR's merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-28T19:42:50.000+0000", "updated": "2018-02-28T19:42:50.000+0000" }, { "id": "435264", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in SDK 7.2.0.v20180305152636 & 7.1.0.v20180306061214.\r\n\r\nClosing.\r\n\r\nStudio Ver: 5.0.0.201712081732\r\nOS Ver: 10.13.2\r\nXcode Ver: Xcode 9.2\r\nAppc NPM: 4.2.12\r\nAppc CLI: 7.0.2\r\nDaemon Ver: 1.0.1\r\nTi CLI Ver: 5.0.14\r\nAlloy Ver: 1.11.0\r\nNode Ver: 8.9.1\r\nNPM Ver: 5.5.1\r\nJava Ver: 1.8.0_101\r\nDevices: ⇨ google Nexus 5 --- Android 6.0.1\r\n ⇨ google Nexus 6P --- Android 8.0.0\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-06T21:53:46.000+0000", "updated": "2018-03-06T21:53:46.000+0000" }, { "id": "442213", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~aislam], their issue doesn't sound related to this ticket. The logged error suggests that their network is blocking the following URL...\r\nhttps://repo.maven.apache.org/maven2/net/sf/proguard/proguard-gradle/5.3.3/proguard-gradle-5.3.3.pom\r\n\r\nThis is needed by Google's \"gradle\" build system to download ProGuard, which Titanium uses to multidex the app if needed. You should ask them to add \"https://repo.maven.apache.org\" to their white list.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-02T15:37:37.000+0000", "updated": "2018-10-02T15:37:37.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }