Appium loop forever at "findElement" on ios 13.4.1
See original GitHub issueThe problem
In our testrun, we need to find an html element on Safari for a number of times with “findElement”. It goes into endless loop after calling this function for 14 times. *update: not 14 times. but after the testrun has been executed for 5minutes.
Environment
- Appium version: 1.17.1
- Last Appium version that did not exhibit the issue (if applicable): last beta version which solved extra time wait problem on iOS
- Real device or emulator/simulator: real iPhone 7 with ios13.4.1
- Appium CLI or Appium.app|exe: appium.app
- WebDriverAgent using: v2.16.1
Appium logs
when the probem happens:
2020-05-12 15:54:42:889 - [HTTP] {"using":"css selector","value":"[id=\"render-canvas\"]"}
2020-05-12 15:54:42:889 - [debug] [W3C (3ccfbb9b)] Calling AppiumDriver.findElement() with args: ["css selector","[id=\"render-canvas\"]","3ccfbb9b-e1d1-4cdb-ad57-5054fff8fed3"]
2020-05-12 15:54:42:889 - [debug] [XCUITest] Executing command 'findElement'
2020-05-12 15:54:42:898 - [debug] [XCUITest] Error received while executing atom: operation timed out
2020-05-12 15:54:42:899 - [debug] [XCUITest] No alert found: Did not get any response for atom execution after 120002ms
2020-05-12 15:54:42:900 - [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id
2020-05-12 15:54:42:900 - [debug] [BaseDriver] Waiting up to 0 ms for condition
2020-05-12 15:54:42:901 - [debug] [RemoteDebugger] Executing atom 'find_element'
2020-05-12 15:54:42:901 - [debug] [RemoteDebugger] Executing 'find_element' atom in default context
2020-05-12 15:54:42:901 - [debug] [RemoteDebugger] Sending javascript command: '(function(){return function(){var k=this;functi...'
2020-05-12 15:54:42:903 - [debug] [RemoteDebugger] Sending '_rpc_forwardSocketData:' message to app 'PID:309', page '1', target 'page-52' (id: 1258): 'Runtime.evaluate'
2020-05-12 15:54:42:904 - [debug] [W3C (3ccfbb9b)] Encountered internal error running command: Error: Did not get any response for atom execution after 120002ms
2020-05-12 15:54:42:904 - [debug] [W3C (3ccfbb9b)] at /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/web.js:275:15
2020-05-12 15:54:42:904 - [debug] [W3C (3ccfbb9b)] at tryCatcher (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/util.js:16:23)
2020-05-12 15:54:42:905 - [debug] [W3C (3ccfbb9b)] at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/promise.js:547:31)
2020-05-12 15:54:42:905 - [debug] [W3C (3ccfbb9b)] at Promise._settlePromise (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/promise.js:604:18)
2020-05-12 15:54:42:905 - [debug] [W3C (3ccfbb9b)] at Promise._settlePromise0 (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/promise.js:649:10)
2020-05-12 15:54:42:905 - [debug] [W3C (3ccfbb9b)] at Promise._settlePromises (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/promise.js:725:18)
2020-05-12 15:54:42:905 - [debug] [W3C (3ccfbb9b)] at _drainQueueStep (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/async.js:93:12)
2020-05-12 15:54:42:905 - [debug] [W3C (3ccfbb9b)] at _drainQueue (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/async.js:86:9)
2020-05-12 15:54:42:905 - [debug] [W3C (3ccfbb9b)] at Async._drainQueues (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/async.js:102:5)
2020-05-12 15:54:42:905 - [debug] [W3C (3ccfbb9b)] at Immediate.Async.drainQueues (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/async.js:15:14)
2020-05-12 15:54:42:905 - [debug] [W3C (3ccfbb9b)] at processImmediate (timers.js:632:19)
2020-05-12 15:54:43:308 - [debug] [WD Proxy] Matched '/alert/text' to command name 'getAlertText'
2020-05-12 15:54:43:309 - [debug] [WD Proxy] Proxying [GET /alert/text] to [GET http://127.0.0.1:8202/session/4C006669-FE74-460C-BAFD-79FB2491BD47/alert/text] with no body
2020-05-12 15:54:43:715 - [WD Proxy] Got response with status 404: {
2020-05-12 15:54:43:715 - [WD Proxy] "value" : {
2020-05-12 15:54:43:715 - [WD Proxy] "error" : "no such alert",
2020-05-12 15:54:43:715 - [WD Proxy] "message" : "An attempt was made to operate on a modal dialog when one was not open",
2020-05-12 15:54:43:715 - [WD Proxy] "traceback" : ""
2020-05-12 15:54:43:716 - [WD Proxy] },
2020-05-12 15:54:43:716 - [WD Proxy] "sessionId" : "4C006669-FE74-460C-BAFD-79FB2491BD47"
2020-05-12 15:54:43:716 - [WD Proxy] }
2020-05-12 15:54:43:716 - [debug] [W3C] Matched W3C error code 'no such alert' to NoSuchAlertError
2020-05-12 15:54:46:021 - [HTTP] --> GET /wd/hub/status
2020-05-12 15:54:46:021 - [HTTP] {}
2020-05-12 15:54:46:021 - [debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
2020-05-12 15:54:46:022 - [debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
2020-05-12 15:54:46:022 - [HTTP] <-- GET /wd/hub/status 200 1 ms - 68
2020-05-12 15:54:46:022 - [HTTP]
2020-05-12 15:54:51:024 - [HTTP] --> GET /wd/hub/status
2020-05-12 15:54:51:024 - [HTTP] {}
2020-05-12 15:54:51:024 - [debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
2020-05-12 15:54:51:024 - [debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
2020-05-12 15:54:51:025 - [HTTP] <-- GET /wd/hub/status 200 1 ms - 68
2020-05-12 15:54:51:025 - [HTTP]
2020-05-12 15:54:56:026 - [HTTP] --> GET /wd/hub/status
2020-05-12 15:54:56:026 - [HTTP] {}
2020-05-12 15:54:56:026 - [debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
2020-05-12 15:54:56:027 - [debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
2020-05-12 15:54:56:027 - [HTTP] <-- GET /wd/hub/status 200 1 ms - 68
2020-05-12 15:54:56:027 - [HTTP]
2020-05-12 15:55:01:028 - [HTTP] --> GET /wd/hub/status
2020-05-12 15:55:01:029 - [HTTP] {}
2020-05-12 15:55:01:029 - [debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
2020-05-12 15:55:01:029 - [debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
2020-05-12 15:55:01:030 - [HTTP] <-- GET /wd/hub/status 200 1 ms - 68
2020-05-12 15:55:01:030 - [HTTP]
2020-05-12 15:55:06:031 - [HTTP] --> GET /wd/hub/status
2020-05-12 15:55:06:031 - [HTTP] {}
2020-05-12 15:55:06:031 - [debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
2020-05-12 15:55:06:031 - [debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
2020-05-12 15:55:06:032 - [HTTP] <-- GET /wd/hub/status 200 1 ms - 68
2020-05-12 15:55:06:032 - [HTTP]
2020-05-12 15:55:11:033 - [HTTP] --> GET /wd/hub/status
2020-05-12 15:55:11:033 - [HTTP] {}
2020-05-12 15:55:11:033 - [debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
2020-05-12 15:55:11:034 - [debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
2020-05-12 15:55:11:034 - [HTTP] <-- GET /wd/hub/status 200 1 ms - 68
2020-05-12 15:55:11:034 - [HTTP]
2020-05-12 15:55:16:036 - [HTTP] --> GET /wd/hub/status
2020-05-12 15:55:16:036 - [HTTP] {}
2020-05-12 15:55:16:037 - [debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
2020-05-12 15:55:16:037 - [debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
2020-05-12 15:55:16:038 - [HTTP] <-- GET /wd/hub/status 200 2 ms - 68
2020-05-12 15:55:16:038 - [HTTP]
2020-05-12 15:55:21:039 - [HTTP] --> GET /wd/hub/status
2020-05-12 15:55:21:039 - [HTTP] {}
2020-05-12 15:55:21:039 - [debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
2020-05-12 15:55:21:039 - [debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
2020-05-12 15:55:21:040 - [HTTP] <-- GET /wd/hub/status 200 1 ms - 68
2020-05-12 15:55:21:040 - [HTTP]
2020-05-12 15:55:26:041 - [HTTP] --> GET /wd/hub/status
2020-05-12 15:55:26:041 - [HTTP] {}
2020-05-12 15:55:26:041 - [debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
2020-05-12 15:55:26:042 - [debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
2020-05-12 15:55:26:042 - [HTTP] <-- GET /wd/hub/status 200 1 ms - 68
2020-05-12 15:55:26:042 - [HTTP]
2020-05-12 15:55:31:044 - [HTTP] --> GET /wd/hub/status
2020-05-12 15:55:31:045 - [HTTP] {}
2020-05-12 15:55:31:045 - [debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
2020-05-12 15:55:31:045 - [debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
2020-05-12 15:55:31:045 - [HTTP] <-- GET /wd/hub/status 200 1 ms - 68
2020-05-12 15:55:31:045 - [HTTP]
2020-05-12 15:55:36:047 - [HTTP] --> GET /wd/hub/status
2020-05-12 15:55:36:048 - [HTTP] {}
2020-05-12 15:55:36:048 - [debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
2020-05-12 15:55:36:048 - [debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
2020-05-12 15:55:36:049 - [HTTP] <-- GET /wd/hub/status 200 2 ms - 68
2020-05-12 15:55:36:049 - [HTTP]
2020-05-12 15:55:41:050 - [HTTP] --> GET /wd/hub/status
2020-05-12 15:55:41:050 - [HTTP] {}
2020-05-12 15:55:41:050 - [debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
2020-05-12 15:55:41:051 - [debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
2020-05-12 15:55:41:051 - [HTTP] <-- GET /wd/hub/status 200 1 ms - 68
2020-05-12 15:55:41:051 - [HTTP]
2020-05-12 15:55:46:053 - [HTTP] --> GET /wd/hub/status
2020-05-12 15:55:46:053 - [HTTP] {}
2020-05-12 15:55:46:053 - [debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
2020-05-12 15:55:46:053 - [debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
2020-05-12 15:55:46:054 - [HTTP] <-- GET /wd/hub/status 200 1 ms - 68
2020-05-12 15:55:46:054 - [HTTP]
2020-05-12 15:55:51:055 - [HTTP] --> GET /wd/hub/status
2020-05-12 15:55:51:056 - [HTTP] {}
2020-05-12 15:55:51:056 - [debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
2020-05-12 15:55:51:056 - [debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
2020-05-12 15:55:51:056 - [HTTP] <-- GET /wd/hub/status 200 1 ms - 68
2020-05-12 15:55:51:057 - [HTTP]
2020-05-12 15:55:56:058 - [HTTP] --> GET /wd/hub/status
2020-05-12 15:55:56:058 - [HTTP] {}
2020-05-12 15:55:56:058 - [debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
2020-05-12 15:55:56:058 - [debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
2020-05-12 15:55:56:059 - [HTTP] <-- GET /wd/hub/status 200 1 ms - 68
2020-05-12 15:55:56:059 - [HTTP]
2020-05-12 15:56:01:060 - [HTTP] --> GET /wd/hub/status
2020-05-12 15:56:01:061 - [HTTP] {}
2020-05-12 15:56:01:061 - [debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
2020-05-12 15:56:01:061 - [debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.1"}}
2020-05-12 15:56:01:062 - [HTTP] <-- GET /wd/hub/status 200 1 ms - 68
2020-05-12 15:56:01:062 - [HTTP]
2020-05-12 15:56:06:064 - [HTTP] --> GET /wd/hub/status
and loop forever
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
[Fixed] Installing an IOS application gives a loop - Issues/Bugs
When I start up an appium session to test an IOS application, the simulator starts up but it performs a loop when it...
Read more >Intermittent Issues when trying to run a test, adding startup ...
The findElement call will fail: with “org.openqa.selenium.support.ui.ExpectedConditions WARNING WebDriverException thrown by findElement(By.id: ...
Read more >Endless loop on initial launch screen - ios - native app - Support
The app is launched and the inspector gets stuck on the loading screen of the splash page for the app, but the app...
Read more >Scroll functionality using loop - Issues/Bugs - Appium Discuss
I am using ruby, you can use the same logic in any other language. Please make sure you find the value for the...
Read more >Appium stops executions and goes in infinite loop - Support
I am user appium server 1.4.13 and appium client 4.1.2 but while executing testcases some time it gets executed but many times it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I am going to close this issue, because after more testing on iphone 7, 2019 iPad and iPhone X with 13.5. I found that the website I am testing, the browser will crash with message “A problem repeatedly occurred safari …” after numbers of refresh. and I found that the memory usage at the moment of crash happen was grown to 1.74G.
I can reproduce this on iPhone7 and iPad, but not iPhone X
so I am thinking it’s more with safari issue rather to Appium.
@usagikengood what is the problem ?