Error in callback from acs with Alloy

You must Login before you can answer or comment on any questions.

I’m working in an app that has a log in and a home screen.I'm using acs to log in. . On Android, problem is on the response from acs for authentication, no matter it’s an error or a success, callback isn't working.

On iOS, ACS callback is working OK.

Titanium SDK: 3.0.0.GA


var Cloud = require('');
Cloud.debug = true;
exports.login = function(args){      
        login: args.username,
        password: args.password
        }, function (e) {                
            if (e.success) {
var cloud = require('cloud');
var user = Alloy.Models.user;
            username : args.username,
            password : args.password,
            success: function(user){
            error: function(error){
    error: function(){
        alert('Error en los datos');
var HANDLERS = ['success', 'error'];
var handlers = {};
exports.setHandlers = function(args) {
    _.each(HANDLERS, function(h) {
        if (args[h]) {
            handlers[h] = args[h];
function submit(){
    if($.username.value && $.password.value){
        if(handlers['success']) handlers['success']({
            username: $.username.value,
            password: $.password.value
        if(handlers['error']) handlers['error']();

— asked 3 years ago by Antonio Sandoval
  • I'm having same issue. Logs show that ACS received/processed/returned the data but app not doing anything with response. Thread here

    — commented 3 years ago by Ryan Gartin

  • Are you working with Alloy too?

    — commented 3 years ago by Antonio Sandoval

  • Negative.

    — commented 3 years ago by Ryan Gartin

2 Answers

I change the SDK version to 2.3 and it worked

— answered 3 years ago by Antonio Sandoval
answer permalink
  • Interesting...pumping down to 2.1.4 didn't fix it. But once I bumped down to 2.1.3 it works. But as soon as I go back to 3.0 it breaks. Who can submit a bug report on this?

    — commented 3 years ago by Ryan Gartin

  • Reported:

    — commented 3 years ago by Antonio Sandoval

  • Fixed in latest SDK, 3.0.2. Thanks Appcelerator team!

    — commented 3 years ago by Ryan Gartin

  • Show 3 more comments

In studio, go to Help and click on "Install Specific Titanium SDK". Copy and paste link for respective .zip file from this site

Your Answer

Think you can help? Login to answer this question!