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
- The app under test crashed or was force-closed by the OS (e.g. low memory)
- The Appium server itself restarted or lost the session (timeout, server crash)
How to fix it
- Check device/simulator logs (`adb logcat` or the Xcode device console) around the failure time for an app crash, not just the test log
- Increase `newCommandTimeout` if the session is being killed for sitting idle too long between commands
- Wrap flaky app-crash-prone flows with a session health check before continuing