Hi!
I am using Appium (1.2.2) + ruby (2.1.2p95) + selenium-webdriver (2.42.0) + appium_lib gem (4.1.0, 3.0.3) to test an iOS 7 app.
I am trying to remove the app between tests, using the --full-reset flag - I am not sure if that’s the best strategy).
I tried that as a server flag (–full-reset) and using it as capability as well (‘fullReset’ => true) but in both situations I get the following error:
Cannot set preferences because a full-reset was requested (Selenium::WebDriver::Error::WebDriverError)
Console logs:
info: [debug] Cannot set preferences because a full-reset was requested
error: Cannot set preferences because a full-reset was requested
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Cannot set preferences because a full-reset was requested
info: [debug] Error: Cannot set preferences because a full-reset was requested
at IOS.setPreferences (/usr/local/lib/node_modules/appium/lib/devices/ios/ios.js:607:15)
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:610:21
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:249:17
at iterate (/usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:149:13)
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:160:25
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:251:21
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:615:34
at null.<anonymous> (/usr/local/lib/node_modules/appium/lib/devices/ios/ios.js:280:5)
at null.<anonymous> (/usr/local/lib/node_modules/appium/lib/devices/ios/ios.js:362:7)
at _fulfilled (/usr/local/lib/node_modules/appium/node_modules/q/q.js:787:54)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Cannot set preferences because a full-reset was reque
sted)","origValue":"Cannot set preferences because a full-reset was requested"},"sessionId":null}
info: <-- POST /wd/hub/session 500 162.369 ms - 236
info: --> POST /wd/hub/session {"desiredCapabilities":{"appium-version":"1.0","address":"0.0.0.0","port":"4723","platformName":"iOS","platformVersion":"7.1","deviceName":"iPhone Retina (
4-inch 64-bit)","app":"/Users/jp.nogueira/Documents/Automation/Apps/NAP_iOS_5_6_1_live.app","bundleId":"com.dotankstudios.AtomFlow","fullReset":true,"locationServicesAuthorized":false}}
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : appium-version, addre
ss, port
info: [debug] Using local app from desired caps: /Users/jp.nogueira/Documents/Automation/Apps/NAP_iOS_5_6_1_live.app
info: [debug] Creating new appium session 7c8be0eb-8044-4d12-9d93-3c86ea0affa5
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder
info: [debug] Setting Xcode version
info: [debug] Setting iOS SDK Version
info: [debug] iOS SDK Version set to 7.1
info: [debug] Detecting automation tracetemplate
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Parsed app Info.plist (as binary)
info: [debug] Parsed app Localizable.strings
info: [debug] Not setting locale
info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir:
info: [debug] Dynamic env:
info: [debug] Dynamic bootstrap code:
info: [debug] Dynamic bootstrap path:
info: [debug] Reusing dynamic bootstrap:
info: [debug] Cannot set preferences because a full-reset was requested
error: Cannot set preferences because a full-reset was requested
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Cannot set preferences because a full-reset was requested
info: [debug] Error: Cannot set preferences because a full-reset was requested
at IOS.setPreferences (/usr/local/lib/node_modules/appium/lib/devices/ios/ios.js:607:15)
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:610:21
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:249:17
at iterate (/usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:149:13)
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:160:25
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:251:21
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:615:34
at null.<anonymous> (/usr/local/lib/node_modules/appium/lib/devices/ios/ios.js:280:5)
at null.<anonymous> (/usr/local/lib/node_modules/appium/lib/devices/ios/ios.js:362:7)
at _fulfilled (/usr/local/lib/node_modules/appium/node_modules/q/q.js:787:54)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Cannot set preferences because a full-reset was reque
sted)","origValue":"Cannot set preferences because a full-reset was requested"},"sessionId":null}
info: <-- POST /wd/hub/session 500 130.027 ms - 236
info: --> POST /wd/hub/session {"desiredCapabilities":{"appium-version":"1.0","address":"0.0.0.0","port":"4723","platformName":"iOS","platformVersion":"7.1","deviceName":"iPhone Retina (
4-inch 64-bit)","app":"/Users/jp.nogueira/Documents/Automation/Apps/NAP_iOS_5_6_1_live.app","bundleId":"com.dotankstudios.AtomFlow","fullReset":true,"locationServicesAuthorized":false}}
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : appium-version, addre
ss, port
info: [debug] Using local app from desired caps: /Users/jp.nogueira/Documents/Automation/Apps/NAP_iOS_5_6_1_live.app
info: [debug] Creating new appium session 8784f2d5-6e7c-4cd9-b86a-8fd2d043793e
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder
info: [debug] Setting Xcode version
info: [debug] Setting iOS SDK Version
info: [debug] iOS SDK Version set to 7.1
info: [debug] Detecting automation tracetemplate
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Parsed app Info.plist (as binary)
info: [debug] Parsed app Localizable.strings
info: [debug] Not setting locale
info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir:
info: [debug] Dynamic env:
info: [debug] Dynamic bootstrap code:
info: [debug] Dynamic bootstrap path:
info: [debug] Reusing dynamic bootstrap:
info: [debug] Cannot set preferences because a full-reset was requested
error: Cannot set preferences because a full-reset was requested
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Cannot set preferences because a full-reset was requested
info: [debug] Error: Cannot set preferences because a full-reset was requested
at IOS.setPreferences (/usr/local/lib/node_modules/appium/lib/devices/ios/ios.js:607:15)
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:610:21
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:249:17
at iterate (/usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:149:13)
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:160:25
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:251:21
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:615:34
at null.<anonymous> (/usr/local/lib/node_modules/appium/lib/devices/ios/ios.js:280:5)
at null.<anonymous> (/usr/local/lib/node_modules/appium/lib/devices/ios/ios.js:362:7)
at _fulfilled (/usr/local/lib/node_modules/appium/node_modules/q/q.js:787:54)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Cannot set preferences because a full-reset was reque
sted)","origValue":"Cannot set preferences because a full-reset was requested"},"sessionId":null}
info: <-- POST /wd/hub/session 500 133.974 ms - 236
Any idea why? Thanks.