0

I am getting the following error trying to run detox test --configuration ios.sim.release:

Error: app binary not found at '/Users/.../ios/build/Build/Products/Release-iphonesimulator/[appname].app', did you build it?

However, the detox build succeeds, so it is built. In addition, everything works correctly with a debug build and test.

Is there any way to work out where it is putting the release build?

I have tried building the app with xcode, react-native run-ios and detox build.

Any help would be appreciated.

Please see my configurations below:

"detox": {
    "test-runner": "mocha",
    "specs": "e2e",
    "runner-config": "e2e/mocha.opts",
    "configurations": {
      "ios.sim.debug": {
        "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/[appname].app",
        "build": "xcodebuild -workspace ios/[appname].xcworkspace -scheme [appname] -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
        "type": "ios.simulator",
        "name": "iPhone 7"
      },
      "ios.sim.release": {
        "binaryPath": "ios/build/Build/Products/Release-iphonesimulator/[appname].app",
        "build": "xcodebuild -workspace ios/[appname].xcworkspace -scheme neonRide -configuration Release -sdk iphonesimulator -derivedDataPath ios/build",
        "type": "ios.simulator",
        "name": "iPhone 7"
      }
    },
    "test-runner": "mocha"
  }

Please see an abridged version of package.json below:

{
  "name": "[appname]",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "babel-cli": "^6.26.0",
    "babel-preset-flow": "^6.23.0",
    "babel-preset-react-native-stage-0": "^1.0.1",
    "detox": "^8.2.3",
    "eslint-config-rallycoding": "^3.2.0",
    "flow-bin": "^0.66.0",
    "jest": "^23.5.0",
    "jest-expo": "^22.0.0",
    "mocha": "^5.2.0",
    "react-test-renderer": "16.0.0-beta.5"
  },
  "scripts": {
    "start": "react-native start",
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "test": "node node_modules/jest/bin/jest.js --watch",
    "build": "babel src/ -d lib/",
    "flow": "flow"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    ...
    "react-native": "^0.55.4",
    ...
  },
  "detox": {
   ... 
}
Mike Bailey
  • 29
  • 1
  • 8
  • can you post your `xcodeSchemes` in `package.json` file? – vk.4884 Sep 03 '18 at 13:40
  • @vk.4884. I have edited my question to include the entire package.json which I think is what you are requesting. Let me know if I have misunderstood. – Mike Bailey Sep 04 '18 at 02:54
  • It seems detox config is missing `runner-config` as in this example. https://github.com/wix/Detox/blob/master/examples/demo-react-native/package.json#L19. Have you tried added this to `detox` configuration. – vk.4884 Sep 04 '18 at 14:58
  • @vk.4884 I added the missing config file params (see the edit). However, it's still not working. Any other ideas? – Mike Bailey Sep 05 '18 at 04:07

0 Answers0