Support Topics Documentation Slack YouTube Blog

FAULT = '3011' [Property 'password' is required] (iOS SWIFT)


(Moussa Haidous) #1

Hello,

I’ve been trying to register a user from my app but I seem to always get an error, although a few days ago it would work perfectly, now it doesn’t…

func Register(email:String, username:String, password:String, age:String, gender:String, profilePicture:UIImage?){
newUser.email = email
newUser.password = password
newUser.setProperty("username", object: username)
newUser.setProperty("age", object: age)
newUser.setProperty("gender", object: gender)
backendless.userService.registering(newUser, response: { (user:BackendlessUser!) in
self.loginUser(username, password: password)
}) { (fault:Fault!) in
print("Registering Failed. \(fault)")
}

That function gets called when the user clicks a button, but I’ve noticed that if I call that function from viewDidLoad() the user registers with no errors… I even tried hardcoding the username, password, and all the fields but nothing seems to work…
Any type of help is highly appreciated.
Thank you!


(Vitaly Vengrov) #2

What kind of error do you get ?


(Moussa Haidous) #3

FAULT = ‘3011’ [Property ‘password’ is required]
The app crashes as well…

Though password is not nil

Thank you!


(Vyacheslav Vdovichenko) #4

Moussa, please, provide your appId here or to support@backendless.com, we will investigate this issue with your app.


(Moussa Haidous) #5

The email has been sent

Thanks!


(Vyacheslav Vdovichenko) #6

Hi Moussa,

I cannot reproduce this issue with your code and app.
I have created a sample with your code:
http://support.backendless.com/public/attachments/264f7d0a70c89cb825ee4ddaac578d54.png</img>
and run it. Here is log
http://support.backendless.com/public/attachments/4e10c6b760aecf2279396d2d456b171b.png</img>
and a result in your app console:
http://support.backendless.com/public/attachments/f1a8130b886b2f04cafa78b2ea989b09.png</img>

Regards,
Slava


(Moussa Haidous) #7

Okay, I’ll see what I’ll need to do.

Thank you!


(Shaurya Kane) #8

did u manage to solve this one?? whats the solution