loginWithFacebook: IllegalArgumentException: value == null

Using Backendless 3.0.17.1.

I run this code:

  static final HashMap<String, String> FIELD_MAPPINGS = new HashMap<String, String>() {{
    put("id", "facebookId");
    put("email", "email");
    put("first_name", "firstName");
    put("last_name", "lastName");
    put("name", "fullName");
    put("name_format", "nameFormat");
  }};


  static final List<String> PERMISSIONS = Arrays.asList("public_profile", "email");
  [...]
  Backendless.UserService.loginWithFacebook(FXActivity.getInstance(), null, FIELD_MAPPINGS, PERMISSIONS, onLoggedInHandler(successCallback, errorCallback), true);

And I get this exception:

07-09 13:37:42.671  5701  5701 W System.err: java.lang.RuntimeException: BackendlessFault{ code: 'IllegalArgumentException', message: 'value == null' }
07-09 13:37:42.671  5701  5701 W System.err: 	at ch.mavor.challenger.auth.AbstractBackendlessAuthenticationService$2.handleFault(AbstractBackendlessAuthenticationService.java:62)
07-09 13:37:42.671  5701  5701 W System.err: 	at com.backendless.UserService$8.handleFault(UserService.java:774)
07-09 13:37:42.671  5701  5701 W System.err: 	at com.backendless.UserServiceAndroidExtra$4.handleResponse(UserServiceAndroidExtra.java:178)
07-09 13:37:42.672  5701  5701 W System.err: 	at com.backendless.UserServiceAndroidExtra$4.handleResponse(UserServiceAndroidExtra.java:157)
07-09 13:37:42.672  5701  5701 W System.err: 	at com.backendless.social.BackendlessSocialJSInterface$1.run(BackendlessSocialJSInterface.java:56)
07-09 13:37:42.672  5701  5701 W System.err: 	at android.os.Handler.handleCallback(Handler.java:739)
07-09 13:37:42.672  5701  5701 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:95)
07-09 13:37:42.672  5701  5701 W System.err: 	at android.os.Looper.loop(Looper.java:148)
07-09 13:37:42.672  5701  5701 W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:5417)
07-09 13:37:42.672  5701  5701 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)
07-09 13:37:42.672  5701  5701 W System.err: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
07-09 13:37:42.672  5701  5701 W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

No idea how I could debug this myself :frowning:

Hi Michel,

Try downloading the Android SDK sources from GitHub and putting a debug breakpoint in BackendlessSocialJSInterface class, processHTML method. The stacktrace tells that the error originates there, this way you could find more information on what you’re doing wrong.