[Xcode] Exiting due to IDE disconnection - after searching by NSPredicate name and label on iOS 14.4
See original GitHub issueThe problem
When the test requests from driver to find an element by “NSPredicate name and value” locator, the WDA crashes and reports xcodebuild exited with code ‘65’ and signal ‘null’. But before searching with “NSPredicate name and value”, test works as usual with other locators.
Especially:
- works by
wdName
- fails after searching by
wdName AND wdLabel
That happens on one device with iOS 14.4, other 2 devices with iOS 13.3 work as usual in the same environment.
The issue started after updating the device from iOS 14.3 to iOS 14.4. Before that tests were running on it normally. After upgrade, every test execution on the mentioned device fails.
Environment
- Appium version (or git revision) that exhibits the issue: 1.20.0 or 1.21.0-beta.0
- Last Appium version that did not exhibit the issue (if applicable): 1.20.0 - shouldn’t matter
- Desktop OS/version used to run Appium: CLI
- Node.js version (unless using Appium.app|exe): LTS
- Npm or Yarn package manager: LTS
- Mobile platform/version under test that exhibits the issue: iOS 14.4
- Mobile platform/version under test did not exhibits the issue: iOS 14.3
- Real device or emulator/simulator: real device iPhone7
- Appium CLI or Appium.app|exe: CLI
Details
Behavior
- WDA is built correctly in Xcode.
- when the test is run, the app and WDA are installed on device.
- after install, the app opens as expected.
- after app is opened, the test is able to find and click on element which locators are other than NSPredicate
wdName AND wdLabel
- then, the test fails when it reaches to the element which locator is NSPredicate
wdName AND wdLabel
.
The failure log starts with:
[Xcode] 2021-02-19 07:48:14.032291-0500 WebDriverAgentRunner-Runner[1348:967874] [Default] Exiting due to IDE disconnection.
[XCUITest] Error getting screenshot: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up
ends with:
[WebDriverAgent] xcodebuild exited with code '65' and signal 'null'
Link to Appium logs
In this log, the test goes few steps forward before reaching to NSPredicate wdName AND wdLabel
locator search.
Exiting_due_to_IDE_disconnection_2021-02-19
In this log, the test tries to search by NSPredicate wdName AND wdLabel
locator at the very beginning and fails.
Exiting_due_to_IDE_disconnection_2021-02-17-short
I can provide more logs, but they are very similar to provided logs.
Issue Analytics
- State:
- Created 3 years ago
- Comments:22 (5 by maintainers)
Top GitHub Comments
🥇 BIG THANK YOU 🥇 @Dan-Maor and 🥇 @mykola-mokhnach
You solved the problem 💯
The
no_heic
patch fixed the WDA crash at screenshoting 👍Now tests are passing on mentioned iPhone7 device with 14.4 iOS.
Just one note about screenshot quality: when it is default
screenshotQuality=1
, I see too many of these messageswhen it is low
screenshotQuality=2
, I see few of them.With screenshot default quality the test execution took
00:05:37
With screenshot low quality the test execution took00:04:24
, more than 1 minute faster.Screenshots sizes are: Normal quality:
304.6 KB
Low quality:227.3 KB
The visual difference is not big but we can save a lot of time at a full run.Thank you guys once more. You are real savers.
Closing!
I have recently published the patch https://github.com/appium/WebDriverAgent/pull/474, which prevents HEIC screenshots completely. Try it, otherwise I don’t have any more good ideas