Appium command hangs when sending requests to Safari webview

Hi,

After a successful switch to webview on Safari in iOS devices, the command hangs after the first command in the current page.

Environment:

  • Appium: 1.15.1
  • iOS: 13
  • Xcode: 11.0

Appium logs:
2019-12-16 02:17:20:619 - [XCUITest] Skipping setting of the initial display orientation. Set the “orientation” capability to either “LANDSCAPE” or “PORTRAIT”, if this is an undesired behavior.
2019-12-16 02:17:20:621 - [RemoteDebugger] Remote Debugger version 5.7.0
2019-12-16 02:17:20:622 - [RemoteDebugger] Setting communication protocol: using Target-based communication
2019-12-16 02:17:20:830 - [iOS] Could not find any webviews yet, refreshing/retrying
2019-12-16 02:17:24:520 - [Appium] New XCUITestDriver session created successfully, session 42178a2b-cc8f-45a4-a5ff-d92925b9ea68 added to master session list
2019-12-16 02:17:24:522 - [HTTP] <-- POST /wd/hub/session 200 11909 ms - 761
2019-12-16 02:17:24:522 - [HTTP]
Dec 16, 2019 9:17:24 AM io.appium.java_client.remote.AppiumCommandExecutor$1 lambda$0
INFO: Detected dialect: W3C
2019-12-16 02:17:24:529 - [HTTP] --> GET /wd/hub/session/42178a2b-cc8f-45a4-a5ff-d92925b9ea68
2019-12-16 02:17:24:529 - [HTTP] {}
2019-12-16 02:17:24:822 - [XCUITest] Merging WDA caps over Appium caps for session detail response
2019-12-16 02:17:24:826 - [HTTP] <-- GET /wd/hub/session/42178a2b-cc8f-45a4-a5ff-d92925b9ea68 200 295 ms - 691
2019-12-16 02:17:24:826 - [HTTP]
2019-12-16 02:17:24:830 - [HTTP] --> GET /wd/hub/session/42178a2b-cc8f-45a4-a5ff-d92925b9ea68
2019-12-16 02:17:24:831 - [HTTP] {}
2019-12-16 02:17:24:832 - [XCUITest] Merging WDA caps over Appium caps for session detail response
2019-12-16 02:17:24:833 - [HTTP] <-- GET /wd/hub/session/42178a2b-cc8f-45a4-a5ff-d92925b9ea68 200 3 ms - 691
2019-12-16 02:17:24:833 - [HTTP]
2019-12-16 02:17:24:939 - [RemoteDebugger] Received ‘targetCreated’ event with no pending request: {“targetId”:“page-6”,“type”:“page”}
2019-12-16 02:17:35:288 - [HTTP] --> GET /wd/hub/session/42178a2b-cc8f-45a4-a5ff-d92925b9ea68/contexts
2019-12-16 02:17:35:289 - [HTTP] {}
2019-12-16 02:17:35:302 - [HTTP] <-- GET /wd/hub/session/42178a2b-cc8f-45a4-a5ff-d92925b9ea68/contexts 200 14 ms - 42
2019-12-16 02:17:35:302 - [HTTP]
Context: NATIVE_APP
Context: WEBVIEW_10102.1
2019-12-16 02:17:35:307 - [HTTP] --> POST /wd/hub/session/42178a2b-cc8f-45a4-a5ff-d92925b9ea68/context
2019-12-16 02:17:35:307 - [HTTP] {“name”:“WEBVIEW_10102.1”}
2019-12-16 02:17:35:365 - [HTTP] <-- POST /wd/hub/session/42178a2b-cc8f-45a4-a5ff-d92925b9ea68/context 200 59 ms - 14
2019-12-16 02:17:35:366 - [HTTP]
2019-12-16 02:17:35:382 - [HTTP] --> POST /wd/hub/session/42178a2b-cc8f-45a4-a5ff-d92925b9ea68/url
2019-12-16 02:17:35:382 - [HTTP] {“url”:“http://xxxxx/xxxx”}
2019-12-16 02:17:37:453 - [HTTP] <-- POST /wd/hub/session/42178a2b-cc8f-45a4-a5ff-d92925b9ea68/url 200 2071 ms - 14
2019-12-16 02:17:37:453 - [HTTP]
2019-12-16 02:17:37:461 - [HTTP] --> POST /wd/hub/session/42178a2b-cc8f-45a4-a5ff-d92925b9ea68/element
2019-12-16 02:17:37:461 - [HTTP] {“using”:“id”,“value”:“myId”}
2019-12-16 02:17:37:515 - [HTTP] <-- POST /wd/hub/session/42178a2b-cc8f-45a4-a5ff-d92925b9ea68/element 200 54 ms - 73
2019-12-16 02:17:37:515 - [HTTP]
2019-12-16 02:17:37:519 - [HTTP] --> GET /wd/hub/session/42178a2b-cc8f-45a4-a5ff-d92925b9ea68/element/5000/displayed => After this request, it should set text on the input field but it hangs here until timeout.
2019-12-16 02:17:37:520 - [HTTP] {}
2019-12-16 02:18:12:586 - [BaseDriver] Shutting down because we waited 60 seconds for a command
2019-12-16 02:18:12:588 - [Appium] Closing session, cause was ‘New Command Timeout of 60 seconds expired. Try customizing the timeout using the ‘newCommandTimeout’ desired capability’
2019-12-16 02:18:12:588 - [Appium] Removing session f1be5266-33c8-4278-b901-b94ff82db822 from our master session list
2019-12-16 02:18:12:588 - [DevCon Factory] Releasing connections for 00008020-000C11313C30003A device on any port number
2019-12-16 02:18:12:589 - [DevCon Factory] Found cached connections to release: [“00008020-000C11313C30003A:8245”]
2019-12-16 02:18:12:589 - [DevCon Factory] Releasing the listener for ‘00008020-000C11313C30003A:8245’

Thanks

It makes sense to try appium@beta

Is it possible to use current Appium version, e.g: 1.15? By the way, this issue seem intermittent and I can’t figure out what is the real root cause from my side.

Back to this. When used on iOS less than 13, e.g: 11, 12, then the hang issue does not occur.