{ "id": "161398", "key": "AC-3950", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2016-07-01T15:00:33.000+0000", "created": "2016-06-28T04:39:40.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-04-27T08:50:28.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": [], "attachment": [ { "id": "59681", "filename": "Screen Shot 2016-06-30 at 12.22.00 AM.png", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-06-29T18:40:52.000+0000", "size": 59835, "mimeType": "image/png" }, { "id": "59680", "filename": "Screen Shot 2016-06-30 at 12.39.23 AM.png", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-06-29T18:40:52.000+0000", "size": 27041, "mimeType": "image/png" } ], "flagged": false, "summary": "Cloud.Users.showMe returns empty data with response_json_depth", "creator": { "name": "heedoo", "key": "heedoo", "displayName": "heedoo moon", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "heedoo", "key": "heedoo", "displayName": "heedoo moon", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK 5.2.2\r\nTi.Cloud 3.2.10", "comment": { "comments": [ { "id": "389421", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Using the sample code provided on the ticket that you mentioned, I was able to get response successfully. I have tested both in Android and in iOS. See the attachment. Make sure your user is created in the platform and you are using cloud login in your code. This is not a valid bug. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-06-29T18:39:55.000+0000", "updated": "2016-06-29T18:39:55.000+0000" }, { "id": "389521", "author": { "name": "heedoo", "key": "heedoo", "displayName": "heedoo moon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can you show me how you test code and version?\r\nBelow code is what I tested and I have that user account.\r\nAnd this is exact error message that I see.\r\n{color:#d04437}\"Argument callback was an unexpected type! Expexted: function, Received: object\"{color}\r\nIt looks like not taking object parameter.\r\n\r\nrequire('ti.cloud').Users.login({\r\n login: 'qqq',\r\n password: 'qqqqqqq'\r\n}, function (e) {\r\n if (e.success) {\r\n var user = e.users[0];\r\n console.log(\"logged in\");\r\n\r\n\trequire('ti.cloud').Users.showMe({response_json_depth:3}, function(e) {\r\n\t\tconsole.log(\"e: \" + JSON.stringify(e));\r\n\t});\r\n\r\n\r\n } else {\r\n alert('Error:\\n' +\r\n ((e.error && e.message) || JSON.stringify(e)));\r\n }\r\n});\r\n\r\n", "updateAuthor": { "name": "heedoo", "key": "heedoo", "displayName": "heedoo moon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-06-30T03:18:56.000+0000", "updated": "2016-06-30T23:35:16.000+0000" }, { "id": "389594", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I used the below code. \r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\r\n backgroundColor : '#fff',\r\n\r\n layout : 'vertical'\r\n\r\n});\r\n\r\nvar Cloud = require(\"ti.cloud\");\r\n\r\nCloud.Users.login({\r\n\r\n login : 'EMAIL',\r\n\r\n password : 'PASS'\r\n\r\n}, function(e) {\r\n\r\n if (e.success) {\r\n\r\n var user = e.users[0];\r\n\r\n alert('Success:\\n' + 'id: ' + user.id + '\\n' + 'sessionId: ' + Cloud.sessionId + '\\n' + 'first name: ' + user.first_name + '\\n' + 'last name: ' + user.last_name);\r\n\r\n } else {\r\n\r\n alert('Error:\\n' + ((e.error && e.message) || JSON.stringify(e)));\r\n\r\n }\r\n\r\n});\r\n\r\n// Create a Button.\r\n\r\nvar SHOW_ME = Ti.UI.createButton({\r\n\r\n title : 'SHOW_ME',\r\n\r\n height : Ti.UI.SIZE,\r\n\r\n width : Ti.UI.SIZE,\r\n\r\n top : 20,\r\n\r\n});\r\n\r\n// Add to the parent view.\r\n\r\nwin.add(SHOW_ME);\r\n\r\nfunction show_me() {\r\n\r\n Cloud.Users.showMe(function(e) { response_json_depth:2\r\n\r\n if (e.success) {\r\n\r\n var user = e.users[0];\r\n\r\n alert('Success:\\n' + 'id: ' + user.id + '\\n' + 'first name: ' + user.first_name + '\\n' + 'last name: ' + user.last_name);\r\n\r\n } else {\r\n\r\n alert('Error:\\n' + ((e.error && e.message) || JSON.stringify(e)));\r\n\r\n }\r\n\r\n });\r\n\r\n}\r\n\r\n// Listen for click events.\r\n\r\nSHOW_ME.addEventListener('click', function() {\r\n\r\n show_me();\r\n\r\n});\r\n\r\nwin.open();\r\n\r\n{code}\r\n\r\nMake sure you have a user created in the platform. And, use that user email and pass in the above code in the cloud login function. \r\n", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-06-30T16:59:53.000+0000", "updated": "2016-06-30T16:59:53.000+0000" }, { "id": "389662", "author": { "name": "heedoo", "key": "heedoo", "displayName": "heedoo moon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I don't understand how does your code work.\r\nBecause your sample \"response_json_depth:2\" parameter is in callback.\r\n\r\nFor example)\r\n\r\nCloud.Users.showMe(function(e) { response_json_depth:2\r\n above code should be ==>\r\nCloud.Users.showMe({response_json_depth:2}, function(e) { \r\n", "updateAuthor": { "name": "heedoo", "key": "heedoo", "displayName": "heedoo moon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-06-30T22:42:03.000+0000", "updated": "2016-06-30T23:37:05.000+0000" }, { "id": "389746", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Try using the code that I sent. This should work for you. Closing the ticket. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-07-01T14:52:00.000+0000", "updated": "2016-07-01T14:52:00.000+0000" }, { "id": "389771", "author": { "name": "heedoo", "key": "heedoo", "displayName": "heedoo moon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sharif,\r\n\r\nI already tried not not working for me.\r\n\r\nHave you tried with my code and same version?", "updateAuthor": { "name": "heedoo", "key": "heedoo", "displayName": "heedoo moon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-07-01T17:59:02.000+0000", "updated": "2016-07-01T17:59:02.000+0000" }, { "id": "437182", "author": { "name": "efrancis", "key": "efrancis", "displayName": "Emmanuel Francis", "active": true, "timeZone": "Asia/Kolkata" }, "body": "I am trying to call this as follows:\r\nCloud.Users.showMe({\r\n\t\t \t\t\tresponse_json_depth:2\r\n\t\t \t\t},function (e) {\r\n\t\t \t\t\tif (e.success) {\r\n var user = e.users[0];\r\n alert('Success:\\n' +\r\n 'id: ' + user.id + '\\n' +\r\n 'first name: ' + user.first_name + '\\n' +\r\n 'last name: ' + user.last_name);\r\n } else {\r\n alert('Error:\\n' +\r\n ((e.error && e.message) || JSON.stringify(e)));\r\n }\r\n\t\t\t\t});\r\n\r\nAnd it gives me below error:\r\nScript Error Argument callback was an unexpected type! Expected: function, Received: object", "updateAuthor": { "name": "efrancis", "key": "efrancis", "displayName": "Emmanuel Francis", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2018-04-27T08:50:28.000+0000", "updated": "2018-04-27T08:50:28.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }