Bug in platform when installing new SmartApps

Bug/Feedback Description
When a SmartApp with singleInstance: true defined in it’s metadata is installed (click Done), ST calls the installed() method of the SmartApp TWICE
This is creating unexpected side effects including errors and terminations especially when SmartApps are Service Managers which are installing devices in the installed() method

Device Info
Phone Model: iPhone 7, Samsung Galaxy S8
Software Version: iOS 10.3.2, Android

@kleneau @posborne not sure who to route this bug to within ST. This started recently.


Thanks, I’ll file a ticket internally with the appropriate team and link back to this post.


@RBoy I’m trying to reproduce this issue, but haven’t been successful. I installed the following SmartApp with both the Simulator and our Alpha Android client. I only observed one message being logged for both installations.

    name: "SingleInstance",
    namespace: "gausnes",
    author: "gausnes",
    description: "SingleInstance Test",
    category: "Family",
    iconUrl: "https://s3.amazonaws.com/smartapp-icons/Meta/text.png",
    iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Meta/text@2x.png",
    singleInstance: true

def installed() {
   log.warn "Installed!"

def updated() {
1 Like

I tested it again and it seems to be only calling it once now. It was giving me a very rough time the other day, kept being called twice so I eventually put a protection mechanism while adding/removing devices.

I guess something changed but I’m happy. Thanks for looking into it through.


Do you have a timeframe by chance?

Oct 27th, around 12:30-1:30 EST

1 Like