Support Topics Documentation Slack YouTube Blog

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

(Moussa Haidous) #1


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?){ = 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, we will investigate this issue with your app.

(Moussa Haidous) #5

The email has been sent


(Vyacheslav Vdovichenko) #6

Hi Moussa,

I cannot reproduce this issue with your code and app.
I have created a sample with your code:</img>
and run it. Here is log</img>
and a result in your app console:</img>


(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