{ "id": "86532", "key": "TIMOB-7668", "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": "2012-02-15T13:10:11.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "12570", "name": "Release 1.7.5", "archived": true, "released": true, "releaseDate": "2011-11-02" }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" }, { "id": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" } ], "issuelinks": [], "assignee": null, "updated": "2018-03-06T18:58:01.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": "Logging into facebook using the facebook dialog causes this error \"The operation couldn't be completed. (NSURLErrorDomain error -999.)\".\r\n\r\nh4. Steps to reproduce:\r\nStep 1: run the code below\r\nStep 2: click on the window\r\nStep 3: enter your facebook creds and hit Login\r\nStep 4: notice that the dialog closes\r\nStep 5: check the console and see the error below\r\n{code:title=console}\r\n{\"type\":\"result\",\"source\":{},\"error\":\"The operation couldn't be completed. (NSURLErrorDomain error -999.)\",\"success\":false,\"cancelled\":false}\r\n{code}\r\nStep 6: notice that the app will sometimes crash at this point\r\nStep 7: click the window again and you will already be logged in and ready to post\r\n\r\n{code:title=app.js}\r\nTitanium.Facebook.appid = '171500626234399';\r\nTitanium.Facebook.permissions = ['publish_stream'];\r\nvar win = Ti.UI.createWindow({backgroundColor:'white'});\r\nwin.open();\r\nwin.addEventListener('click', function(){\r\n\tvar data = {\r\n\t link: \"http://www.appcelerator.com\",\r\n\t name: \"Appcelerator Titanium Mobile\",\r\n\t message: \"Checkout this cool open source project for creating mobile apps\",\r\n\t caption: \"Appcelerator Titanium Mobile\",\r\n\t picture: \"http://developer.appcelerator.com/assets/img/DEV_titmobile_image.png\",\r\n\t description: \"You've got the ideas, now you've got the power.\",\r\n\t};\r\n\tTitanium.Facebook.dialog(\"feed\", data, function(e) {\r\n\t\tTi.API.info('## FB RESULT: '+JSON.stringify(e) );\r\n\t if (e.success) {\r\n\t alert(\"Success! From FB: \" + e.result);\r\n\t } else {\r\n\t if (e.error) {\r\n\t alert(e.error);\r\n\t } else if (e.cancelled) {\r\n\t alert('Cancelled');\r\n\t } else {\r\n\t alert(\"Unkown result\");\r\n\t }\r\n\t }\r\n\t});\r\n});\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Facebook - login in with dialog produces (NSURLErrorDomain error -999.) error", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 1.8.1\r\niOS Simulator 5.0, iPad 2 iOS 5.0.1", "comment": { "comments": [ { "id": "183458", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Jon - Is this a regression or a new issue?", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-16T14:42:45.000+0000", "updated": "2012-02-16T14:42:45.000+0000" }, { "id": "183461", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Reproduced this error on 1.7.5 and 1.8.0.1", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-02-16T15:17:13.000+0000", "updated": "2012-02-16T15:17:13.000+0000" }, { "id": "183503", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Works fine if you authorize before showing the dialog. The dialog will authorize you, but it can't authorize and post.\r\n\r\n{code:title=app.js}\r\nTitanium.Facebook.appid = '171500626234399';\r\nTitanium.Facebook.permissions = ['publish_stream'];\r\nvar win = Ti.UI.createWindow({backgroundColor:'white'});\r\nwin.open();\r\nwin.addEventListener('click', function(){\r\n\tTitanium.Facebook.addEventListener('login', function(e) {\r\n\t if (e.success) {\r\n\t // alert('Logged In');\r\n\t\t\tvar data = {\r\n\t\t\t link: \"http://www.appcelerator.com\",\r\n\t\t\t name: \"Appcelerator Titanium Mobile\",\r\n\t\t\t message: \"Checkout this cool open source project for creating mobile apps\",\r\n\t\t\t caption: \"Appcelerator Titanium Mobile\",\r\n\t\t\t picture: \"http://developer.appcelerator.com/assets/img/DEV_titmobile_image.png\",\r\n\t\t\t description: \"You've got the ideas, now you've got the power.\",\r\n\t\t\t};\r\n\t\t\tTitanium.Facebook.dialog(\"feed\", data, function(e) {\r\n\t\t\t\tTi.API.info('## FB RESULT: '+JSON.stringify(e) );\r\n\t\t\t if (e.success) {\r\n\t\t\t alert(\"Success! From FB: \" + e.result);\r\n\t\t\t } else {\r\n\t\t\t if (e.error) {\r\n\t\t\t alert(e.error);\r\n\t\t\t } else if (e.cancelled) {\r\n\t\t\t alert('Cancelled');\r\n\t\t\t } else {\r\n\t\t\t alert(\"Unkown result\");\r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t});\r\n\t } else if (e.error) {\r\n\t alert(e.error);\r\n\t } else if (e.cancelled) {\r\n\t alert(\"Cancelled\");\r\n\t }\r\n\t});\r\n\tTitanium.Facebook.authorize();\r\n});\r\n{code}", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-16T18:56:10.000+0000", "updated": "2012-02-16T19:02:54.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }