Start a new topic

Kinvey Login not working on HTML

Hi,


I have an issue while login into Kinvey that is only happening on my HTML code and not in my iOS


Surprisingly the code was working just fine if I am with Google Chrome logged in with my google account.


The moment I log out or I try the code in a different computer/browser then it doesn't work anymore. Below the code


 Kinvey.initialize({

      appKey: 'appKey',

      appSecret: 'appSecret' 

  }).then(function(activeUser){

  console.log("Kinvey was initialized");

  loginKinvey();

  }).catch(function(error){

  console.log("There was an error while initializing: " + error);

  });


 function loginKinvey(){

  var promise = Kinvey.User.login('myuser', 'mypwd').then(function onSuccess(user) {

  alert("User was loged successfully");

 }).catch(function onError(error) {

 console.log("error when login user: " + error);

 });

 }



I also tried by Login out and then login in again and the problem persists:

Kinvey.initialize({

      appKey: 'appKey',

      appSecret: 'appSecret' 

  }).then(function(activeUser){

  console.log("Kinvey was initialized");

  logOutKinvey();

  }).catch(function(error){

  console.log("There was an error while initializing: " + error);

  });


function logOutKinvey() {

  var promise = Kinvey.User.logout();

  promsie = promise.then(function onSuccess() {

  console.log("User was loged out");

  loginKinvey();

 }).catch(function onError(error) {

 alert("There was an error while tryng to logout");

  });

 }


 function loginKinvey(){

  var promise = Kinvey.User.login('myuser', 'mypwd').then(function onSuccess(user) {

  alert("User was loged successfully");

 }).catch(function onError(error) {

 console.log("error when login user: " + error);

 });

 }


Emilio,


What error are you seeing? Please send me the screenshot of the error.


Thanks,

Pranav

Kinvey

Hi Pranav,


Error is: "t: An error occurred."


is happens when the login Kinvey function have been called. Even when I log out the user


Kinsey is initialising properly


Best regards,

Emilio,

Can you provide details about which browser (versions), it is working and with which browser you are seeing an error? You mentioned that it is working with Chrome (hence just confirming).

Thanks,
Pranav
Kinvey

 

This works only on my account in google chrome and only when I am signed in with google


Never worked on a different browser or on a different chrome browser any version


My chrome version is 56.0.2924.87 (64-bit)

Safari Version 9.1.2 (11601.7.7)


Please advise what the issue could be

Emilio,

Can you send little more details about the error that you are seeing?


If you do Right Click ->Inspect and then view on the browsers debug console, does it show a more detailed error message (the call stack)? If possible, please send a screenshot of this detailed error.

Also what version of the Kinvey SDK are you using?

 

Thanks,

Pranav

Hi Pranav,


Kinvey version is 3.9.23

There is nothing in the call stack because it says the source is black boxed.


Please we have been with this issue very long time. Is it the cookies or something like that? How come is only working on google chrome only when I am logged with Google?


Best regards,

Emilio,

Can you please confirm the version again because the latest HTML5 SDK version is 3.4.1?

Thanks,

Pranav

Kinvey

Login or Signup to post a comment