I am using XCode 6.1.1 (Simulator iPhone 5s iOS 7.1) and Appium 1.3.1. When executing UI iOS tests more than 90% are getting skipped with error code 146.
Full error: “A new session could not be created. (Original error: Command failed: An error was encountered processing the command (code=146): Unable to erase contents and settings in current state: Creating // stderr: An error was encountered processing the command (code=146): Unable to erase contents and settings in current state: Creating )”
To get tests being executed correct I have to reinstall iOS simulator, clear up the Library/Developer/CoreSimulator/Devices folder. Just after that it will run tests fine, but also not for sure.
What could be the reason for such behavior?
(…)[it was combination of many config issues, have resolved them 1 by 1 (though there are couple of other crashes after script is started, i’m checking them)]
for any1 who shares the same issues, follow:
delete all duplicate devices from xcode–>window–> devices
remove everything from /Users/pooja/Library/Developer/CoreSimulator/Devices/ folder and re-run app from xcode in the simulator you want to use in your test script [make sure Application folder is generated under devices–>folder–>data–>container->bundle–>applications]
now start appium server & execute your script