Composer:Overlay ending unexpectedly

I am transitioning from Storyboard to Composer. My issue is that during an in-app purchase transaction the overlay scene ends without any of my code explicitly calling the overlay to be ended. 

Here is the flow. 

  1. Overlay begins.

  2. Purchase button action starts store transaction.  (iOS sandbox environment)

  3. Overlay hides. —> Why O Why???

  4. Native popup from store to ask for id and password. 

  5. Store transactions completes 

From the log

Apr 23 15:42:35 Janakis-iPad TimiLearns[792] <Warning>: COMPOSER: 

Apr 23 15:42:35 Janakis-iPad TimiLearns[792] <Warning>: A total of [1] scene(s) have been removed.

Apr 23 15:42:41 Janakis-iPad TimiLearns[792] <Warning>: testing socket connection …

Apr 23 15:42:41 Janakis-iPad TimiLearns[792] <Warning>: Warning: Libinfo call to mDNSResponder on main thread

Apr 23 15:42:42 Janakis-iPad TimiLearns[792] <Warning>: connected to google

Apr 23 15:42:42 Janakis-iPad TimiLearns[792] <Warning>: closed connection

Apr 23 15:42:42 Janakis-iPad TimiLearns[792] <Warning>: connected to store

Apr 23 15:42:42 Janakis-iPad TimiLearns[792] <Warning>: productId found

Apr 23 15:42:42 Janakis-iPad TimiLearns[792] <Warning>: localized price exists

Apr 23 15:42:43 Janakis-iPad TimiLearns[792] <Warning>: overlay ended 

Apr 23 15:42:43 Janakis-iPad TimiLearns[792] <Warning>: COMPOSER: 

Apr 23 15:42:43 Janakis-iPad TimiLearns[792] <Warning>: No scenes were removed.

Please help. 

Update: Forgot to mention - The message “overlay ended” is being printed by the did hide of the overlay composer event.

Ok. Found it. store.purchase causes system suspend event(Is this ok?). Inside the event handler i had the following code

 elseif event.type == “applicationSuspend” then

        --this block executed when app goes into “suspend” state

        --e.g. user receives phone call, presses home button, etc.

        --storyboard.purgeAll();

        composer.removeHidden( true )

        savePrefs();

composer.removeHidden is causing the overlay hide event.  

Update: Forgot to mention - The message “overlay ended” is being printed by the did hide of the overlay composer event.

Ok. Found it. store.purchase causes system suspend event(Is this ok?). Inside the event handler i had the following code

 elseif event.type == “applicationSuspend” then

        --this block executed when app goes into “suspend” state

        --e.g. user receives phone call, presses home button, etc.

        --storyboard.purgeAll();

        composer.removeHidden( true )

        savePrefs();

composer.removeHidden is causing the overlay hide event.