The code in this pull request doesn't wait for the uninstallApp function to return before moving on. async.series is one fix. https://github.com/appium/appium/issues/1865