My project is working well and suddenly started giving this error so register a user. Can not return the currentUser. Nothing works. Have any solution for this?
Server reported an error: FAULT = ‘3900’ [User is missing or null] <User is missing or null>
I really need an answer. I did not do anything for this error happen. My project is in progress and if this is not resolved soon have to change API!
Hi Juliana,
Can you please provide your appid and request you are trying to execute.
Regards,
Denys
My APPID is 006AEF26-256E-AD68-FF3B-8815FB534C00 and the first request after login is:
Types.tryblock({ () -> Void in
let deviceId = backendless.messagingService.getRegistration().deviceId
if deviceId != nil {
let properties = ["deviceId" : deviceId]
backendless.userService.currentUser.updateProperties(properties)
backendless.userService.update(currentUser)
}
}, catchblock: { (exception) -> Void in
print("Server reported an error: \(exception as! Fault)") --> HERE REPORTED THIS ERROR
})
But if continue and request users, for example:
BackendlessCache -> invokeAsync: ‘com.backendless.services.persistence.PersistenceService’:‘find’ [policy: 0]
Internal ticket with id BKNDLSS-12927 has been created for this issue.
Regards,
Denys
Hi Juliana,
What Xcode version do you use?
Will these functions work for you?
- User registration:
func registerUser(email: String, password: String) {
Types.tryblock({ () -> Void in
var user = BackendlessUser()
user.email = email
user.password = password
user = self.backendless.userService.registering(user)
print("User has been registered (SYNC): \(user)")
},
catchblock: { (exception) -> Void in
print("registerUser: server reported an error: \(exception as! Fault)")
}
)
}
- User login:
func loginUser(email: String, password: String) {
Types.tryblock({ () -> Void in
let user = self.backendless.userService.login(email, password: password)
print("User has been logged in (SYNC): \(user)")
},
catchblock: { (exception) -> Void in
print("loginUser: server reported an error: \(exception as! Fault)")
})
}
Regards,
Slava
The only one case when fault == 3900 will be thrown with backendless.userService.update(user) is user == nil. See this code.
Xcode Version 7.3.1
My mistake is not in the registration or login… is the user update. But it returns the null user.
We need your full project to investigate the problem. Please upload it to Dropbox or Google Drive and send a link to support@backendless.com.
Also provide a step-by-step instruction how we could reproduce this issue.
Sorry, but I can’t send my code, and haven’t step by step, just your service stopped working. I do a registration/login and is not returned a user.
I created another application, but the problem was not that. The problem was because I was doing the registration / login and tried to access the backendless.userService.currentUser and does not return anything.
Now I get the user that the function returns. But as I said was working days ago.
Juliana,
I created a sample project with the latest Backendless SDK (pod ‘Backendless’ 3.0.31 release), which executes a registration/login/update operation with current user (see in attachment). It works for me.
Please load it with TestUserUpdate.xcworkspace, try it with my app, then set your appId & secretKey, and check again. How do it work for you?
Regards,
Slava
TestUserUpdate.zip (19.56MB)