Bitrise Build Issue Report template
Description of the issue
Error message ‘The build configuration cannot be found in detox.configurations["${program.configuration}"]’ when running under a standard Detox configuration. The project structure has not been modified, it is also working locally. Have tried explicitly passing the config to both the build
and test
as suggested elsewhere. Can anyone help? Thanks.
Environment:
Bitrise XCode 9.4.x MacOS 10.13
Which build Step causes the issue and which version of the step?
detox build & test:
detox clean-framework-cache && detox build-framework-cache
detox build -c ios.sim.debug
detox test -c ios.sim.debug --cleanup
note, I am specifying the config in package.json like this
“detox”: {
“configurations”: {
“ios.sim.debug”: {
“binaryPath”: “…/ios/build/Build/Products/Debug-iphonesimulator/testapp.app”,
“build”: “xcodebuild -project …/ios/testapp.xcodeproj -scheme testapp -configuration Debug -sdk iphonesimulator -derivedDataPath …/ios/build”,
“type”: “ios.simulator”,
“name”: “iPhone 7”
}
},
“specs”: “./detox/base/”,
“test-runner”: “jest”,
“runner-config”: “./detox/config.json”
}
Reproducibility
- Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
-
Does a rebuild without caches help? (You can remove the
Cache:Pull
andCache:Push
steps temporarily to not to use the cache, or you can delete all the caches on theSettings
tab of the app. : NO - Does the issue happen sporadically, or every time? :
- Does upgrading the build Step to the latest version help? : NO
- When did the issue start? : Yesterday
Local reproduction
Can it be reproduced on your own Mac/PC by following our local debug guide? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what bitrise.io will get when it does a git clone in the clean environment! If possible please note which sections you tried.
Build log
- detox build -c ios.sim.debug
/Users/vagrant/git/node_modules/detox/local-cli/detox-build.js:28
throw new Error(Could not find build script in detox.configurations["${program.configuration}"]
);
^
Error: Could not find build script in detox.configurations[“ios.sim.debug”]
at Object. (/Users/vagrant/git/node_modules/detox/local-cli/detox-build.js:28:9)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:10)
at startup (internal/bootstrap/node.js:238:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:572:3) - detox test -c ios.sim.debug --cleanup
/Users/vagrant/git/node_modules/detox/local-cli/detox-test.js:207
if (_.size(config.configurations) === 1) {
^
TypeError: Cannot read property ‘configurations’ of undefined
at getDefaultConfiguration (/Users/vagrant/git/node_modules/detox/local-cli/detox-test.js:207:21)
at Object. (/Users/vagrant/git/node_modules/detox/local-cli/detox-test.js:23:151)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:10)
at startup (internal/bootstrap/node.js:238:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:572:3)