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

[EarlGrey1] "Failed to load the test bundle" error in Xcode 14 #1844

Open
adil-hussain-84 opened this issue Nov 1, 2022 · 0 comments
Open

Comments

@adil-hussain-84
Copy link

adil-hussain-84 commented Nov 1, 2022

Running EarlGrey1 tests against the iOS 13 Simulator is possible in Xcode 13 and older versions but not in Xcode 14.0, Xcode 14.1 and possibly newer versions of Xcode 14.

Running EarlGrey1 tests in Xcode 14.0 and Xcode 14.1 results in the following error:

  Assertions: System: Failed to load the test bundle. If you believe this error represents a bug, please attach the result bundle at /Users/adilhussain/Library/Developer/Xcode/DerivedData/EarlGreyExperiment-dxfuddrtpdijnhhhmgkzxzvtmhad/Logs/Test/Test-EarlGreyExperiment-2022.11.01_08-37-29-+0000.xcresult. (Underlying Error: The bundle “EarlGreyExperimentTests” couldn’t be loaded because it is damaged or missing necessary resources. The bundle is damaged or missing necessary resources. Try reinstalling the bundle. dlopen_preflight(/Users/adilhussain/Library/Developer/CoreSimulator/Devices/67BA52C5-FF97-4A73-ABEB-4AE4718BDD82/data/Containers/Bundle/Application/7A233CF7-ECC2-42C9-9633-3AC76296F0C6/EarlGreyExperiment.app/PlugIns/EarlGreyExperimentTests.xctest/EarlGreyExperimentTests): Library not loaded: @rpath/XCTest.framework/XCTest
  Referenced from: /Users/adilhussain/Library/Developer/CoreSimulator/Devices/67BA52C5-FF97-4A73-ABEB-4AE4718BDD82/data/Containers/Bundle/Application/7A233CF7-ECC2-42C9-9633-3AC76296F0C6/EarlGreyExperiment.app/PlugIns/EarlGreyExperimentTests.xctest/Frameworks/EarlGrey.framework/EarlGrey
  Reason: Incompatible library version: EarlGrey requires version 1.0.0 or later, but XCTest provides version 0.0.0)

You can see this error firsthand in this super simple Xcode workspace. The tests in this workspace run fine in Xcode 13 but not in Xcode 14.

Note: I am aware that EarlGrey1 is deprecated. I am sharing this as a point of information for anyone like me who still has EarlGrey1 tests that they have not yet migrated away from EarlGrey1.

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

1 participant