Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
richardgillzdev opened this issue Jun 29, 2017 · 9 comments

Comments

@richardgillzdev
Copy link

richardgillzdev commented Jun 29, 2017

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

@kylealwyn
Copy link

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

@kylealwyn
Copy link

kylealwyn commented Jun 29, 2017

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.

@thekevinbrown
Copy link
Owner

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
Copy link
Owner

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?

@adamtysonsmith
Copy link

adamtysonsmith commented Nov 8, 2017

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

@thekevinbrown
Copy link
Owner

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

@orelmax
Copy link

orelmax commented Apr 6, 2018

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

@thekevinbrown
Copy link
Owner

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!

@rajivshah3
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants