FAULT = '3027' [Unknown error: null] <Unknown error: null>

Hi, I try to use the following code to update user, but I got error: FAULT = ‘3027’ [Unknown error: null] <Unknown error: null>

let currentUser = Backendless.sharedInstance().userService.currentUser;
currentUser.setProperty(“name”, object: “Five888”)

let dataStore = Backendless.sharedInstance().data.of(BackendlessUser.ofClass())
// update object asynchronously
dataStore.save(
currentUser,
response: { (result: AnyObject!) -> Void in
let updatedUser = result as! BackendlessUser
print(“User has been updated: (updatedUser.objectId)”)
},
error: { (fault: Fault!) -> Void in
print(“Server reported an error (2): (fault)”)
})
the output is:
Server reported an error : FAULT = ‘3027’ [Unknown error: null] <Unknown error: null>
name property is NOT Identity.

Could anyone tell me the reason? Thanks.

this error occurs on iOS platform.

Use userService.update method(…) instead data.save(…)

Hi, I used userService.update method before submitting this post. Same error with useService.update method.

If you take a look in Backendless Console at the Users > User Properties screen, one of the properties will have the “identity” radio button selected. What is the name of that property?

the identity is email.

and the method update failed, same with using data.save(…).
My code using update method is :

let currentUser = Backendless.sharedInstance().userService.currentUser;

currentUser.setProperty(“name”, object: “Five888”)

Backendless.sharedInstance().userService.update(currentUser,

           response: { ( user : BackendlessUser!) -> () in

           print("User has been updated")

        },

           error: { ( fault : Fault!) -> () in

           print("Server reported an error: \(fault)")

        }

    )

BTW,the SDK is downloaded from your official github url three days ago.

Thanks.

Could you please “print description of…” the currentUser variable before you call the “update” method? (this is the same as the “po” command in the debugger) and post it here?

Printing description of currentUser:

expression produced error: /var/folders/2g/xljth3k5235cbwjh9rs1p_jh0000gn/T/lldb/504/expr9.swift:1:80: error: use of undeclared type ‘__ObjC’

$__lldb__DumpForDebugger(Swift.UnsafePointer<Swift.ImplicitlyUnwrappedOptional<__ObjC.BackendlessUser>>(bitPattern: 0x118749dc0).memory)

                                                                           ^~~~~~

/var/folders/2g/xljth3k5235cbwjh9rs1p_jh0000gn/T/lldb/504/expr9.swift:1:45: note: while parsing this ‘<’ as a type parameter bracket

$__lldb__DumpForDebugger(Swift.UnsafePointer<Swift.ImplicitlyUnwrappedOptional<__ObjC.BackendlessUser>>(bitPattern: 0x118749dc0).memory)

                                        ^

(lldb)

It seem using ObjC but i do not use it, However I used other third-library sdk.

I just want to see what’s inside of your user object. How about a screenshot from the debugger showing all the properties in the object?

Printing description of currentUser.Some:

<BackendlessUser [<BackendlessUser: 0x7fdbd2f0ed10>]> {

"__meta" = "{\"relationRemovalIds\":{},\"selectedProperties\":[\"lastName\",\"created\",\"ownerId\",\"friends\",\"__updated__meta\",\"firstName\",\"password\",\"phoneNumber\",\"name\",\"___class\",\"location\",\"updated\",\"email\",\"objectId\"],\"relatedObjects\":{\"location\":[\"A9D31BA7-DB00-DBD2-FF7A-XXXXXXX000\"]}}";

created = "2016-05-11 23:17:11 +0000";

email = "jdfdafafafafdafa@xxxx.com";

firstName = Fiveda;

friends =     (

);

lastLogin = "2016-06-28 20:47:09 +0000";

lastName = Jddi;

location = "&lt;GeoPoint&gt; LAT:61.7712, LON:9.53529, distance:0, CATEGORIES:(\n), METADATA:{\n}, objectId = A9D31BA7-DB00-DBD2-FF7A-XXXXXXXXX00";

name = Five888;

objectId = "A02B047F-5412-07CD-FF52-XXXXXXXXXXXXX";

ownerId = "A02B047F-5412-07CD-FF52-XXXXXXXXXXXXX";

phoneNumber = "&lt;null&gt;";

updated = "2016-06-01 20:27:05 +0000";

"user-token" = "B9670A4B-037B-F1D3-FF71-XXXXXXXXXXXX";

}
I just changed some Ids and token :slight_smile:

Thanks!. What is “.Some” in “currentUser.Some” ?

yes, I think so. You know, Printing description of currentUser.Some:

it should be currentUser.Some

well, I do not why there is .Some. What do you mean?

I didn’t what you referred to when you said “currentUser.Some”. This is what it looks like for me:
http://support.backendless.com/public/attachments/b08a669835da1c59bb008ea2acb0be78.jpg&lt;/img&gt;

It does not really matter. Do you have auto-load enabled for the “location” and “friends” properties?

Mark

location :autoload, but I did not find friends property. I added it before.

What is your application id?