Support Topics Documentation Slack YouTube Blog

Can't login on Android

Backendless Version (3.x / 5.x, Online / Managed / Pro )

backendless-4.0.1.jar

Client SDK (REST / Android / Objective-C / Swift / JS )

Android

Application ID

8B3C7D86-E56A-3ABB-FFDB-022CB59E6F00

Expected Behavior

I need ability to login user on Android on several devices. It’s worked fine more than 1 year and I didn’t changed nothing on my account.

Actual Behavior

BackendlessFault{ code: ‘3044’, message: ‘Unable to login. Multiple login limit for the same user account has been reached’, detail: ‘Unable to login. Multiple login limit for the same user account has been reached’ }

  1. I have two devices
  2. Login in one - ok, login on the second - receive an error 3044 on every time
  3. Some time before all worked fine

Reproducible Test Case

Just login on the first and second Android device with the same user.

Hello @oleg-tarashkevich

Try change login properties - Developer Console - Users - Login (Set up login properties)

@Vladimir_Yalovy Thanks for the reply. I don’t know what I need to change, because it works before and didn’t change any control. Please check the screenshot.

Hi @oleg-tarashkevich,

If your application logs in a user without logging out later on, then over time the same user will have multiple concurrent logins. This is because a single login would still be valid when the user closes the app. The server allows up to 10 concurrent logins, which means if you run the app 10 times, and login with the same user credentials, the limit would be exhausted.

This problem can be solved with the following approaches:

  1. Use persistent logins and when the app launches, check if the persistent login is still valid. If it is valid, then user does not login again, if it is not valid, then the user would need to login. If you do not use persistent logins, make sure to call logout when the user closes the app.

alternatively:

  1. Before you call the login API, call logout first. This will make sure that if there is an active user session, it will be terminated.

Btw, make sure to update Backendless SDK - version 4.0.1 is very old.

Hope this helps.
Mark

Hi @mark-piller,

Thank you for your suggestions! That helped!
I found that my app has a bug. The app sometimes tried to login when login process already running. I also added a check for the current user:

BackendlessUser user = Backendless.UserService.CurrentUser();
if (user == null) { }

Unfortunately, is too expensive to update sdk to 5 version. A lot of code should be changed and tested. Not sure that all be worked fine after migration right out of the box. Hope 4.0.1 will continue support the api calls properly.

Have a good day!