ParseUser SignupInBackground方法总是返回ParseException(TypeError)

时间:2015-11-18 06:22:51

标签: android parse-platform

我有一个ParseUser的子类,它有以下方法:

void Register(String email, final String password, final EditText[] inputs){
    final CRUser user = new CRUser(this, email, password, null, null);

    user.signUpInBackground(new SignUpCallback() {
        @Override
        public void done(ParseException e) {
            hideProgressToast(e == null);
            if (e == null) {
                doRegistrationRelatedTasks(user, password);
            } else {
                handleRegistrationError("Failed to Register", ParseExceptionWrapper.getErrorMessageForRegistrationError(e), inputs);
                AppDebugLogWriter.dumpException(e);
            }
        }
    });
}

使用的构造函数如下所示:

public CRUser(Context context, String email, String password, String firstName, String lastName)
{
    super();

    setEmail(email);
    setUsername(email);
    setFirstName(firstName);
    setLastName(lastName);
    setPassword(password);
}

这段代码完美地运行了6个多月,但突然停止了工作。现在它在回调中返回ParseException。这是StackTrace:

reason: TypeError: Cannot read property 'facebook' of undefined
 at Object.Validation.validateValuesExist.success (objects/user.js:222:28)
 at Object.exports.validateValuesExist (service/validation.js:21:18)
 at Object.exports.handleBeforeSave (objects/user.js:201:16)
 at main.js:338:19
com.parse.ParseRequest$ParseRequestException: TypeError: Cannot read property 'facebook' of undefined
 at Object.Validation.validateValuesExist.success (objects/user.js:222:28)
 at Object.exports.validateValuesExist (service/validation.js:21:18)
 at Object.exports.handleBeforeSave (objects/user.js:201:16)
 at main.js:338:19
 at com.parse.ParseRequest.newPermanentException(ParseRequest.java:391)
 at com.parse.ParseRESTCommand.onResponse(ParseRESTCommand.java:197)
 at com.parse.ParseRESTUserCommand.onResponse(ParseRESTUserCommand.java:114)
 at com.parse.ParseRequest$3.then(ParseRequest.java:258)
 at com.parse.ParseRequest$3.then(ParseRequest.java:254)
 at bolts.Task$10.run(Task.java:486)
 at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:97)
 at bolts.Task.completeAfterTask(Task.java:482)
 at bolts.Task.continueWithTask(Task.java:358)
 at bolts.Task.continueWithTask(Task.java:369)
 at bolts.Task$8.then(Task.java:415)
 at bolts.Task$8.then(Task.java:407)
 at bolts.Task$10.run(Task.java:486)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
 at java.lang.Thread.run(Thread.java:818)

iOS上也会出现同样的错误。

0 个答案:

没有答案