I am no longer able to save a smartapp. I have an existing app (compiled successfully before) that if I open, do not modify, and hit save, I receive an error.
groovy.lang.MissingPropertyException: No such property: id for class: java.lang.String
I tried commenting out all potentially offending lines, all the way down to a barebones app, and still receive this error. This caused me to try creating a new smartapp. When I create one, and do not modify anything from the default boilerplate code, I still receive this error.
Hi Tim… Welcome you and “Josh.ai” to the SmartThings Community!!! (Love your blog…).
The SmartThings platform sometimes has a glitch that will go away after a while, so it is worth waiting and trying again.
I’ve also had success after seeing this type of error, of just closing out all sessions and the browser, and then entering the IDE as cleanly as possible.
Then … well… if you can save one of the SmartApps from the list of “Templates”, then there just could be some syntax that is technically correct, but the compiler is choking on it anyway.
Feel free to post the code and/or let me know if I should private message you.
Is the category in the metadata empty? I’ve noticed this too - “My Apps” as the category and save, that should fix it.
Terry - Thanks! I’m glad you like our blog! We try our best to make it interesting while still getting some real work done
Jim - This fixed it! If I went into the app settings (UI area) all of those fields were grayed out and I can’t edit them. I can’t remember if it used to be like that. But I was able to change it in the code, and once I updated it there the “new blank” app saved fine.
Oddly, if I looked at the settings in my existing app which would no longer save. Category already said “My Apps”, but in the code, it was a blank string. I updated it there and it worked. Seems like a bit of a bug, but at least it’s working again.
I was able to create an app without a category and ran into this issue. Seems like this could be avoided by requiring the category field on creation and/or improving the error handling to through an error that suggests fixing the category.