Unable to encode an unsaved parse file, working with ParseUser
You need to wait for the Parse file to finish saving before attempting to sign up the user. You need to do something like this:
photo = new ParseFile("userpicture.png", Image);
file.saveInBackground(new SaveCallback() {
public void done(ParseException e) {
// If successful add file to user and signUpInBackground
if(null == e)
savetoParse();
}
});