react-native-schemes-manager
react-native-schemes-manager copied to clipboard
Cannot read property 'Symbol(Symbol.iterator)' of undefined during react-native-schemes-manager all
I've been trying to use the react-native-schemes-manager all
with my xcodeSchemes
set to
"xcodeSchemes": {
"Debug": [
"DebugStaging"
]
}
I'm running node 7.10.0
and using "react-native-schemes-manager": "^1.0.0-beta.8",
but keep getting the error
> react-native-schemes-manager all && (cd ios && pod install) && npm run check:node
Hiding schemes from node_modules xcode projects.
ios/live2leave.xcodeproj
- [fix-script]: ios/live2leave.xcodeproj skipped
✔ [fix-libraries]: Debug -> DebugStaging created in node_modules/react-native-branch/ios/RNBranch.xcodeproj
/Users/johngill/Workspace/live2leave-mobile/node_modules/react-native-schemes-manager/src/fix-libraries.js:33
for (const destinationBuildConfig of mappings[sourceBuildConfig]) {
^
TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined
at updateProject (/Users/johngill/Workspace/live2leave-mobile/node_modules/react-native-schemes-manager/src/fix-libraries.js:33:48)
at utilities.updateProjectsMatchingGlob (/Users/johngill/Workspace/live2leave-mobile/node_modules/react-native-schemes-manager/src/fix-libraries.js:82:10)
at getFilesMatchingGlob (/Users/johngill/Workspace/live2leave-mobile/node_modules/react-native-schemes-manager/src/utilities.js:70:8)
at glob (/Users/johngill/Workspace/live2leave-mobile/node_modules/react-native-schemes-manager/src/utilities.js:45:5)
at f (/Users/johngill/Workspace/live2leave-mobile/node_modules/once/once.js:25:25)
at Glob.<anonymous> (/Users/johngill/Workspace/live2leave-mobile/node_modules/glob/glob.js:151:7)
at emitOne (events.js:96:13)
at Glob.emit (events.js:191:7)
at Glob._finish (/Users/johngill/Workspace/live2leave-mobile/node_modules/glob/glob.js:199:8)
at done (/Users/johngill/Workspace/live2leave-mobile/node_modules/glob/glob.js:184:14)
Any thoughts you have would be appreciated
Encountering this issue this morning as well, seemingly out of nowhere
Found my issue. I recently removed Debug
field in xcodeSchemes
config as it was causing some build issues but it seems to be required. You may want to try adding a Release
key with an empty array as the value.
Yeah, the Debug scheme is definitely required as we copy its configuration all over the place. We should probably have a better error message for this though.
I tried in quite a few ways to get this to happen on a starter project today and couldn't replicate. @kylealwyn or @richardgillzdev, could either of you do up a repro case so I can fix this properly?
I had this error and assumed it was trying to iterate through the Release
array that I removed. I added it back in and everything ran fine:
"xcodeSchemes": {
"Debug": [
"DebugStaging"
],
"Release": []
}
You would then have 3 schemes:
Debug
Release
DebugStaging
Does anyone know if this is still happening in v1.0.3?
@blargity just happened to me with v1.0.4. Although in my case i have an empty "debug" array.
Thanks @orelmax, next time I'm doing React Native stuff I'll have a look, or if someone wants to make a PR in the meantime that'd be very much appreciated!
Looks like it's still occurring on the latest version (2.0.0). I can take a closer look and hopefully make a PR to fix it