Тема: Invalid service when requesting units or user
Hi,
I use wialon sdk within backbone+requirejs+jquery mobile mobile application.
Every time I switch to page that has wialon login
wialon.core.Session.getInstance().login(username, password, "", // try to login
function (code) { // login callback
// if error code - print error message
if (code) {
console.log(wialon.core.Errors.getErrorText(code));
return;
}
console.log("Logged successfully");
});
I receive error code 2 or Invalid service error.
But when I refresh the switched page I successfully log.
Do you have any idea what could be the reason for this behaviour?