Suddenly all my users were un-logged with "Not existing user token" error

Suddenly, today, all my users were un-logged and couldn’t access some features in my application because all the requests to Backendless begin to fail with an error like this:
“Not existing user token - 3950CF88-007D-E484-FF52-51EC355C1000. Relogin user to update your user token”
My application worked without problems until now, for months :slight_smile:
It was my bad that I didn’t implement a logic to check if the authentication tokens are still valid and ask the users to re-login because I thought that if I disable Session Timeout in the Backendless Dashboard then the sessions will never time out and become invalid. I will fix this in my application with a hotfix, soon.
I would like to ask if this was only a single incident or I should be prepared for these kind of situations. I wouldn’t like to ask the users to re-login too frequently if they are already logged in. Please note that I disabled the Session Timeout in the Backendless Dashboard.
Thanks and best regards,
Istvan

1 Like

Also, tried to implement the logic to validate the user token like this:

[[Backendless sharedInstance].userService isValidUserToken:^(NSNumber *result) {

} error:^(Fault *fault) {

}];

But I receive the following fault:
details : “A license is needed to use a library. Contact Midnight Coders Sales to purchase the license”
message: “License is not found”

I would like to ask if there were some changes on your side regarding this whole login logic?

Thanks and best regards,
Istvan

Same sudden problem here!
I have an Android app and this happened to me too… Also, I was using 5 atomic counters, which are all in 0 suddenly.

What’s going on?
Thanks!

For the iOS SDK, calling

Backendless.sharedInstance().userService.findById I get error “Not existing user token - ---. Relogin user to update your user token”, just got the error today but changed nothing, I check in the login setting enable session timeout is off

Guys, we are looking into it.

Regards,
Mark

Thanks. It will be great to have some kind of an update so that we know the issue and we are ready to make changes.

Thanks Mark!

Something happened today which made our app crash when a user opened the app. After reading this, I am sure it was that the user was un-logged. It was a live version so we didn’t see any error code. Can you provide some code for swift which will help us to ask the user to login again? Or something to check and prevent the app from crashing?

Maybe you don’t use try/catch (tryblock/catchblock for swift) for sync calls?

Hi Istvan,

We cannot reproduce this issue with our sample project (see in attachment).
Please try it with your appId and secretKey, how it will be work for you.

Regards,
Slava

TestValidUserToken.zip (20.55MB)

Hi Slava,

Thank you for trying to reproduce my problem.

I didn’t try, yet, your test project, but made some quick tests with my application and I can confirm that the user validation API works if I am logging in with a user now.

But it seems that it is not working for the users who were logged in before yesterday.

I would like to ask that how we should handle exactly that asynchronous user validation call? It should return a boolean in the ‘result’ parameter indicating that the user token is still valid or not? Or we should handle the case when the request fails, too?

For example for a user who was logged in before yesterday, that asynchronous call returns a fault for me: sometimes “Not existing user token” and sometimes “License is not found” (I need to investigate more here, but I will get back to you with more concrete results later). I think we should handle these server errors, too.

Anyway, I am catched with some things now, but I will try your test project this night and will get back to you with more results. So, wait until tomorrow, because I want to see if there is something I am missing here.

Thank you very much,
Istvan

Only one further note: I think I will ask the users to re-login if the token validation request returns NO or if it fails with the “Not existing user token” error. I think this will solve my problem. However, I still need to figure out in which cases I receive the “License is not found” error. I will get back to you if I find something.

Thank you again for your time,
Istvan

We are also using the Facebook SDK for Facebook login and users who were previously signed in through Facebook can’t even logout and then log back in now.

The only way for them to use the app is for them to delete it and redownload it.

An internal ticket has being created in order to investigate this issue (BKNDLSS-13114)

We’ve checked this case and the issue does not reproduce.

A logged in user is able to log out even with invalid user-token.

My initial problem was that I assumed that the user-tokens will never expire if I disable the Session Timeout in the Backendless Dashboard. And one day, suddenly, all the requests started to fail at each user with the “Not existing user token” error. The problem was that I wrote my logic poorly and in that case the user couldn’t enter in the Account screen in my application to log out :slight_smile: So all my users remained with an useless application. The only solution was to delete and re-download the application (and re-login).

But I changed the logic to verify the user-token validity and ask the user to re-login if the user token is invalid or the token verification request returns the “Not existing user token” error.

So this is no longer an issue for me.

PS: I checked and the logout request worked for me, too, even if all the other requests returned the “Not existing user token” error.

That fixed our issue but now randomly, the app will go to the login screen and essentially log the user out. This happens when the app is being opened. Do you have any idea what it might be? It generally tends to happen when the app is in an area with less than perfect internet.

Guys,

same problem in IOS. This error is new (for me) and started one week ago suddenly…

complementing my previous comment,
a tip …
if I delete the app and reinstall again probelma disappears.

it very crazy

Rubens, please clarify: do you use isStayLoggedIn mode?