# iOS Ui test: Failed to get matching snapshot: Lost connection to the application

**URL:** <https://discuss.bitrise.io/t/ios-ui-test-failed-to-get-matching-snapshot-lost-connection-to-the-application/14796>\
**Category:** Builds\
**Tags:** ios\
**Created:** [November 9, 2020, 6:05pm UTC](https://discuss.bitrise.io/t/ios-ui-test-failed-to-get-matching-snapshot-lost-connection-to-the-application/14796 "2020-11-09T18:05:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericmar](https://avatars.discourse-cdn.com/v4/letter/e/ad7895/32.png) [@ericmar](https://discuss.bitrise.io/u/ericmar)\
**Post date:** [November 9, 2020, 6:05pm UTC](https://discuss.bitrise.io/t/ios-ui-test-failed-to-get-matching-snapshot-lost-connection-to-the-application/14796/1 "2020-11-09T18:05:32Z")

</div>

# Bitrise Build Issue Report template

## Description of the issue

Our iOS project XCUITest suites fails to run in Bitrise. According to the logs the app fails to launch on the simulators but also the XCUITest server is unable to find the app bundle.

_Please describe the issue here_  
Run the test workflow  
Application launches  
Enter credentials  
Press Log In  
Application fails

Second run in the test  
App fails to launch

## Environment:

**Where did the issue happen?**  
Can only repro the issue in Bitrise  
`Xcode 12.1.x` MAC OS 10.15.6 Elite

**Which build Step causes the issue and which version of the step?**  
XCode Test For iOS

## Reproducibility

- _Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build)_ : NO

- _Does a rebuild without caches help? (You can remove the `Cache:Pull` and `Cache:Push` steps temporarily to not to use the cache, or [you can delete all the caches on the `Settings` tab of the app](http://devcenter.bitrise.io/caching/about-caching/#downloading-and-deleting-caches)._ : NO

- _Does the issue happen sporadically, or every time?_ : EVERY TIME

- _Does upgrading the build Step to the latest version help?_ : NO

- _When did the issue start?_ : November 3rd after updating one of our Pods.

### Local reproduction

_Can it be reproduced on your own Mac/PC by following our [local debug guide](http://discuss.bitrise.io/t/how-to-debug-your-build-locally-it-works-on-my-mac-pc-but-not-on-bitrise-io/392)? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what [bitrise.io](http://bitrise.io) will get when it does a git clone in the clean environment! If possible please note which sections you tried._  
IT CANNOT BE REPRO LOCALLY with Bitrise CLI bitrise run [workflow]

## Build log

`Failed to get matching snapshot: Lost connection to the application (pid 7805). (Underlying Error: Couldn’t communicate with a helper application. Try your operation again. If that fails, quit and relaunch the application and try again. The connection to service on pid 0 created from an endpoint was invalidated.)`

\_Please copy paste the build’s [bitrise.io](http://bitrise.io) URL here (or if the issue happens somewhere else then the full logs),  
[Log in - Bitrise](https://app.bitrise.io/build/6bb7df1a9818390d#?tab=log)

Also reported in April

> [@iOS device testing for UITest: Failed to get matching snapshot, Lost connection to the application ,but locally passed tests](http://discuss.bitrise.io/t/ios-device-testing-for-uitest-failed-to-get-matching-snapshot-lost-connection-to-the-application-but-locally-passed-tests/12128/2):
>
> Hi @yi.zhang! Can you please include an URL for the build where this happened? Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)\
**Post date:** [December 9, 2020, 6:05pm UTC](https://discuss.bitrise.io/t/ios-ui-test-failed-to-get-matching-snapshot-lost-connection-to-the-application/14796/2 "2020-12-09T18:05:33Z")

</div>

Closed on December 9, 2020, 6:05pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
