Appium error SessionNotCreatedError: A new session could not be created
Appium rejected the session request. It's almost always a capabilities mismatch against what's actually available on the device/emulator.
Why this happens
- `platformVersion` or `deviceName` doesn't match any connected/available device exactly
- The driver (UiAutomator2, XCUITest) version doesn't support the target OS version
- `app` points to a path or bundle ID that doesn't exist on this machine
How to fix it
- Run `appium-doctor` to verify Node, Android SDK/Xcode, and driver versions are all compatible
- Copy `deviceName`/`platformVersion` exactly from `adb devices` / `xcrun simctl list` rather than guessing
- Confirm the `app` capability path is valid and reachable from the machine running the Appium server