Problem with beforeSocialRegister. In debug work good, but in production server return fault “argument type mismatch”. I can not understand what could be the problem.
Research
results: the code is not executed at all, since in the presence of only
one throw new BackendlessException still returns the same error
“argument type mismatch”.
This is the code of my handler:
public class GenericUserEventHandler extends com.backendless.servercode.extension.UserExtender {
private static final String COUNTER_NAME = "UserIdCounter";
@Override
public void beforeSocialRegister(RunnerContext context, Map<String, String> userProperties, SocialType socialType) throws Exception {
IAtomic<Integer> userIdCounter = Backendless.Counters.of(COUNTER_NAME, Integer.class);
Integer newId = userIdCounter.getAndIncrement();
userProperties.put("id", String.valueOf(newId));
}
}