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

Unable to run tests #4359

Open
mikeme1122 opened this issue Feb 6, 2024 · 5 comments
Open

Unable to run tests #4359

mikeme1122 opened this issue Feb 6, 2024 · 5 comments

Comments

@mikeme1122
Copy link

Description

I have Detox set up for our project, and it appears to be functioning correctly for my colleagues who are using Macs with M chips. However, we've encountered an issue on one Mac with an Intel chip, and I'm uncertain if that might be the root cause.

The problem manifests when attempting to execute the tests using npm run e2e:ios, resulting in the following error:

DetoxRuntimeError: /Users/mikeme/Library/Detox/ios/1e0e383df9a61c49c49d7831dacfe193589825c0/Detox.framework could not be found. This suggests either a change in the version of Xcode or an unsuccessful Detox post-install script.
To attempt a fix, you can try running 'detox clean-framework-cache && detox build-framework-cache'.

However, running the suggested command to clean the cache yields the following warning:

WARNING: Xcode is not installed on this machine. Skipping iOS framework build phase.

This is perplexing, as Xcode is indeed installed on the Mac. I've attempted to address the issue by reinstalling Xcode, but unfortunately, this hasn't resolved the problem. Additionally, I've ensured that both the macOS (Sonoma 14.3) and Xcode are updated to their latest versions, yet the issue persists.

Your environment

Detox version: 20.17.0
React Native version: 0.71.14
Node version: 20.11.0
Device model: MacBook Pro 2019
OS: Sonoma 14.3
Test-runner: jest 29.6.1

@noomorph
Copy link
Collaborator

noomorph commented Feb 6, 2024

Are you able to run xcrun from your terminal?

@mikeme1122
Copy link
Author

When I run this command in the terminal, here's what I'm getting:

Usage: xcrun [options] <tool name> ... arguments ...

Find and execute the named command line tool from the active developer
directory.

The active developer directory can be set using `xcode-select`, or via the
DEVELOPER_DIR environment variable. See the xcrun and xcode-select manual
pages for more information.

Options:
  -h, --help                  show this help message and exit
  --version                   show the xcrun version
  -v, --verbose               show verbose logging output
  --sdk <sdk name>            find the tool for the given SDK name
  --toolchain <name>          find the tool for the given toolchain
  -l, --log                   show commands to be executed (with --run)
  -f, --find                  only find and print the tool path
  -r, --run                   find and execute the tool (the default behavior)
  -n, --no-cache              do not use the lookup cache
  -k, --kill-cache            invalidate all existing cache entries
  --show-sdk-path             show selected SDK install path
  --show-sdk-version          show selected SDK version
  --show-sdk-build-version    show selected SDK build version
  --show-sdk-platform-path    show selected SDK platform path
  --show-sdk-platform-version show selected SDK platform version

@tbntdima
Copy link

tbntdima commented Feb 9, 2024

@noomorph are there any updates on this? I'm experiencing the same issue 😢

@noomorph
Copy link
Collaborator

According to the script:

https://github.com/wix/Detox/blob/master/detox/scripts/build_framework.ios.sh

the error message you see if caused by your shell being not able to find xcodebuild.

Copy link

stale bot commented Mar 17, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back.

Thank you for your contributions!

For more information on bots in this repository, read this discussion.

@stale stale bot added the 🏚 stale label Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants