{ "id": "170170", "key": "TIMOB-25453", "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": null, "resolutiondate": null, "created": "2017-10-29T13:41:22.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "19906", "description": "", "name": "Release 6.3.0", "archived": false, "released": true, "releaseDate": "2017-11-01" } ], "issuelinks": [ { "id": "58072", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "172631", "key": "TIMOB-26572", "fields": { "summary": "TiAPI: Extend global console API to be more Node-compatible", "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": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": null, "updated": "2020-01-08T20:35:19.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "*Steps to reproduce the behavior*\r\n1. Create a new app and insert the following code snippet at the end of {{app/controllers/index.js}}:\r\n{code}\r\nconsole.error.bind(null, 'test').apply();\r\n{code}\r\n2. Run the app\r\n\r\n*Actual behavior*\r\nThe following script error occurs:\r\n{code}\r\n[ERROR] Script Error {\r\n[ERROR] column = 19;\r\n[ERROR] line = 19;\r\n[ERROR] message = \"console.error.bind is not a function. (In 'console.error.bind(null, 'test')', 'console.error.bind' is undefined)\";\r\n[ERROR] sourceURL = \"file:///Users/jvennemann/Library/Developer/CoreSimulator/Devices/AFB48D22-ADB6-4629-BAC5-EE208FE2B712/data/Containers/Bundle/Application/19A373DC-4ECA-4C59-9C04-541FC78877BC/googlevr.app/app.js\";\r\n[ERROR] }\r\n{code}\r\n\r\n*Expected behavior*\r\nThe word {{test}} is printed to the error log and no script error appears.\r\n\r\n*Additional notes*\r\nThis only happens on iOS. Android seems be fine with binding {{console.error}}.", "attachment": [], "flagged": false, "summary": "iOS: console.error.bind is not a function", "creator": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "environment": "TiSDK 6.3.0.RC", "comment": { "comments": [ { "id": "429785", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "cc [~hknoechel] This does not seem to work for anything we expose on the iOS runtime. The following example also fails on iOS, whereas on Android it runs fine:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: 'Test'\r\n});\r\n\r\nwin.add.bind(win, btn).apply();\r\nwin.open();\r\n{code}\r\n\r\n*Actual behavior*\r\nScript error is thrown:\r\n{code}\r\n[ERROR] Script Error {\r\n[ERROR] column = 13;\r\n[ERROR] line = 16;\r\n[ERROR] message = \"win.add.bind is not a function. (In 'win.add.bind(win, btn)', 'win.add.bind' is undefined)\";\r\n[ERROR] sourceURL = \"file:///Users/jvennemann/Library/Developer/CoreSimulator/Devices/AFB48D22-ADB6-4629-BAC5-EE208FE2B712/data/Containers/Bundle/Application/3085F028-B155-40D6-8841-08C9303788FF/googlevr.app/app.js\";\r\n[ERROR] }\r\n{code}\r\n\r\n*Expected behavior*\r\nButton gets added to the window and the app does not crash.\r\n", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-10-29T14:01:46.000+0000", "updated": "2017-10-29T14:01:46.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }