{ "id": "174800", "key": "TIMOB-27846", "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": "20950", "name": "Release 9.1.0", "archived": false, "released": true, "releaseDate": "2020-08-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-07-20T14:12:30.000+0000", "created": "2020-03-10T17:37:42.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "ios", "regression" ], "versions": [ { "id": "20949", "name": "Release 9.0.1", "archived": false, "released": true, "releaseDate": "2020-04-16" }, { "id": "20033", "name": "Release 9.0.0", "archived": false, "released": true, "releaseDate": "2020-03-18" }, { "id": "21018", "name": "Release 9.0.2", "archived": false, "released": true, "releaseDate": "2020-05-19" }, { "id": "21039", "name": "Release 9.0.3", "archived": false, "released": true, "releaseDate": "2020-06-10" } ], "issuelinks": [ { "id": "58566", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "175155", "key": "AC-6561", "fields": { "summary": "Ti.Platform.openURL causes \"undefined is not an object\" error", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "58608", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "175416", "key": "AC-6581", "fields": { "summary": "Calling Ti.Platform.openURL() without the optional 3rd parameter (callback) will raise a \"Script error\"", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "58568", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "174876", "key": "AC-6517", "fields": { "summary": "Ti.Platform.openURL throws ERROR (SDK 9.0)", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2020-08-07T13:29:08.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "When I use Ti.Platform.openURL, and the app goes to background, the app crashes with this error:\r\n\r\n[ERROR] Script Error {\r\n[ERROR] toJSON = \"\";\r\n[ERROR] } ", "attachment": [ { "id": "67293", "filename": "index.js", "author": { "name": "hrfn", "key": "hrfn", "displayName": "Hugo Ramos Freire Neto", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-03-10T17:34:18.000+0000", "size": 181, "mimeType": "text/javascript" } ], "flagged": false, "summary": "iOS: Calling Ti.Platform.openURL without all parameters causes the app to crash (regression)", "creator": { "name": "hrfn", "key": "hrfn", "displayName": "Hugo Ramos Freire Neto", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "hrfn", "key": "hrfn", "displayName": "Hugo Ramos Freire Neto", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK 9.0.0.v20200302073333\r\nIos Simulator - Iphone 11 Pro Max - 13.3\r\nXcode Version 11.3.1", "closedSprints": [ { "id": 1201, "state": "closed", "name": "2020 Sprint 14", "startDate": "2020-07-06T15:40:00.000Z", "endDate": "2020-07-17T15:40:00.000Z", "completeDate": "2020-07-20T22:16:28.367Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "455103", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The issue is a regression in SDK 9.0.0.GA. Do not see this issue with SDK 8.3.1.GA.\r\nTested with\r\nMac OS: 10.15.4\r\nSDK: 9.0.0.GA, 8.3.1.GA\r\nAppc CLI: 8.0.0\r\nJDK: 11.0.4\r\nNode: 10.17.0\r\nStudio: 6.0.0.202003181504\r\nXcode: 11.4\r\nDevice: iOS simulator 13.4, iOS simulator 12.2", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-04-13T20:24:50.000+0000", "updated": "2020-04-13T20:24:50.000+0000" }, { "id": "455777", "author": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Seeing this as well. Adding the optional callback parameter will remove error: {{Ti.Platform.openURL(url, null, ()=>{});}}", "updateAuthor": { "name": "jonasfunk", "key": "jonasfunk", "displayName": "Jonas Funk Johannessen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-06-12T11:36:36.000+0000", "updated": "2020-06-12T11:36:36.000+0000" }, { "id": "455945", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-06-26T11:26:33.000+0000", "updated": "2020-06-26T11:26:33.000+0000" }, { "id": "456155", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "How can this issue not be scheduled so far? SDK 9 regression, critical crash, reproducible every time, already 3+ months old. Come on Axway!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-07-19T20:18:51.000+0000", "updated": "2020-07-19T20:18:51.000+0000" }, { "id": "456156", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/11826\r\n\r\nExample:\r\n{code:js}\r\nfunction doInverval() {\r\n console.log('interval called');\r\n}\r\n\r\nfunction doClick(e) {\r\n Ti.Platform.openURL('https://google.com', {}, function() {});\r\n}\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: 'Open URL'\r\n});\r\n\r\nbtn.addEventListener('click', doClick);\r\n\r\nlet interval = setInterval(doInverval, 1000);\r\n\r\nwin.add(btn);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-07-19T20:40:40.000+0000", "updated": "2020-07-19T20:41:13.000+0000" }, { "id": "456170", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Well this was a dumb error on my part. I misunderstood how the new JSC API would handle an optional callback argument - I assumed it'd be {{nil}}. It is not! It's a {{JSValue \\*}} equivalent to {{undefined}}. So any APIs with an optional callback using the new JSC API need to explicitly check the arg is both not nil, *and* is actually a function. Thanks for the PR [~hknoechel], that's what clued me in to the issue here. The fix is relatively straight-forward and I'll push it today.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-07-20T14:08:48.000+0000", "updated": "2020-07-20T14:08:48.000+0000" }, { "id": "456171", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Fixed in https://github.com/appcelerator/titanium_mobile/commit/31424c6c2e85ad5d18c5d45c156221545e8a0e22\r\n\r\n(cherry-picked to 9_1_X and 9_3_X)", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-07-20T14:12:30.000+0000", "updated": "2020-07-20T14:12:30.000+0000" }, { "id": "456172", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "For good measure, I also cherry-picked back to 9_0_X branch", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-07-20T14:13:57.000+0000", "updated": "2020-07-20T14:13:57.000+0000" }, { "id": "456240", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket*. Fix verified in SDK version {{9.1.0.v20200724110711}}, {{9.2.0.v20200724112452}}, {{9.0.4.v20200720071447}} and {{9.3.0.v20200724114100}}.\r\n\r\nTested using the following test case: \r\n\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n\ttitle: 'Ti.Platform.openURL Bug'\r\n});\r\nwin.open();\r\n\r\nvar button = Ti.UI.createButton({\r\n\ttop: 100,\r\n\theight: Ti.UI.SIZE,\r\n\ttitle: 'Open maps'\r\n});\r\nbutton.addEventListener('click', function() {\r\n\tTi.Platform.openURL('http://maps.apple.com/maps?q=-8.012960,110.308998');\r\n});\r\nwin.add(button);\r\n\r\nsetInterval(function() {\r\n\tTi.Platform.openURL('http://maps.apple.com/maps?q=-8.012960,110.308998');\r\n}, 10000);\r\n{code}\r\n\r\n\r\n\r\nTest and other information can be found at:\r\nhttps://github.com/appcelerator/titanium_mobile/commit/31424c6c2e85ad5d18c5d45c156221545e8a0e22\r\n\r\n*Test Environment*\r\n{code:java}\r\nMacOS Big Sur: 11.0 Beta\r\nXcode: 12.0 Beta \r\nJava Version: 1.8.0_242\r\nAndroid NDK: 21.3.6528147\r\nNode.js: 12.18.1\r\n\"\"NPM\":\"5.0.0\",\"CLI\":\"8.1.0-master.5\"\"\r\niphone 8 Sim (14.0 Beta)\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-27T14:06:48.000+0000", "updated": "2020-07-27T14:06:48.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }