Environment
- Appium version: 2.19.0
- xcuitest-driver version: 9.10.5 (also reproduced on 7.27.0)
- Xcode version: 26.2 (Build 17C52)
- macOS version: 15.7.5 (aarch64)
- iOS Simulator versions tested: 18.5, 26.0, 26.2
- Simulator devices tested: iPhone SE (3rd generation), iPhone 17 Pro, iPhone 17 Pro Max
- Node.js version: v20.19.4
Description
POST /session/:id/orientation with {"orientation": "LANDSCAPE"} always returns Unable To Rotate Device on iOS simulators.
The GET /session/:id/orientation endpoint works correctly and returns PORTRAIT.
Steps to Reproduce
Start Appium
appium --relaxed-security
Create session with Safari (to rule out app-specific issues)
SESSION=$(curl -s -X POST http://127.0.0.1:4723/session \
-H "Content-Type: application/json" \
-d
'{"capabilities":{"alwaysMatch":{"platformName":"iOS","appium:automationName":"XCUITest","appium:udid":"<SIMULATOR_UDID>","appium:bundleId":"com.ap
ple.mobilesafari","appium:noReset":true,"appium:useNewWDA":true}}}' | python3 -c "import sys,json;
print(json.load(sys.stdin)['value']['sessionId'])")
Get orientation (works)
curl -s http://127.0.0.1:4723/session/$SESSION/orientation
Returns: {"value":"PORTRAIT"}
Set orientation (fails)
curl -s -X POST http://127.0.0.1:4723/session/$SESSION/orientation \
-H "Content-Type: application/json" -d '{"orientation":"LANDSCAPE"}'
Expected Behavior
The simulator rotates to landscape and the endpoint returns success.
Actual Behavior
{
"value": {
"error": "unknown error",
"message": "An unknown server-side error occurred while processing the command. Original error: Unable To Rotate Device"
}
}
What I've Tried
- Tested on iOS 18.5 and iOS 26.0/26.2 simulators — same result
- Tested with xcuitest-driver 7.27.0 and 9.10.5 — same result
- Rebuilt WDA with appium driver run xcuitest build-wda — same result
- Confirmed rotation lock is NOT enabled on the simulator
- The same test passes on AWS Device Farm with real devices
Environment
Description
POST /session/:id/orientationwith{"orientation": "LANDSCAPE"}always returnsUnable To Rotate Deviceon iOS simulators.The
GET /session/:id/orientationendpoint works correctly and returnsPORTRAIT.Steps to Reproduce
Start Appium
appium --relaxed-securityCreate session with Safari (to rule out app-specific issues)
Get orientation (works)
curl -s http://127.0.0.1:4723/session/$SESSION/orientationReturns: {"value":"PORTRAIT"}
Set orientation (fails)
Expected Behavior
The simulator rotates to landscape and the endpoint returns success.
Actual Behavior
What I've Tried