You should be able to use a Marionette Wait here (untested):

```python
result = Wait(self.marionette, launch_timeout, ignored_exceptions=JavascriptException).until(
    lamdba m: m.execute_async_script("return GaiaApps.launchWithName('%s')" % name, script_timeout=launch_timeout))
```