{ "id": "174592", "key": "TIMOB-27720", "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": "20033", "name": "Release 9.0.0", "archived": false, "released": true, "releaseDate": "2020-03-18" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-01-30T21:07:32.000+0000", "created": "2019-12-28T11:28:41.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "build", "gradle", "python", "sdk" ], "versions": [], "issuelinks": [ { "id": "58079", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "174632", "key": "TIMOB-27719", "fields": { "summary": "Android: Remove python dependency from SDK build", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-01-30T21:07:32.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": "Using Fedora 31 (Linux) to compile the latest (2019-12-28) git SDK code you will run into problems\r\n\r\n{code}\r\nRunning Titanium \"prebuild.js\" script.\r\nError: Command failed: python \"titanium_mobile/android/runtime/v8/tools/genBootstrap.py\" --runtime=v8\r\nTraceback (most recent call last):\r\n File \"titanium_mobile/android/runtime/v8/tools/genBootstrap.py\", line 92, in \r\n main()\r\n File \"titanium_mobile/android/runtime/v8/tools/genBootstrap.py\", line 80, in main\r\n b = bootstrap.Bootstrap(bindings, moduleId=\"titanium\", moduleName=\"Titanium\")\r\n File \"titanium_mobile/android/runtime/v8/tools/bootstrap.py\", line 93, in __init__\r\n self.addToInitTable(proxy)\r\n File \"titanium_mobile/android/runtime/v8/tools/bootstrap.py\", line 120, in addToInitTable\r\n namespaces.insert(0, moduleNs)\r\nAttributeError: 'map' object has no attribute 'insert'\r\n{code}\r\n\r\n{code}\r\nat ChildProcess.exithandler (child_process.js:295:12)\r\n at ChildProcess.emit (events.js:210:5)\r\n at maybeClose (internal/child_process.js:1021:16)\r\n at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {\r\n killed: false,\r\n code: 1,\r\n signal: null,\r\n cmd: 'python \"titanium_mobile/android/runtime/v8/tools/genBootstrap.py\" --runtime=v8',\r\n stdout: '',\r\n stderr: 'Traceback (most recent call last):\\n' +\r\n ' File \"titanium_mobile/android/runtime/v8/tools/genBootstrap.py\", line 92, in \\n' +\r\n ' main()\\n' +\r\n ' File \"titanium_mobile/android/runtime/v8/tools/genBootstrap.py\", line 80, in main\\n' +\r\n ' b = bootstrap.Bootstrap(bindings, moduleId=\"titanium\", moduleName=\"Titanium\")\\n' +\r\n ' File \"titanium_mobile/android/runtime/v8/tools/bootstrap.py\", line 93, in __init__\\n' +\r\n ' self.addToInitTable(proxy)\\n' +\r\n ' File \"titanium_mobile/android/runtime/v8/tools/bootstrap.py\", line 120, in addToInitTable\\n' +\r\n ' namespaces.insert(0, moduleNs)\\n' +\r\n \"AttributeError: 'map' object has no attribute 'insert'\\n\"\r\n{code}\r\n\r\nsince it is using \"python\" to run genBootstrap.py. But in Fedora it will use python 3 since that is mapped as a default python. Changing \r\nhttps://github.com/appcelerator/titanium_mobile/blob/f687e3bbf8266707e6e5fdfdba6580e141a2221b/android/titanium/prebuild.js#L111\r\nand\r\nhttps://github.com/appcelerator/titanium_mobile/blob/f687e3bbf8266707e6e5fdfdba6580e141a2221b/android/titanium/prebuild.js#L141\r\n to python2 fixed the issue. \r\n\r\nA better solution to either port it to python3 or check for the correct python version at the beginning would be better. Python 2 won't be supported after April 2020 (last version was released 19th October)\r\n\r\n*Recommended Solution:*\r\nUse \"python2\" command line tool if available on system before using \"python\" command.\r\n\r\n*Best Solution:*\r\nRemove python dependency via ticket: [TIMOB-27719]\r\nWe'll need to do this in the near future since Apple will no longer pre-install python on future macOS versions.\r\n", "attachment": [], "flagged": false, "summary": "Android: Error building SDK if python 3 is installed", "creator": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 1177, "state": "closed", "name": "2020 Sprint 2", "startDate": "2020-01-20T17:44:37.733Z", "endDate": "2020-01-31T17:44:00.000Z", "completeDate": "2020-01-31T16:57:44.689Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "453732", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/11438", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-17T01:13:33.000+0000", "updated": "2020-01-17T01:13:33.000+0000" }, { "id": "453736", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR works fine on my Fedora machine (y)", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-01-17T16:21:14.000+0000", "updated": "2020-01-17T16:21:14.000+0000" }, { "id": "453754", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR passed, Waiting on Jenkins build.", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-21T15:20:50.000+0000", "updated": "2020-01-21T15:20:50.000+0000" }, { "id": "453781", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master for 9.0.0", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-01-23T15:04:42.000+0000", "updated": "2020-01-23T15:04:42.000+0000" }, { "id": "453948", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix with SDK 9.0.0.v20200130075800.\r\nClosing.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-30T21:07:28.000+0000", "updated": "2020-01-30T21:07:28.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }