react-native-schemes-manager icon indicating copy to clipboard operation
react-native-schemes-manager copied to clipboard

Cannot read property 'Symbol(Symbol.iterator)' of undefined during react-native-schemes-manager all

Open richardgillzdev opened this issue 7 years ago • 9 comments

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

richardgillzdev avatar Jun 29 '17 16:06 richardgillzdev

Encountering this issue this morning as well, seemingly out of nowhere

kylealwyn avatar Jun 29 '17 16:06 kylealwyn

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.

kylealwyn avatar Jun 29 '17 16:06 kylealwyn

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.

thekevinbrown avatar Jul 05 '17 03:07 thekevinbrown

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?

thekevinbrown avatar Jul 14 '17 04:07 thekevinbrown

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

adamtysonsmith avatar Nov 08 '17 04:11 adamtysonsmith

Does anyone know if this is still happening in v1.0.3?

thekevinbrown avatar Apr 03 '18 11:04 thekevinbrown

@blargity just happened to me with v1.0.4. Although in my case i have an empty "debug" array.

orelmax avatar Apr 06 '18 14:04 orelmax

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!

thekevinbrown avatar Apr 09 '18 12:04 thekevinbrown

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

rajivshah3 avatar Aug 14 '19 20:08 rajivshah3