{ "id": "162487", "key": "TIMOB-23751", "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": "18253", "name": "Release 5.5.0", "archived": false, "released": true, "releaseDate": "2016-09-13" }, { "id": "18264", "name": "hyperloop 1.2.7", "archived": false, "released": true, "releaseDate": "2017-02-06" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-09-12T23:05:33.000+0000", "created": "2016-08-09T21:44:23.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "qe-5.4.0" ], "versions": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "issuelinks": [ { "id": "52345", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "159256", "key": "TIMOB-23132", "fields": { "summary": "Hyperloop: Blocks crashing", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-09-13T01:51:39.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": "13715", "name": "Hyperloop", "description": "Hyperloop project" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "*Details:* If you call {{LAContext.evaluatePolicyLocalizedReasonReply}}, null is returned for the success parameter instead of true or false.\r\n\r\n*Steps to reproduce:*\r\n# Create a classic app: {{appc new --classic}}\r\n# In the {{Resources}} folder, add/replace the following code:\r\n*app.js*\r\n{code}\r\n/**\r\n * Appcelerator Titanium Mobile\r\n * Copyright (c) 2009-2014 by Appcelerator, Inc. All Rights Reserved.\r\n * Licensed under the terms of the Apache Public License\r\n * Please see the LICENSE included with this distribution for details.\r\n *\r\n */\r\n\r\n// WARNING!\r\n//\r\n// THIS MODULE WILL ONLY RUN ON AN IOS 8 DEVICE\r\n//\r\n\r\nvar TiTouchId = require('ti.touchid');\r\n\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar btn = Ti.UI.createButton({\r\n\ttitle: 'authenticate'\r\n});\r\n\r\nwin.add(btn);\r\nwin.open();\r\n\r\nbtn.addEventListener('click', function(){\r\n\r\n\tif(!TiTouchId.isSupported()) {\r\n\t\talert(\"Touch ID is not supported on this device!\");\r\n\t\treturn;\r\n\t}\r\n\r\n\tTiTouchId.authenticate({\r\n\t\treason: '#### We need your fingerprint to continue.',\r\n\t\tcallback: function(e) {\r\n\t\t\tif (!e.success) {\r\n\t\t\t\tconsole.log(\"Success? - \" + e.success);\r\n console.log(\"Error? - \" + e.error);\r\n console.log(\"Code? - \" + e.code);\r\n\t\t\t}\r\n else {\r\n\t\t\t \t// do something useful\r\n\t\t\t\talert('YAY! success');\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n});\r\n{code}\r\n*ti.touchid.js*\r\n{code}\r\n/**\r\n * Ti.TouchID\r\n *\r\n * Summary:\tSupport native Touch ID with Hyperloop in Titanium Mobile.\r\n * Author: \tHans Knoechel | Appcelerator, Inc\r\n * Date: \t03/22/2016\r\n * Version:\t0.1.0\r\n * Example\r\n *\r\n *\tvar touchID = require(\"ti.touchid\");\r\n *\tif (touchID.isSupported()) {\r\n *\t\ttouchID.authenticate({\r\n *\t\t\treason : \"Please verify to reset all devices\",\r\n *\t\t\tcallback : function(e) {\r\n * \t\t\t\tTi.API.warn(\"Success? - \" + e.success);\r\n *\t\t\t\tTi.API.warn(\"Error? - \" + e.error);\r\n *\t\t\t\tTi.API.warn(\"Code? - \" + e.code);\r\n *\t\t\t}\r\n *\t\t});\r\n *\t}\r\n */\r\n\r\nvar UIDevice = require(\"UIKit/UIDevice\");\r\nvar NSNumericSearch = require(\"Foundation\").NSNumericSearch;\r\nvar NSOrderedAscending = require(\"Foundation\").NSOrderedAscending;\r\nvar LAContext = require('LocalAuthentication/LAContext');\r\nvar LocalAuthentication = require('LocalAuthentication/LocalAuthentication');\r\nvar context = new LAContext();\r\n\r\nfunction isSupported() {\r\n\tvar currentOSSupported = UIDevice.currentDevice().systemVersion.compareOptions(\"8.0\", NSNumericSearch) != NSOrderedAscending;\r\n\tvar touchIDSupported = context.canEvaluatePolicyError(LocalAuthentication.LAPolicyDeviceOwnerAuthenticationWithBiometrics);\r\n\r\n\treturn currentOSSupported && touchIDSupported;\r\n}\r\n\r\nfunction authenticate(args) {\r\n\tvar reason = args.reason || null;\r\n\tvar callback = args.callback || null;\r\n\r\n\tif (!reason || !callback) {\r\n\t\tTi.API.error(\"Ti.TouchID: Please provide a valid 'reason' and 'callback' parameter.\");\r\n\t\treturn;\r\n\t}\r\n\r\n\tcontext.evaluatePolicyLocalizedReasonReply(LocalAuthentication.LAPolicyDeviceOwnerAuthenticationWithBiometrics, reason, function(success, error) {\r\n\t\tvar attrs = {\r\n\t\t\tsuccess : success\r\n\t\t};\r\n\r\n\t\tif (error) {\r\n\t\t\tattrs[\"error\"] = error.localizedDescription;\r\n\t\t\tattrs[\"code\"] = error.code;\r\n\t\t}\r\n\r\n\t\tcallback(attrs);\r\n\t});\r\n}\r\n\r\nexports.isSupported = isSupported;\r\nexports.authenticate = authenticate;\r\n{code}\r\n# Install the app to an iOS device that is *touch id supported*; make sure the touch id is enabled first before installing\r\n# Launch the app and press on the *authenticate* button\r\n# Use your fingerprint to continue\r\n\r\n*Actual:* In the console, success is null:\r\n{code}\r\n[INFO] Success? - null\r\n[INFO] Error? - undefined\r\n[INFO] Code? - undefined\r\n{code}\r\n\r\n*Expected:* Success should either be true or false with the appropriate error message and error code. ", "attachment": [], "flagged": false, "summary": "Hyperloop iOS: Block callback arguments are null", "creator": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Appc CLI NPM: 4.2.7 \r\nAppc CLI Core: 5.4.0-40 \r\nArrow: 1.8.2 \r\nSDK: 5.4.0.v20160804185318 \r\nNode: v4.4.7 \r\nOS: Mac OS X (10.11.6) \r\nXcode: 7.3.1 \r\nDevice: iphone 6 plus (9.3.4)", "comment": { "comments": [ { "id": "393723", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Ok, some investigation:\r\n- It is caused by [this commit|https://github.com/appcelerator/hyperloop.next/pull/10/commits/f57ff6e427fad0b80ab608db538af417d0bf341e] and most probably around [this line|https://github.com/appcelerator/hyperloop.next/pull/10/files#diff-90680d080481b4bc4e5c23fcdf677533L100] that manages the block arguments (which we want aight?)\r\n- The fix proposed in that commit was to remove the manual retains and fix the general crash of blocks, so we may cleaned up too much\r\n- We now need to compare the generated block arguments before and after the commit to see what's different\r\n\r\n", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-21T22:44:54.000+0000", "updated": "2016-08-21T22:44:54.000+0000" }, { "id": "394589", "author": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "body": "Can this be fixed in 5.5.0.GA or we'll have to wait for 6.0 ?", "updateAuthor": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "created": "2016-08-29T01:13:21.000+0000", "updated": "2016-08-29T01:13:21.000+0000" }, { "id": "395869", "author": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "body": "Hans, Kiat or Wilson.\r\nI think this ticket deserves way more attention that it is receiving right now.\r\nWhy should we wait 2 months (or more in case 6.0 is delayed, like it has been lately...) just to make use of callbacks? Returning values from an asynchronous operation is the only usage of callbacks, and if we don't have this working then it makes no sense to use them at all. \r\n\r\n-----\r\nThis is kind of off topic, but I'd also like to ask you guys what happened to the ticket that I've opened reporting that Android does not work with Hyperloop 1.2.6 anymore. It simply disappeared and no one gave any feedback on what happened to it.\r\nMuch appreciated!", "updateAuthor": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "created": "2016-09-12T08:42:43.000+0000", "updated": "2016-09-12T08:42:43.000+0000" }, { "id": "395871", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~rdperottoni] Hyperloop releases are not linked to SDK releases, so it will very likely be available before the 6.0.0 timeline. \r\n\r\nFor your OT question, it was made private to be discussed internally. It is fixed and is already fixed in a patched 1.2.6 version that is online in production. You may need to delete the Hyperloop-plugin from your {{~/Library/Application Support/Titanium/modules/android/hyperloop}} directory (best is to delete iOS as well and fetch it clean) and it will work. The fix is also included in the tomorrows 1.2.7 version.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-12T08:47:18.000+0000", "updated": "2016-09-12T08:47:18.000+0000" }, { "id": "395872", "author": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "body": "This is great news.\r\nSo does that mean that the *fix version* in this ticket is wrong?\r\n", "updateAuthor": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "created": "2016-09-12T08:52:23.000+0000", "updated": "2016-09-12T08:52:23.000+0000" }, { "id": "395873", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Well, 2.0.0 with 6.0.0 is correct, but there might be a 1.2.8 between 1.2.7 (along with 5.5.0) and 2.0.0 (along with 6.0.0). Ok? :-)", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-12T08:54:25.000+0000", "updated": "2016-09-12T08:54:25.000+0000" }, { "id": "395886", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (master): https://github.com/appcelerator/hyperloop.next/pull/72\r\nPR (1_2_X): https://github.com/appcelerator/hyperloop.next/pull/73", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-12T12:54:29.000+0000", "updated": "2016-09-12T12:54:29.000+0000" }, { "id": "395954", "author": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "body": "Wooooooot!", "updateAuthor": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "created": "2016-09-12T23:05:31.000+0000", "updated": "2016-09-12T23:05:31.000+0000" }, { "id": "395955", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR's merged. @ QE: Please use the above demo-code to test the arguments of blocks and compare the fixed behavior.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-12T23:06:37.000+0000", "updated": "2016-09-12T23:06:37.000+0000" }, { "id": "395970", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed, using:\r\nMacOS 10.12 (16A239m)\r\nStudio 4.7.1.201609100950\r\nTi SDK 5.5.0.v20160912150826\r\nAppc NPM 4.2.7\r\nAppc CLI 5.5.0-6\r\nAlloy 1.9.2\r\nXcode 8.0 (8A218a)\r\nHyperloop 1.2.7\r\n\r\nThe success parameter is correctly returned as true or false. Callbacks and error attributes can be properly set by referencing it and are called appropriately. Tested by using the provided test case and by modifying it to check attribute/parameter differences.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-09-13T01:51:38.000+0000", "updated": "2016-09-13T01:51:38.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }