title: Encountered internal error running command: Error: Error occured while starting App
body: <p>The problem: My app opens up and shuts off before <code>ScrollTo()</code> command execution. </p>
  
  <p>I got this error on Appium:   </p>
  
  <blockquote>
    <p>'Encountered internal error running command: Error: Error occured
    while starting App. Original error:
    com.disney.wdpro.android.mdx.activities.LoaderActivity or
    com.disney.mdx.wdw.google.com.disney.wdpro.android.mdx.activities.LoaderActivity
    never started'</p>
  </blockquote>
  
  <p>Appium logs:</p>
  
  <pre><code>[ADB] 1 device(s) connected
  [ADB] Running 'C:\Users\vovan\AppData\Local\Android\sdk\platform-
  tools\adb.exe' with args: ["-P",5037,"-
  s","IRN7HITKLFOFVKK7","shell","am","force-stop","io.appium.unlock"]
  [AndroidDriver] Not cleaning generated files. Add `clearSystemFiles` 
  capability if wanted.
  [MJSONWP] Encountered internal error running command: Error: Error occured 
  while starting App. Original error: 
  com.disney.wdpro.android.mdx.activities.LoaderActivity 
  
  orcom.disney.mdx.wdw.google.com.android.mdx.activities.LoaderActiv
  ity never started
  at Object.wrappedLogger.errorAndThrow 
  (C:\Users\vovan\AppData\Local\Programs\appium- 
  desktop\resources\app\node_modules\appium\node_modules\appium-
  support\lib\logging.js:63:13)
  at ADB.callee$0$0$ (C:\Users\vovan\AppData\Local\Programs\appium-
  desktop\resources\app\node_modules\appium\node_modules\appium-
  adb\lib\tools\apk-utils.js:79:9)
  </code></pre>
  
  <p>Selenium Code Eclipse:</p>
  
  <pre><code>    public void test() throws MalformedURLException, InterruptedException {
      File appDir = new File("src");
      File app = new File(appDir, "com.disney.mdx.wdw.google.apk");
  
      DesiredCapabilities cap = new DesiredCapabilities();
      cap.setCapability(MobileCapabilityType.PLATFORM_NAME, 
      MobilePlatform.ANDROID);
      cap.setCapability(MobileCapabilityType.DEVICE_NAME, "Android Device");
      cap.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, "50");
      cap.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());
  
      AndroidDriver driver = new AndroidDriver(new 
      URL("http://169.254.159.242:4723/wd/hub"), cap);
      driver.scrollTo("Get Started");
      TouchActions t = new TouchActions(driver);
      WebElement abc = 
      driver.findElementById("com.disney.mdx.wdw.google:id/tutorial_button");
      t.singleTap(abc).perform();
  </code></pre>