Android 2.2 Version App Update Breaks Thayers User Lock Manager 4.1.5

Received the update a few minutes ago and now it will not allow changes to the authorized users section of lock manager. When you attempt to make any change you receive a “You are not authorized to perform the requested operation” and then a Remove button underneath. This is serious because we have no way to manage our lock authorized users now. I uninstalled and reinstalled the app same result. I still have the old version on my tablet and it’s working fine… what next guys?

LOL join the discussion of the Android v2.2.2 update in the following post:

Best practice is to always avoid an App upgrade unless you have a way to rollback (I used Titanium Backup for Android).

Second best practice is to at least wait until there’s been some shakeout and feedback in the Community!

1 Like

For the second time I didn’t willingly update the app…didn’t even know an update was pending. My settings for app updates (which I need for other things I do) however made it possible for the app to update itself…

Yea I did thanks…

I definitely have this disabled for everything. Auto-update scares me a lot; even though I keep backups.

added to the first bug reports section in the community-created wiki. Continue to report individual problems to support, the wiki is just for community use and is not monitored by SmartThings staff.

http://thingsthataresmart.wiki/index.php?title=Bug:_First_Reports

Was not my first choice trust me…now trying to undo their magic…

Okay I rolled it back…thanks to my tablet still having the old…any rules against posting the old .apk here so people can save themselves from this nonsense?

2 Likes

I think it’s fine. And generous.

I don’t think you can upload to the forum, but you could use a shared link / Google drive whatever.

How did you roll back to the old revision you had on your tablet?

Yep, same issue here. Would appreciate if there was an update to help fix this. Thanks.

1 Like

Totally agree and in the meantime Smartthings should roll back to 2.2.1 officially through play store til they have a fix implemented.

And if it will help, here is the error from the log. Also I have two instances of the app installed - one with only one user and that works OK and one with multiple users, which is where it breaks. The 33333’s and the 4444’s that you see are the user list and I guess the ordinal number they are in.

bb676d07-c303-41cb-ae50-c8c3f20d3771  9:24:59 AM: error groovy.lang.MissingMethodException: No signature of method: static java.lang.Math.round() is applicable for argument types: (java.lang.String) values: [3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333]
Possible solutions: round(float), round(double), find(), rint(double), find(groovy.lang.Closure), random() @ line 306
bb676d07-c303-41cb-ae50-c8c3f20d3771  9:24:48 AM: error groovy.lang.MissingMethodException: No signature of method: static java.lang.Math.round() is applicable for argument types: (java.lang.String) values: [4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444]
Possible solutions: round(float), round(double), find(), rint(double), find(groovy.lang.Closure), random() @ line 306

Looks like the getUser method is failing, where it checks to ensure it is a round number and not a float:

def getUser(params) {
  def i = 1
  // Assign params to i.  Sometimes parameters are double nested.
  if (params.number) {
    i = params.number
  } else if (params.params){
    i = params.params.number
  } else if (state.lastUser) {
    i = state.lastUser
  }

  //Make sure i is a round number, not a float.
  if ( ! i.isNumber() ) {
    i = i.toInteger();
  } else if ( i.isNumber() ) {
    i = Math.round(i * 100) / 100   <=== This is where it breaks
  }
  state.lastUser = i
  return i
}

OK I fixed this temporarily by commenting out the piece of code which checks for a round number and not a float. What this means is that when adding users and number make sure you use a whole number (e.g. 3) and not a decimal (e.g. 3.6).

All you do is comment those few lines out. For those not comfy doing this, its pasted here for you a reference. For me this is line #'s 302 - 307 but it might be different for you.

def getUser(params) {
  def i = 1
  // Assign params to i.  Sometimes parameters are double nested.
  if (params.number) {
    i = params.number
  } else if (params.params){
    i = params.params.number
  } else if (state.lastUser) {
    i = state.lastUser
  }

  //Make sure i is a round number, not a float. //AMIT commenting this out.
  //if ( ! i.isNumber() ) {
  //  i = i.toInteger();
  //} else if ( i.isNumber() ) {
  //  i = Math.round(i * 100) / 100
  //}  //end of AMIT comment
  state.lastUser = i
  return i
}

Of course this is just a workaround and not the ‘real’ fix which does do a decent check to make sure an idiot like me doesn’t screw up in the app. :slight_smile:

If you save and publish for yourself, and restart the app and it should be good to go.

maybe a totally dump question from my side. Where did you implement this workaround? You are talking about Thayers User Lock Manager? Could this information also help for CoRE?

No dumb questions :slight_smile: - I had this published as a custom app, in the IDE (when you login to https://graph.api.smartthings.com/ide/apps) - so this is just editing that and then republishing it. I know of CoRE but not used it or don’t know how it integrates so can’t say.

From what (little) I know, it seems like a change in the signature which is causing this to break.

If you want most of your apps to auto-update, but want to prevent a few (such as SmartThings) from updating, in Play Store on the device, find the app, hit the overflow menu, and deselect Auto-update.