Make Nstack.appOpen cancellable or add a timeout parameter to set the maximum duration appOpen() can run for.
Because appOpen is not currently cancellable, code like the following will not timeout, if appOpen() will take more than 2000ms:
withTimeoutOrNull(2000) { NStack.appOpen() }
In this case the Coroutine will not return in 2 seconds.