Cannot invoke "org.traccar.api.security.LoginResult.getUser()" because "loginResult" is null in version 5.12

Victor Butler9 months ago

Hi,

Has anything changed with regards to user registration in the latest version?

I am getting the following error after upgrading:

Cannot invoke "org.traccar.api.security.LoginResult.getUser()" because "loginResult" is null - NullPointerException (SecurityRequestFilter:93 < ... < OverrideFilter:49 < ...)

There is no difference between the POST request done over HTTP or HTTPS.

Screenshot from Postman

I cannot see any difference in the HTTP request between the older Traccar version and the new one.
I am using a custom API but the code was NOT changed, except to add the new variable totpKey.

This fix on Github seems like part of the problem:
Here

Anton Tananaev9 months ago

The issue should be already fixed on master.

Victor Butler9 months ago

Is it this one?

Anton Tananaev9 months ago

I don't think so. I'm pretty sure it was a bigger change.

Victor Butler9 months ago

Right, I will look for the exact code later.

QQ, now running version 5.12. I will build the server and modern web app from master:

  • Should I only replace the tracker-server.jar for the server or do I need anything else when upgrading to the latest code?
  • For web app it's clear, it's only the modern folder content that needs to be replaced.
Anton Tananaev9 months ago

Should I only replace the tracker-server.jar for the server or do I need anything else when upgrading to the latest code?

You should replace everything, not just JAR.

Victor Butler9 months ago

So:

  • from target folder I get replace with the lib folder + the JAR file.
  • schema folder
  • templates folder
  • modern build

Anything else?

Anton Tananaev9 months ago

That sounds correct.

Victor Butler9 months ago

Thanks man!