{ "id": "107037", "key": "AC-2069", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2013-01-28T22:14:27.000+0000", "created": "2012-12-21T23:01:09.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:41: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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Problem : Callback from ACS response not working in SDK 3.0.0.GA\r\n\r\nTest case :\r\n\r\nvar Cloud = require('ti.cloud');\r\nCloud.debug = true;\r\n\r\nvar win = Ti.UI.createWindow({backgroundColor:'#ccc'});\r\n\r\nvar container = Ti.UI.createScrollView({\r\n\theight:'100%',\r\n\twidth:'100%',\t\r\n\tleft:0,\r\n\tbackgroundColor:'#ddd',\t\r\n\tlayout:'vertical'\r\n});\r\nwin.add(container);\r\n\r\nvar username = Ti.UI.createTextField({\r\n\theight:'40dp',\r\n\twidth:'80%',\r\n\ttop:'100dp',\r\n\thintText:'Username',\r\n\ttextAligh:'center'\r\n});\r\ncontainer.add(username);\r\n\r\nvar password = Ti.UI.createTextField({\r\n\theight:'40dp',\r\n\twidth:'80%',\r\n\ttop:'15dp',\r\n\thintText:'ContraseƱa',\r\n\ttextAlig:'center',\r\n\tpasswordMask: true \r\n});\r\ncontainer.add(password);\r\n\r\nvar submit = Ti.UI.createButton({\r\n\theight:'40dp',\r\n\twidth:'80%',\r\n\ttop:'25dp',\r\n\ttitle:'Login',\r\n\ttextAlig:'center'\r\n});\r\ncontainer.add(submit);\r\n\r\nsubmit.addEventListener('click', function(){\r\n\tif(username.value && password.value){\r\n\t\tCloud.Users.login({\r\n\t\tlogin: username.value, //user\r\n\t\tpassword: password.value //user\r\n\t\t}, function (e) { \t\t \r\n\t\t\tif (e.success) {\r\n\t\t\t\talert(e.users[0]);\r\n\t\t\t}else{\r\n\t\t\t\talert('Error:\\\\n' +\r\n ((e.error && e.message) || JSON.stringify(e)));\t\t\t\t\t\t\t\t\r\n\t\t} \r\n\t});\r\n\t}else{\r\n\t\talert('Error');\r\n\t}\r\n});\r\n\r\nwin.open();\r\n\r\nCommunity discussion: http://developer.appcelerator.com/question/146001/error-in-callback-from-acs-with-alloy\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Appcelerator Cloud Services - Callback not working in SDK 3.0.0.GA", "creator": { "name": "sandtonio", "key": "sandtonio", "displayName": "Antonio Sandoval", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sandtonio", "key": "sandtonio", "displayName": "Antonio Sandoval", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK version: 3.0.0.GA\r\nJavascript Engine: V8\r\nPlatform & version: Android 2.3.6\r\nDevice Details: Android Huawei y101, Android Sony Xperia Play, Android Simulator \r\nHost Operating System: Mac OS X 10.7.5\r\nTitanium Studio version: 3.0.1.201212181159", "comment": { "comments": [ { "id": "232497", "author": { "name": "nitrag", "key": "nitrag", "displayName": "Ryan Gartin", "active": true, "timeZone": "America/New_York" }, "body": "Sent email to Wei Kong with full instructions, project files and LogCats to reproduce the same issue. He is out of the Office until Jan. 6th though. Please let me know who else needs to see these details. If you just need the logcats they are http://pastie.org/5566390 and http://pastie.org/5566396, SDK's 2.1.4 and 3.0 respectively.", "updateAuthor": { "name": "nitrag", "key": "nitrag", "displayName": "Ryan Gartin", "active": true, "timeZone": "America/New_York" }, "created": "2012-12-22T21:39:28.000+0000", "updated": "2012-12-22T21:39:28.000+0000" }, { "id": "232899", "author": { "name": "nitrag", "key": "nitrag", "displayName": "Ryan Gartin", "active": true, "timeZone": "America/New_York" }, "body": "Tested on Emulator itself. Why does it show no data coming back from ACS??? Please have them check logs on their side please.\n\n\n[INFO][ActivityManager( 88)] START {cmp=com.eagledevelopers.sigep/org.appcelerator.titanium.TiActivity (has extras)} from pid 704\n[INFO][dalvikvm-heap( 704)] Grow heap (frag case) to 10.633MB for 614416-byte allocation\n[INFO][TiRootActivity( 704)] (main) [0,0] checkpoint, on root activity resume. activity = com.eagledevelopers.sigep.SigepBetaActivity@4136a3d8\n[INFO][dalvikvm-heap( 704)] Grow heap (frag case) to 11.070MB for 281896-byte allocation\n[INFO][WindowManager( 88)] createSurface Window{415534d0 com.eagledevelopers.sigep/org.appcelerator.titanium.TiActivity paused=false}: DRAW NOW PENDING\n[WARN][InputManagerService( 88)] Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@4151f340 (uid=10021 pid=209)\n[INFO][ActivityManager( 88)] Displayed com.eagledevelopers.sigep/org.appcelerator.titanium.TiActivity: +3s720ms (total +3m13s628ms)\n[INFO][TiAPI ( 704)] ACS Request: { url: \"users/show/me.json\", verb: \"GET\", secure: YES, data: {} })\n[INFO][TiAPI ( 704)] GET: https://api.cloud.appcelerator.com/v1/users/show/me.json?oauth_consumer_key=UDRvNZOqjCl1qy5gIixQY2kI4csMl1n6&suppress_response_codes=true\n[INFO][TiAPI ( 704)] header: {\"Authorization\":\"OAuth realm=\\\"\\\",oauth_version=\\\"1.0\\\",oauth_consumer_key=\\\"UDRvNZOqjCl1qy5gIixQY2kI4csMl1n6\\\",oauth_signature_method=\\\"HMAC-SHA1\\\",oauth_nonce=\\\"0WItGJwlUH0HTJi\\\",oauth_timestamp=\\\"1357154501\\\",oauth_signature=\\\"WCKs9U2vN2TOTsRx0AlbO9CG4jg%3D\\\"\"}\n[INFO][TiAPI ( 704)] data: {}\n[INFO][ActivityManager( 88)] START {cmp=com.eagledevelopers.sigep/org.appcelerator.titanium.TiActivity (has extras)} from pid 704\n[WARN][WindowManager( 88)] Failure taking screenshot for (180x320) to layer 21015\n[INFO][TiAPI ( 704)] ACS Request: { url: \"chats/get_chat_groups.json\", verb: \"GET\", secure: YES, data: {} })\n[INFO][TiAPI ( 704)] GET: https://api.cloud.appcelerator.com/v1/chats/get_chat_groups.json?oauth_consumer_key=UDRvNZOqjCl1qy5gIixQY2kI4csMl1n6&suppress_response_codes=true\n[INFO][TiAPI ( 704)] header: {\"Authorization\":\"OAuth realm=\\\"\\\",oauth_version=\\\"1.0\\\",oauth_consumer_key=\\\"UDRvNZOqjCl1qy5gIixQY2kI4csMl1n6\\\",oauth_signature_method=\\\"HMAC-SHA1\\\",oauth_nonce=\\\"4aNbhFt9RzJRU5q\\\",oauth_timestamp=\\\"1357154502\\\",oauth_signature=\\\"2ioClyZs1x6zWcjfktBe1he6J4M%3D\\\"\"}\n[INFO][TiAPI ( 704)] data: {}\n[INFO][WindowManager( 88)] createSurface Window{416a1548 com.eagledevelopers.sigep/org.appcelerator.titanium.TiActivity paused=false}: DRAW NOW PENDING\n[INFO][dalvikvm( 88)] Jit: resizing JitTable from 4096 to 8192\n[INFO][ARMAssembler( 36)] generated scanline__00000077:03010104_00008001_00000000 [ 89 ipp] (110 ins) at [0x41d78450:0x41d78608] in 6062128 ns\n[INFO][ActivityManager( 88)] Displayed com.eagledevelopers.sigep/org.appcelerator.titanium.TiActivity: +1s409ms\n\n\n\nFastDev\n[INFO] [2013-01-02 14:21:40,848] ui/handheld/ui/handheld/ChatWindow.js exists: false\n[INFO] [2013-01-02 14:21:40,934] get ui/handheld/ChatWindow.js: C:\\Users\\rg0649\\My Documents\\Titanium_Studio_Workspace\\SigEp Beta\\Resources\\ui/handheld/ChatWindow.js\n[INFO] [2013-01-02 14:21:41,605] ui/handheld/ti.cloud.js exists: false\n[WARNING] [2013-01-02 14:21:41,683] get ti.cloud.js: path not found\n\n", "updateAuthor": { "name": "nitrag", "key": "nitrag", "displayName": "Ryan Gartin", "active": true, "timeZone": "America/New_York" }, "created": "2013-01-02T19:33:26.000+0000", "updated": "2013-01-02T19:33:26.000+0000" }, { "id": "233208", "author": { "name": "nitrag", "key": "nitrag", "displayName": "Ryan Gartin", "active": true, "timeZone": "America/New_York" }, "body": "I have done a clean install from the ground up on a new computer which has never before seen Titanium. Brand new Java 1.7_10 JDK, latest Ti Studio, 3.0GA Mobile SDK. All fresh. It still does not work.\n\nI am able to get SDK 3.0 cloud working with script below on emulator only. If I build to emulator it works, without touching anything else and building straight to device it fails (no response issue). Now I then changed SDK to 2.1.4GA and build to device. Works. It works only on device using SDK 2.1.4GA or lower. Both SDK's work on emulator on new machine, not the old one though.\n\nUsing this simple code below, nothing fancy:\n\nfunction ApplicationWindow(title) {\n\tvar self = Ti.UI.createWindow({\n\t\ttitle:title,\n\t\tbackgroundColor:'white'\n\t});\t\n\tvar Cloud = require('ti.cloud');\n\tCloud.debug = true;\t\n\tvar button = Ti.UI.createButton({\n\t\theight:44,\n\t\twidth:200,\n\t\ttitle:L('openWindow'),\n\t\ttop:20\n\t});\n\tself.add(button);\n\t\n\tbutton.addEventListener('click', function() {\n\t\t//containingTab attribute must be set by parent tab group on\n\t\t//the window for this work\n\t\tTi.API.info('acs start');\n\t\tCloud.Users.login({\n\t\t\tlogin: 'tesf',\n\t\t\tpassword: 'ajd'\n\t\t}, function(e) {\n\t\t\tif(e.success) {\n\t\t\t\t\n\t\t\t} else{\n\t\t\t\talert('Error:\\n' + ((e.error && e.message) || JSON.stringify(e)));\n\t\t\t}\n\t\t\t\n\t\t});\n });\n\t\n\treturn self;\n};\nmodule.exports = ApplicationWindow;\n", "updateAuthor": { "name": "nitrag", "key": "nitrag", "displayName": "Ryan Gartin", "active": true, "timeZone": "America/New_York" }, "created": "2013-01-03T20:41:41.000+0000", "updated": "2013-01-03T20:41:41.000+0000" }, { "id": "236310", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Can you verify that the callbacks are working as expected. Please test on: SDK build: 3.0.2.v20130121111701", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-01-28T21:56:57.000+0000", "updated": "2013-01-28T21:56:57.000+0000" }, { "id": "236318", "author": { "name": "sandtonio", "key": "sandtonio", "displayName": "Antonio Sandoval", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This bug is fixed, thanks.", "updateAuthor": { "name": "sandtonio", "key": "sandtonio", "displayName": "Antonio Sandoval", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-28T22:10:59.000+0000", "updated": "2013-01-28T22:10:59.000+0000" }, { "id": "281002", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "DUP issue. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-11-24T22:29:53.000+0000", "updated": "2013-11-24T22:29:53.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }