Cannot make changes to SmartApp as of yesterday


(Alex) #1

Hi,

I’m experiencing something that started happening since about mid day yesterday.

I’m not able to save my smart app anymore. Here’s what’s happening:

I create a new Smart App in the IDE from my code and save it, publish and run successfully.
Without making any changes, I click “Save” button again. I get error:
You have multiple inputs with the same name: [input title, input link]

I use the code from master branch of my dashboard:
https://github.com/625alex/ActiON-Dashboard/blob/master/app-v4/ActiON4SmartApp.groovy

This code has not been changed for the past 10 days and it runs successfully for many users. During last 10 days I had no problem saving changes to my SmartApp, including up until yesterday morning.

@mager, @Jim
Did something change, some time mid day yesterday, on the back end? Something to do with code validators maybe?


Dashboard Theming (Custom CSS) and Mounting Hardware Ideas
ActiON Dashboard 4.6.3 is here! (Now SmartTiles.click)
Android App (1.7)
ActiON Dashboard 4.6.3 is here! (Now SmartTiles.click)
(Jim Anderson) #2

We did recently make some enhancements to input name validation in the IDE. We will be discussing that in a release notes post shortly.

Do you have inputs with the same name?


#3

I’ve been looking for somewhere to post about this but didn’t want to start a thread. I was trying to edit Alex’s action dashboard and once I hit save nothing happens.


(Alex) #4

I don’t have inputs with the same name as such:

I think the problem is here:

 (1..10).each{
     def title = "dropcamStreamT$it"
     def link = "dropcamStreamUrl$it"
     section("Dropcam Video Stream $it") {
         input title, "text", title:"Title", required: false
         input link, "text", title:"URL", required: false
      }
  }

I have several similar blocks like above. This most certainly used to work…


(Jim Anderson) #5

It looks like you hit an edge case that we didn’t anticipate with our input name validation. We will file a bug report for this case, but in the meantime let’s make sure to get this working again.

In a few spots you have “input title” and “input link”, where title and link are variables. Our validation is seeing these as duplicates. If you change the variable names so they will always be unique, that should get you past this problem.

Let me know if that works.

Sorry for this inconvenience!


(Alex) #6

Ok, I will try that.
Thanks for your help.

I got really worried that I would have to rename my actual inputs. In this case the app would not be upgradable anymore.

Thanks for looking into this!


(Geko) #7

I’ve been having the same issue since February 17th upgrade.

I’d seriously question the wisdom of doing validation in such a superficial manner.


Smart Alarm 2.4 Is Available
(Alex) #8

I work on my app every day and there was no problem until after yesterday morning…


(Geko) #9

Maybe it’s a different “corner case” :smile:


(Alex) #10

There is a lot of corners


(Alex) #11

This worked. Although it is not a reasonable requirement for local variables to be unique.

Oh well, as long as it works.


(Jim Anderson) #12

I don’t disagree. Just wanted to make sure you got unblocked before we can address any underlying issue.


(Jonathan) #13

Jim, any updates on fixing the underlying issue? In addition to what was reported above, the new input validation seems to break several of the published smart apps (e.g. “Bright When Dark And/Or Bright After Sunset” and “ModeOnUnlock”).

Thank you!


(Jim Anderson) #14

Hey guys, we have a bug report filed. Until it gets fixed (I’ll follow up here when it does), you’ll have to use the workaround of not using the same variable name as an argument to the input method.

Thanks for your patience all.


(DLee) #15

This is a real blocker. I think it would be better to revert the validation change until it is fixed. I’m sitting here blocked trying to modify my dashboard code in a way that I can merge with Alex’s future releases. Having each developer rename all the duplicate variables differently is going to cause recurring pain and problems for developers and shared code. I’m going to stop my project until this bug is fixed. I think you should revert this change unless the fix is releasing tomorrow morning.

@625alex I was trying to test a proof of concept use of the Thingspeak dynamic google gauge plugin within the dashboard. I thought of a way to try this along with energy history charts… oh well.


(Alex) #16

I just committed a fix for this problem. You should be able to save the changes.


(Alex) #17

I pushed another fix. That was my bad…


(Benny Alvey) #18

I get the "You have multiple inputs with the same name: [input “lights”, input “dimmers”, input “level”, input “motionSensor”, input “delayMinutes”, input “lightSensor”, input “luxLevel”, input “sunriseOffsetValue”, input “sunriseOffsetDir”, input “sunsetOffsetValue”, input “sunsetOffsetDir”, input “zipCode”] " error when trying to save “Bright When Dark And/Or Bright After Sunset”


(Mark S Groves-Zen Studios) #19

I was also getting the same error as Alex. I ignored it and it seems to work.


(Jim Anderson) #20

Last Friday’s release include a change to revert the change that flagged duplicate inputs on save. Note that actually having duplicate input names is still invalid; it will just fail at run-time now (as it did prior to the IDE change). Thanks!