问题
I was so excited to upgrade to XCode8 trying to run tests with iOS 10 but then found out XCode8 no longer supports automation instruments. So I accepted the fact that I need to wait for Appium’s official upgrade to run tests on iOS10 .
But what happened after I downgraded to Xcode 7.3.1 really puzzled me. I kept getting this error even on the iOS8/9 devices which were ok before the XCode8 upgrade: "WebDriverException: An unknown server-side error occurred while processing the command. Original error: Removing {appId} failed". Why is this happening even I am now back to XCode 7.3.1? I tried everything I can think of including removing/reinstalling ideviceinstaller.
To give more info here are my Developer Settings:
--session-override --full-reset --native-instruments-lib --default-capabilities "{\"newCommandTimeout\": \"7200\"}"
The error is related to --full-reset. However removing that from the setting is triggering another error:
[debug] [iOS] App is not installed. Will try to install.
[MJSONWP] Encountered internal error running command:
Error: Installing {path to the app}
failed at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/node-idevice/main.js:159:6
at ChildProcess.exithandler (child_process.js:193:7)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Socket. (internal/child_process.js:323:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:475:12)
There must be something that was not correctly reverted after the downgrade to XCode7.3.1. Looks like some residue from the removed XCode 8 that broke everything.
Anyone has a resolution?
Thanks!
回答1:
I had a similar problem. It seems that installing Xcode 8 has put higher restriction on ideviceinstaller, the component Appium is using to install apps on iOS devices.
Try running this in the Terminal:
$sudo chmod -R 777 /var/db/lockdown/
Then test that ideviceinstaller can do a new install by running: $ideviceinstaller -u [Your device's UID] -i [Path to your debug build]
来源:https://stackoverflow.com/questions/39522679/webdriverexception-an-unknown-server-side-error-occurred-while-processing-the-c