[EarlGrey2] Host background port not assigned. Application under test may have failed to launch with latest Cocoapods
- Dominant language
- Objective-C
- Stars
- 5.7k
- Forks
- 737
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 5
Description
When point the cocoapods to latest earlgrey2 branch, I am seeing an issue with a header (`GREYDescribeVariable.h`) not being accessible in `GREYAssertionDefinesPrivate.h` file.
Once I made `GREYAssertionDefinesPrivate.h` public in Target membership section, The app and test compiled fine and were installed and launched.
After launching, I saw an error: `2023-01-23 10:07:29.305585-0800 [62174:24241479] [EARLGREY-LOG] Application Launch Completed. UI Test with EarlGrey Starting
2023-01-23 10:07:59.307334-0800 [62174:24241479] Fatal failure: Host background port not assigned. Application under test may have failed to launch and/or does not link to EarlGrey's AppFramework. in /Pods/EarlGreyTest/TestLib/DistantObject/GREYTestApplicationDistantObject.m:278`
Podfile:
> target 'TestApp' do
> use_frameworks!
> pod 'eDistantObject', :git => 'https://github.com/google/eDistantObject.git', :branch => 'master'
> pod 'EarlGreyApp', :git => 'https://github.com/google/EarlGrey.git', :branch => 'earlgrey2'
>
> target 'TestAppUITests' do
> # Pods for testing
> use_frameworks!
> pod 'eDistantObject', :git => 'https://github.com/google/eDistantObject.git', :branch => 'master'
> pod 'EarlGreyTest', :git => 'https://github.com/google/EarlGrey.git', :branch => 'earlgrey2'
> end
>
> end
@tirodkar
Contributor guide
Research direction
Start by reproducing the CocoaPods setup in the issue, including the EarlGrey and eDistantObject branches. Inspect GREYAssertionDefinesPrivate.h, GREYDescribeVariable.h, and GREYTestApplicationDistantObject.m at line 278, then verify whether the app and UI test launch and assign the host background port without manual target-membership changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, objective-c
- Domain
- mobile-dev, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100