0

I'm looking for information on why Appium "loses" the application under test when changing the date in the iOS date picker.

Using Appium with Python 3, I start an app with these capabilities:

{ 
   "automationName":"XCUITest",
   "commandTimeouts":"53000",
   "newCommandTimeout":36000,
   "wdaBaseUrl":"http://localhost",
   "wdaLocalPort":8104,
   "wdaStartupRetryInterval":7000,
   "wdaEventloopIdleDelay":2,
   "wdaLaunchTimeout":47000,
   "wdaConnectionTimeout":240000,
   "wdaStartupRetries":1,
   "clearSystemFiles":True,
   "showXcodeLog":True,
   "useNewWDA":False,
   "shouldUseSingletonTestManager":True,
   "useJSONSource":True,
   "webkitResponseTimeout":21000,
   "screenshotQuality":1,
   "screenshotWaitTimeout":9,
   "noReset":True,
   "fullReset":False,
   "iosInstallPause":5000,
   "launchTimeout":10000,
   "enforceAppInstall":True,
   "platformVersion":"12.2",
   "deviceName":"iPhone",
   "app":"/path/to/my.app",
   "udid":"phone udid",
   "platformName":"iOS",
   "xcodeOrgId":"XXXXXXXX",
   "xcodeSigningId":"iPhone Developer"
}

After establishing the session, I then launch the iOS Settings app, move to the "Date & Time" screen, and use a TouchAction to tap on a future date in the date picker using specific x and y coordinates, to set the time forward by several days. After 2 or 3 such taps, I often get an error from Appium:

WebDriverException: An unknown server-side error occurred while processing the command. The application under test with bundle id 'com.xxx.yyy' is not running, possibly crashed

Attempting to open the session in Appium's inspector results in a popup with the error "Call to 'source' failed↵ e.replace is not a function"

At the point of failure, the Appium log contains:

[debug] [W3C (e9cb0d61)] Calling AppiumDriver.performTouch() with args: [[{"action":"tap","options":{"x":106.5,"y":442.4428571428571,"count":1}}],"e9cb0d61-d832-4910-b466-df43e14660a9"]
[debug] [XCUITest] Executing command 'performTouch'
[debug] [XCUITest] Received the following touch action: tap(options={"x":106,"y":442,"count":1})
[debug] [XCUITest] Setting custom timeout to 53000 ms for 'performTouch' command
[debug] [WD Proxy] Proxying [POST /wda/touch/perform] to [POST http://localhost:8104/session/32F4A2E7-D75B-42FF-8B4B-A483C812378C/wda/touch/perform] with body: {"actions":[{"action":"tap","options":{"x":106,"y":442,"count":1}}]}
[debug] [WD Proxy] Got response with status 200: {"value":"The application under test with bundle id 'com.xxx.yyy' is not running, possibly crashed","sessionId":"32F4A2E7-D75B-42FF-8B4B-A483C812378C","status":889}
[warn] [WD Proxy] Got an unexpected response: {"value":"The application under test with bundle id 'com.xxx.yyy' is not running, possibly crashed","sessionId":"32F4A2E7-D75B-42FF-8B4B-A483C812378C","status":889}
[debug] [MJSONWP] Matched JSONWP error code 889 to UnknownError
[debug] [W3C (e9cb0d61)] Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: The application under test with bundle id 'com.nevro.PTA' is not running, possibly crashed
[debug] [W3C (e9cb0d61)]     at errorFromMJSONWPStatusCode (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:789:10)
[debug] [W3C (e9cb0d61)]     at ProxyRequestError.errorFromMJSONWPStatusCode [as getActualError] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:683:14)
[debug] [W3C (e9cb0d61)]     at JWProxy.getActualError [as command] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:237:19)
[info] [HTTP] <-- POST /wd/hub/session/e9cb0d61-d832-4910-b466-df43e14660a9/touch/perform 500 20 ms - 977

If I manually check, the app under test is still running in the background, and manually or automatically switching to it and back to iOS Settings allows the TouchActions to continue for several more taps.

Why is Appium having this problem? How can I avoid it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.