question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Xcode] Exiting due to IDE disconnection - after searching by NSPredicate name and label on iOS 14.4

See original GitHub issue

The 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

  1. WDA is built correctly in Xcode.
  2. when the test is run, the app and WDA are installed on device.
  3. after install, the app opens as expected.
  4. after app is opened, the test is able to find and click on element which locators are other than NSPredicate wdName AND wdLabel
  5. 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:closed
  • Created 3 years ago
  • Comments:22 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
uteratorcommented, Mar 2, 2021

🥇 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 messages

2021-03-02 16:33:20:432 - [Xcode] 2021-03-02 16:33:20.568470-0500 WebDriverAgentRunner-Runner[2886:2406487] Cannot take a screenshot within 500 ms timeout
2021-03-02 16:33:20:432 - [Xcode]
2021-03-02 16:33:21:011 - [Xcode] 2021-03-02 16:33:21.144729-0500 WebDriverAgentRunner-Runner[2886:2406487] Cannot take a screenshot within 500 ms timeout
2021-03-02 16:33:21:011 - [Xcode]
2021-03-02 16:33:21:585 - [Xcode] 2021-03-02 16:33:21.720322-0500 WebDriverAgentRunner-Runner[2886:2406487] Cannot take a screenshot within 500 ms timeout
2021-03-02 16:33:21:585 - [Xcode]
2021-03-02 16:33:22:132 - [Xcode] 2021-03-02 16:33:22.267819-0500 WebDriverAgentRunner-Runner[2886:2406487] Cannot take a screenshot within 500 ms timeout
2021-03-02 16:33:22:132 - [Xcode]
2021-03-02 16:33:22:672 - [Xcode] 2021-03-02 16:33:22.808284-0500 WebDriverAgentRunner-Runner[2886:2406487] Cannot take a screenshot within 500 ms timeout
2021-03-02 16:33:22:672 - [Xcode]
2021-03-02 16:33:23:247 - [Xcode] 2021-03-02 16:33:23.384327-0500 WebDriverAgentRunner-Runner[2886:2406487] Cannot take a screenshot within 500 ms timeout
2021-03-02 16:33:23:248 - [Xcode]
2021-03-02 16:33:23:798 - [Xcode] 2021-03-02 16:33:23.934492-0500 WebDriverAgentRunner-Runner[2886:2406487] Cannot take a screenshot within 500 ms timeout
2021-03-02 16:33:23:798 - [Xcode]
2021-03-02 16:33:24:370 - [Xcode] 2021-03-02 16:33:24.506803-0500 WebDriverAgentRunner-Runner[2886:2406487] Cannot take a screenshot within 500 ms timeout
2021-03-02 16:33:24:370 - [Xcode]
2021-03-02 16:33:24:944 - [Xcode] 2021-03-02 16:33:25.080646-0500 WebDriverAgentRunner-Runner[2886:2406487] Cannot take a screenshot within 500 ms timeout
...

when 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 took 00: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!

1reaction
mykola-mokhnachcommented, Mar 2, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

XCode 9 XCUITests suddenly fail | Apple Developer Forums
When we installed XCode 9 and went on validating our installation, we noticed some of our UI tests suddenly failed so we investigated...
Read more >
LispWorks® User Guide and Reference Manual
The user guide section of this manual describes the main language-level features and tools available in LispWorks, and how to use them.
Read more >
SwiftUI Essentials - iOS 15 Edition
iOS apps are developed using the iOS SDK in conjunction with Apple's Xcode development environment. Xcode is an integrated development environment (IDE) ...
Read more >
Goodbye NSPredicate, hello Realm Swift Query API - MongoDB
NSPredicate s are used when searching for data in Apple's Core Data database, and so it was a reasonable design decision. It meant...
Read more >
CMIS and Apache Chemistry in Action
Due to my work on the OASIS CMIS Technical Committee (TC) since 2008, ... The OpenCMIS InMemory Repository, as the name suggests, is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found