java.lang.NullPointerException: Attempt to invoke virtual method 'void com.backendless.BackendlessUser.setPassword(java.lang.String)' on a null object reference

Are you looking for help?

This is a support forum for reporting issues related to Backendless services. Please note that due to our support policy we cannot provide you help with debugging your code, consulting in regards to any language or third-party library usage. For this kind of questions we recommend using more appropriate forums like Stack Overflow.

In order to suggest you a quality solution, we shall usually ask you to provide the details mentioned below first. Including them into your topic right away helps us to start investigating your issue much faster.

In case you have a suggestion or an idea, the details below are not always required, though still any additional background is welcome.

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


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

api 28

Application ID


Expected Behavior

Please describe the expected behavior of the issue, starting from the first action.

  1. A user record should be created.

Actual Behavior

Please provide a description of what actually happens, working from the same starting point.

Be descriptive: “it doesn’t work” does not describe what the behavior actually is – instead, say “the request returns a 400 error with message XXX”. Copy and paste your logs, and include any URLs.

  1. Logging in the Backendless seems to work as I have no error at that point.
  2. However setting a password fails.
  3. Upon debugging the UserService code, response is null… password and user name are set correctly. See screen showt…

Reproducible Test Case

Please provide a simple code that could be run in a new clean app and reproduce the issue.

If the issue is more complex or requires configuration, please provide a link to a project on Github that reproduces the issue.

See line 66 where the problem occurs…

I haven’t include my applicationid or api key, but they can be set int the Application Class

I have see other forum posts with the same error, but I do have dashes in my application id and api key.

Ok… I’ve downloaded someone else id and key and got a different message, I’m just wondering if there is an issue with my account :thinking:

In my case… my issue was simply that I had the wrong server… I’d selected eu… so…

    public static final String SERVER_URL = "";

I discovered this after generating some code…

Glad to here that now everything is working :slight_smile: