Start a new topic

Unable to Update User entity with api v3

I am unable to update the user entity using api v3. I have tested with v1 and update works as intended. 


Approach 1

1) User logged in 

2) Code (copied from guides):

<code>

var promise = Kinvey.User.update({

  "age": 21

});

promise = promise.then(function onSuccess(user) {

 console.log(user)

}).catch(function onError(error) {

  // ...

});

</code>

3) Result: 

kinvey-html5-sdk-3.3.2.js:36433 

Uncaught TypeError: Cannot read property 'client' of undefined



I even tried using the old approach 


Approach 2

1) User logged in 

2) Code (copied from guides):

<code>

var promise = Kinvey.User.update({

  "age": 21

});

promise = promise.then(function onSuccess(user) {

 console.log(user)

}).catch(function onError(error) {

  // ...

});

</code>

3) Result: 

kinvey-html5-sdk-3.3.2.js:36433 

Uncaught TypeError: Cannot read property 'client' of undefined


I updated a user entity using v1 api and all worked as intended. 


Am I doing something wrong???


Hi,


I was able to reproduce this issue with v3.3.3. I am working with the mobile team now to get this fixed.


As a workaround, following code should work for you:

 

var promise = Kinvey.User.update({
  "age": 21
},{});

 


Regards,

Wani

Kinvey Support

Great thank you for the super fast response Wani. Can you post when it is resolved so we can adjust code? Thank you 


Hi Phil,


This issue should be fixed with the latest release v3.3.5 available for download here: http://devcenter.kinvey.com/html5/downloads



Regards,

Wani

Great thanks Wani. Will check out ASAP

Login or Signup to post a comment