Backendless Support
 
In Progress

Null point exception when trying to log in

I'm getting an error when I try to log in with my android app. It started to happen when I deleted manually all user record in backendless console.

$backendlessFBLogin$1: facebook login error: BackendlessFault{ code: 'Server.Processing', message: 'java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException', detail: 'java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException' }

The same error is returned for facebook login as well

Leave a Comment

Comments (9)

photo
1

Hi Karol,

please provide us with your App ID and sample code that does login to reproduce this problem.

photo
1

app id: 3CEC2E00-5426-C827-FF96-1C345A654100

the code is the same and unchanged based on your examples. Just try to log in. Based on the error returned by the server it's a bug on the backend.

photo
1

Hi Karol,

The problem has been fixed, please verify.

photo
1

Thanks Sergey, the app is working now. I have reported this issue for the third time now. Could you fix it? I guess it doesn't happen often because it's related to complete data deletion but it can definitely block the development process...

photo
1

Do you have specific steps to consistently reproduce the error? If you manage to do the same on the new app, it'd definitely help us find the cause and fix it. For now, we're still looking into circumstances which could result in the error, but since the issue isn't frequent among all the users it's not prioritized enough to investigate deeper and usually the fix has to be manual.

photo
1

I think it's very easy to reproduce. You need to create a relation with some table and User table. Add some data, then delete all... It will fail when you try to add new data. It happened to me every time I did that. I can reproduce it for you when you gonna look into this issue.

photo
1

I couldn't reproduce this on a new app, here's what I did:

  1. Created a test table "MyTable"
  2. Created a one-to-many relation from Users to MyTable
  3. Created a user in Users table
  4. Created 3 rows in MyTable table
  5. Added relation from the user in Users table to that 3 rows in MyTable table
  6. Checked and deleted 3 rows from MyTable table

..and no NullPointerException on login after that.

Have you tried the same steps on a new app? Or even if it only reproduces in your current app, can you please provide the exact steps similar to above?

Thanks in advance!

photo
1

Thank you Sergey. I think what you are missing in your steps is to delete all the users as well. When I do that in my app I'm not able to create new user anymore. I'll try to prepare so simple example for you.

BTW are you able to check where was the null pointer thrown in backendless backend? I think that would give you the final answer what was really wrong. I can reproduce it for you with my app if you need. Many thanks for your help.

photo
1

Sure I can see where the NullPointerException happens, and I can also see that it's caused by an inconsistency in the database. Thus I can add a special ignoring handler for NPE right on this line, but that would only hide the problem, not fix it.

Just recently I've been working on a fix for this same inconsistency but with a different use-case. That work is still in progress, but there is a possibility it might also fix your use-case.

Anyway, it would be very useful if we could investigate your specific use-case, too, and probably it would even help to find a better solution for that other problem I mentioned.

That said, if you could reproduce the error and describe the specific steps for that, it would really be of much help for us!

photo