I’ve written a simple lighting automation legacy groovy app and have had a heck of time consistently getting through the install/update process without getting a ‘Something went wrong. Please try to install the SmartApp again.’ message. When I was first iterating on the app, it was often a problem in my code and live logging would spit out an exception. However, at this point, when these errors occur, there are no exceptions in the live logs. What’s odd is, without changing any code, sometimes I’ll make it through the setup pages successfully without doing anything differently than when it fails.
How can I troubleshoot this? Are there app logs for the iOS app itself that may be of use?
A couple of other things I’ve noticed regarding live logs:
Sometimes, ALL logs for my app in Live Logging will be [TRUNCATED]. Again, no code change and suddenly, the full logs will start emitting again.
Sometimes, some log lines appear to be missing from the live logs? For example, if there are 3 log events in code with no conditional logic gating them, I’ll sometimes see event 1 and event 3, but not event 2.
I can post code, but am first curious if there are general instabilities/issues in the aforementioned SmartThings systems (the SmartApp install process on the iOS app and live logging) that I should be aware of?
Hi, there! Sometimes, the complete logs are not shown in IDE because the number of events received is large, not only the SmartApp logs are received there.
So now, this error message during the installation is random, but before you had some errors that you corrected, right?
Have you tried to create a new SmartApp (with the same config but a different name) in the IDE?
There are some caching issues with SmartApps and DTHs that could be related to this behavior.
Anyhow, can you share your SmartApp code, please? I’ll take a look.
Thanks for your response. I didn’t try to create a new smart app, but I think my test cycle was typically:
Write code, save, and publish.
Install app and configure.
Find issue, update code, save, and publish.
Update configuration of existing installed app (or child app)
It sounds like maybe the caching issues were getting me at step 4 and probably should have deleted the installation and started over each time? Also, I was using dynamic pages to validate user input. I have since removed the dynamic pages (and also the validation) and the app configuration works more reliably, so maybe dynamic pages are a little flaky too?
Anyway, I have a different problem now and don’t want this to turn into a megathread, so I’ll create a separate topic. Thanks!
If you change something on the settings (inputs) I suggest you uninstall it first. If you see the changes take place immediately, then it is being refreshed.
About the dynamic pages, I haven’t seen any inconsistent behavior. I’ll check your other post then. Thanks!