{ "id": "163213", "key": "TIMOB-23904", "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": "18322", "name": "Release 5.5.1", "archived": false, "released": true, "releaseDate": "2016-09-28" }, { "id": "18335", "name": "facebook 5.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-17T11:49:32.000+0000", "created": "2016-09-14T20:58:00.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "qe-5.5.0" ], "versions": [ { "id": "18253", "name": "Release 5.5.0", "archived": false, "released": true, "releaseDate": "2016-09-13" } ], "issuelinks": [ { "id": "52722", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "163152", "key": "TIMOB-23890", "fields": { "summary": "iOS10: Facebook Login is not working", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-09-22T21:51:02.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": "h5. Description:\r\nWhile testing a fix for TIMOB-23890, I noticed that the button for login required two presses before I was presented with the Facebook login. Sample code is here:\r\n{code}\r\nvar fb = require(\"facebook\");\r\n \r\n// Facebook Stuff\r\nfb.initialize();\r\n \r\n \r\nvar win = Ti.UI.createWindow();\r\n \r\nvar fbloginbutton = Ti.UI.createButton({\r\n title: \"Login with Facebook\"\r\n});\r\n \r\nfbloginbutton.addEventListener(\"click\", function() {\r\n fb.authorize();\r\n});\r\n \r\nwin.add(fbloginbutton);\r\n \r\nvar lbl = Ti.UI.createLabel({\r\n color: \"red\",\r\n text: fb.loggedIn\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\nh5. Steps to reproduce:\r\n1) Create a new classic mobile project\r\n2) Attach the Facebook module\r\n3) Paste the sample code into app.js\r\n4) Install and launch\r\n5) Press the \"Login with Facebook\" button\r\n\r\nh5. Result:\r\nNothing happens - Until you press the button again.\r\n\r\nh5. Expected Result:\r\nThe Facebook login process begins", "attachment": [], "flagged": false, "summary": "iOS10: Button listener takes two taps before responding for Facebook login", "creator": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "NPM Version: 2.15.1\r\nNode Version: 4.4.3\r\nMac OS: 10.11.2\r\nAppc CLI: 5.5.0\r\nAppc CLI NPM: 4.2.7\r\nTitanium SDK version: 5.5.0.GA\r\nAppcelerator Studio, build: 4.7.1.201609100950\r\nXcode 8.0 GM", "closedSprints": [ { "id": 707, "state": "closed", "name": "2016 Sprint 19 SDK", "startDate": "2016-09-10T00:17:15.164Z", "endDate": "2016-09-24T00:17:00.000Z", "completeDate": "2016-09-26T05:17:04.253Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "396154", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~hansknoechel] as you have mentioned to me before, is this related to another ticket?", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-09-14T21:01:22.000+0000", "updated": "2016-09-14T21:01:22.000+0000" }, { "id": "396156", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Well, I guess it's because our {{Ti.UI.Button}} reacts different to a click-event than other UI-components do. It's more a general behavior than specific to our ti.facebook module. If you feel that we want to change this behavior, I'd do some native comparisons.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-14T21:04:09.000+0000", "updated": "2016-09-14T21:04:09.000+0000" }, { "id": "396166", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "I have been able to reproduce this on my app. Sometimes just tapping another Ti.Button on our login flow makes the Ti.Button for facebook login work.\r\n\r\nThis makes fb.authorize() unusable for login (specially when you block the UI with a loader for preventing multiple taps on the fb login button).\r\n\r\nfb.authorize() is the only way to have custom facebook login buttons.\r\n\r\nAlso, this is very hard (at least for us) to reproduce on the simulator as the button that calls the authorize method seems to always work, but on the device itself we've managed to reproduce it every time.", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-14T22:00:47.000+0000", "updated": "2016-09-14T22:00:47.000+0000" }, { "id": "396175", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "As a temp-fix/jerry-rig I've tried to add a setTimeout calling the fb.authorize() method again after 500 ms.\r\n\r\nThis works for all the times in which I needed to tap the button again for login but sometimes when authorize() works at first call, it opens a second SFSafariViewController with the facebook login flow and mess up the login flow and callbacks on the app since I'm invoking authorize() 2 times.\r\n\r\nThis is not a viable solution at all but may help you in debugging.\r\n\r\nAlso I have noticed that after a successful facebook login on the app, the button always works normally if I logout and login again without killing the app.\r\nThe issue returns if I logout and manually kill the app.\r\n\r\nFor now we are unblocking the UI (removing a full screen loader after the user tap the Facebook login for the first time) so the user can tap again at his own will if the SFSafariViewController doesn't appear (which is far from optimal).", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-14T22:46:25.000+0000", "updated": "2016-09-14T22:46:25.000+0000" }, { "id": "396361", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "@Hans can we increase the priority of this issue? Is it being discussed for 6.0.0 ? Thanks.", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-16T17:02:04.000+0000", "updated": "2016-09-16T17:02:04.000+0000" }, { "id": "396399", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Yes, I will investigate it in the upcoming sprint. I'm still wondering why that could be an issue. Is this also happening on iOS < 9? And how about older ti.facebook versions? I need as many environments as possible.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-16T22:21:44.000+0000", "updated": "2016-09-16T22:21:44.000+0000" }, { "id": "396403", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Just reproduced it, it's a valid issue! [~cng] Might even be considered for 5.5.1\r\n\r\n*EDIT*: Found [this Stackoverflow post|http://stackoverflow.com/questions/39532132/blank-page-while-logging-in-with-facebook-sdk-on-ios-10] that has the exact same issue. So I guess the Safari-Dialog tries to pop up \"too early\" and since {{fromViewController}} is {{nil}} in our case, it doesn't get called. [~ygbr] Can I send you a custom build that you verify? Guess I have something.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-16T22:27:36.000+0000", "updated": "2016-09-16T22:51:49.000+0000" }, { "id": "396409", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "@Hans sure, I can test it now.\r\n\r\nps: I don't know why, but I can't mention anybody on appc Jira...", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-16T22:53:51.000+0000", "updated": "2016-09-16T22:56:26.000+0000" }, { "id": "396415", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator-modules/ti.facebook/pull/68\r\n\r\nI will also cherry-pick the changes from [Kiat's PR|https://github.com/appcelerator-modules/ti.facebook/pull/67] for adjusted docs.\r\n\r\n[~ygbr] Please try [facebook-iphone-5.2.7.zip|https://www.dropbox.com/s/aj3diy7zxlx60z6/facebook-iphone-5.2.7.zip?dl=0], thanks!\r\n\r\n", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-16T23:40:06.000+0000", "updated": "2016-09-16T23:44:32.000+0000" }, { "id": "396418", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "CR and FT passed. PR merged. \r\nCan we have the back ports please.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-09-17T00:11:39.000+0000", "updated": "2016-09-17T00:11:39.000+0000" }, { "id": "396434", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (titanium_mobile):\r\nmaster: https://github.com/appcelerator/titanium_mobile/pull/8390\r\n6_0_X: https://github.com/appcelerator/titanium_mobile/pull/8391\r\n5_5_X: https://github.com/appcelerator/titanium_mobile/pull/8392", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-17T11:41:16.000+0000", "updated": "2016-09-17T11:41:16.000+0000" }, { "id": "396986", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\n\r\nThe button listener now responds after the first click for facebook login.\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 4.8.0.201609191928\r\nTi SDK : 6.1.0.v20160922115612, 6.0.0.v20160922115636, 5.5.1.v20160921190109 \r\nTi CLI : 5.0.9\r\nAlloy : 1.9.1\r\nMAC El Capitan : 10.11.6\r\nAppc NPM : 4.2.7\r\nAppc CLI : 5.5.0\r\nNode: 4.4.4\r\nIphone 6 : IOS 10\r\nIphone simulator 7 plus : IOS 10\r\nIphone 6 : IOS 9.3.5\r\nFacebook module : 5.2.7", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-22T21:50:45.000+0000", "updated": "2016-09-22T21:50:45.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }