Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EarlGrey2] Host background port not assigned. Application under test may have failed to launch with latest Cocoapods #1891

Open
badrinrs opened this issue Jan 23, 2023 · 1 comment

Comments

@badrinrs
Copy link

badrinrs commented Jan 23, 2023

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

@badrinrs badrinrs changed the title Host background port not assigned. Application under test may have failed to launch with latest Cocoapods [EarlGrey2] Host background port not assigned. Application under test may have failed to launch with latest Cocoapods Jan 23, 2023
@enlivn
Copy link

enlivn commented Sep 26, 2023

@badrinrs I'm not sure if you managed to figure this out but this error usually happens if you're trying to use an EG function before your XCUIApplication has actually finished booting up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants