Appium error

A session is either terminated or not started

The app crashed, or the Appium session was otherwise killed mid-test, and this command arrived after the session was already gone.

Why this happens

How to fix it

  1. Check device/simulator logs (`adb logcat` or the Xcode device console) around the failure time for an app crash, not just the test log
  2. Increase `newCommandTimeout` if the session is being killed for sitting idle too long between commands
  3. Wrap flaky app-crash-prone flows with a session health check before continuing