Start a new topic

Issue in /login with invalid credential (3.3.2)

I updated the kinvey angular sdk from 3.2.2 to 3.3.2 and an issue started happening.

 

Logging in with invalid credentials gives an error with message: “TypeError: Cannot read property 'then' of null”.


Here is the code I test.

 

$kinvey.User.login(data.username, data.password)

  .then(function () {

  $log.log('EVENT : auth.login -> success');

 

  //login successfully

  $rootScope.$broadcast('auth.login.success');

  }, function (error) {

 

  $log.log('ERROR LOGIN')

  ModalNotification.alert({

  title: 'Authentication issue',

  message: error.message

  }).then(function () {

  $log.log('EVENT : auth.login -> error');

 

  // error login

  $rootScope.$broadcast('auth.login.error', 'error');

  });

 

  })

 

3.2.2 error object


LkGgoJKiSMOZIqtVr2DlbtVTIQ3ZXiIuTQ.png


3.3.2 error object


j6FqPsJvRV_-5NU6sVirTgwugwtxgajSHQ.png




Issue resolved :) Thank you for a quick response. 

Hi,


We have fixed invalid credentials callback issue in the latest release of HTML5 SDK - v3.3.4. It is available for download here: http://devcenter.kinvey.com/html5/downloads


Can you please try it out and confirm that it works for you?



Regards,

Wani


1 person likes this

Hi Wani


I was using Firefox 47. But...have since tested again on another machine and it is working thank you. I was out on site and I think the environment was pretty secure, not sure why request are not getting through properly. Ignore Firefox comment, sorry.


 Issue remains for incorrect error response to invalid credentials. 


Cheers Wani

Hi Phil,


I tested login with latest Firefox (50.1.0) with HTML5 SDK v3.3.3 for http://devcenter.kinvey.com/html5/samples/starter and it worked for me.


Can you try the same?



Regards,

Wani

Hi Wani

Additional information: I am getting this error with VALID credentials using when testing with Firefox. I cannot log in using Firefox at all.

image

Cheers
Phil

 

Great thanks Wani. Keep up the awesome work :)

Hi Wonkun and Phil,


I am sorry for the inconvenience. The Engineering team is actively working on this.


I fully expect this to be resolved in the next release. I will keep you posted as it happens.



Regards,

Wani

Kinvey Support

Plus one here, frustrating issue trying to catch an response that is guaranteed to be created by users. 


@WonkunKim this is bad but this is the only way have worked around it atm.   

switch(error.name){
        case 'ActiveUserError': 
            //deal with logged in user
          break;
        case 'TypeError':
             //user feedback credentials are wrong and hope nothing else throws this error.
            break;
        default: 
             //error handling
}

  

I tested this with v3.3.3 and this issue still exists.


1 person likes this

Hi,


I am able to reproduce this issue. I have escalated this to the Engineering team as well.


I will keep you posted on the progress we make.



Regards,

Wani

Kinvey Support


MLIBZ-1551

Hello Wankun,


Thank you for reporting this error. We will look into it and get back to you shortly.


Regards,


Billy Gee

Login or Signup to post a comment