Webhook SmartApp - change to lifecycles and error in mobile app

I have had a couple of installed instances of Webhook SmartApps sitting around for weeks/months minding their own business and working fine. However now when I click on then on the Routines page of the Android app I get an error pop up.

No network Connection
Couldn’t find any available networks.

After the error a spurious ‘SmartThings’ header can be seen overlaying the Routine tiles as if something has crashed out inelegantly.

Now I realise that this is probably something of a generic error and I’ve encountered it, or something similar, in the past when my app installation is PENDING because of a scope mismatch, but these are apps that are installed fine and still running perfectly correctly.

Everything is perfectly OK from the Discover menu.

I have only seen this issue since the Android app was updated. However as the apps were running fine I haven’t clicked on the tiles for a while so that might not be significant.

While playing around to fix that problem I deleted one of the installed apps a couple of times and noticed that my UPDATE lifecycle code isn’t being run on installation. Now it would make sense if the INSTALL lifecycle ran the first time and the UPDATE lifecycle ran from then on, but that is not how it has worked for the last four to five years. Both INSTALL and UPDATE have run when the installed instance was created. I do notice that at least one of the example apps in the repository has the install lifecycle handler call the code for the update lifecycle and I have never understood why because it would just call the same code twice. Not now it seems.

1 Like

Hi @orangebucket ,

The behavior you’re observing with the lifecycle events has been clarified by the team. Previously, both the INSTALLED and UPDATED events may have been triggered upon installation, which was actually a bug. The correct behavior is that the INSTALLED event should only be generated the first time an app is installed, and the UPDATED event should be generated for subsequent configuration edits.

If you only define the UPDATED handler, it will be called for both events, but it doesn’t work the other way around.

Regarding the “No network Connection” error and other issues with the Android app, these might be unrelated to the lifecycle event changes and could be a separate issue introduced with recent updates.

1 Like

Thanks for the confirmation.

One of the frustrations of SmartThings is that the users aren’t terribly well informed of intended behaviour in many areas so as long as the actual behaviour is reasonable we have no way of knowing if it is correct or a bug. We are even less informed of upcoming changes so when behaviour changes we don’t know if it is a squashed bug, a new bug, or an intentional change of what is correct.

2 Likes

Hey @orangebucket , glad to see you still asking and answering questions relevant to me =) Did you ever solve your original

No network Connection
Couldn’t find any available networks.

issue. This may be my first time opening the routines since the update you mentioned. Did you have to delete and re-create each one? AFAICT, I cannot open the long-existing and working SmartApps in the Android app. When I open those same SmartApps on ‘my.smartthings.com’ they work like the always did. Everything else about the intergrations seems 100% functional, the webapp driving the apps is definately online and my integration keys are valid.

Thanks for any advice you may have the time to provide.

I haven’t really looked much since I created the thread as I got diverted by modifying my apps to handle INSTALL/UPDATE more appropriately following the changes.

The SmartApps certainly still give that error when an attempt is made to update them on the Routines page but as far as I know they are running correctly otherwise. They don’t actually do anything that I’d notice as I haven’t found a use for a SmartApp yet, but if I do I should be ready if this error would just go away.

I can’t really see what there can be to fix at our end. They install correctly so that suggests the scopes are sane, and those are anybodies guess anyway, and those seem to be the main source of issues.

1 Like