Detox 17.4.5 Failing Tests Because Detox.framework could not be found as a result of Xcode version bump to 11.7

Description

The bug appeared with the update to Xcode 11.7. I’m using Detox 17.4.5 (just updated with yarn upgrade) and the detox build command appears to work (though it runs quickly), but when running detox test I get the following error:

Error: XXX/Detox/iOS/xxx/Detox.framework could not be found, this means either you changed a version of Xcode or Detox postinstall script was unsuccessful.
      To attempt a fix try running 'detox clean-framework-cache && detox build-framework-cache'

However, when I try running ‘detox clean-framework-cache && detox build-framework-cache’, I get the following related error:

Error: Command failed: xxx/node_modules/detox/scripts/build_framework.ios.sh

When I try to run each command separately, I get the same result for both.

  • [Yes ] I have tested this issue on the latest Detox release and it still reproduces

Reproduction

Provide the steps necessary to reproduce the issue. If you are seeing a regression, try to provide the last known version where the issue did not reproduce.

  1. Upgrade Xcode to version 11.7
  2. Upgrade Detox to 17.4.5
  3. Run Detox Build
  4. Run Detox Test

Expected behavior

The expected behavior is that the tests run.

Environment (please complete the following information):

  • Detox: 17.4.5
  • React Native: 0.62.2
  • Node: 12.18.0
  • Device: iPhone Simulator
  • Xcode: 11.7
  • iOS: 13.7
  • macOS: Catalina 10.15.6

1 possible answer(s) on “Detox 17.4.5 Failing Tests Because Detox.framework could not be found as a result of Xcode version bump to 11.7

  1. Yes. Next time, when you switch Xcode, just run detox rebuild-framework-cache and it will recreate the cache for you; no need to npm install.