What's going on?
Steps to reproduce
ignite doctor results:
System
platform darwin
arch x64
cpu 4 cores Intel(R) Core(TM) i5-5287U CPU @ 2.90GHz
directory /Users/xxxx
JavaScript
node 8.9.1 /Users/xxxx/.nvm/versions/node/v8.9.1/bin/node
npm 5.6.0 /Users/xxxx/.nvm/versions/node/v8.9.1/bin/npm
yarn 1.12.3 /Users/xxxx/.nvm/versions/node/v8.9.1/bin/yarn
React Native
react-native-cli 2.0.1
Ignite
ignite 2.1.2 /Users/xxxx/.nvm/versions/node/v8.9.1/bin/ignite
Android
java 1.8.0_101 /usr/bin/java
android home - /Users/xxxx/Library/Android/sdk
iOS
xcode 10.1
error message:
an error occured while installing ignite-ir-boilerplate-bowser boilerplate.
Error: Command failed: react-native link
rnpm-install ERR! Something went wrong while linking. Error: Maximum call stack size exceeded
Please file an issue here: https://github.com/facebook/react-native/issues
Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
at merge_obj (/Users/xxxx/node_modules/xcode/lib/parser/pbxproj.js:1883:25)
at merge_obj (/Users/xxxx/node_modules/xcode/lib/parser/pbxproj.js:1888:24)
at merge_obj (/Users/xxxx/node_modules/xcode/lib/parser/pbxproj.js:1888:24)
at merge_obj (/Users/xxxx/node_modules/xcode/lib/parser/pbxproj.js:1888:24)
at merge_obj (/Users/xxxx/node_modules/xcode/lib/parser/pbxproj.js:1888:24)
at merge_obj (/Users/xxxx/node_modules/xcode/lib/parser/pbxproj.js:1888:24)
at merge_obj (/Users/xxxx/node_modules/xcode/lib/parser/pbxproj.js:1888:24)
at merge_obj (/Users/xxxx/node_modules/xcode/lib/parser/pbxproj.js:1888:24)
at merge_obj (/Users/xxxx/node_modules/xcode/lib/parser/pbxproj.js:1888:24)
at merge_obj (/Users/xxxx/node_modules/xcode/lib/parser/pbxproj.js:1888:24)
@zuijiaoluo Thanks for reporting, this issue was introduced recently; we will get on this.
This error was probably caused by ignite-ir-boilerplate-bowser
I ran git bisect on Bowser, starting with commit 3f4f9c4 (in Bowser)
The result showed the first bad commit as f01a5c3:
f01a5c3716ca944a5de4abf0aacf48f23ed45d49 is the first bad commit
commit f01a5c3716ca944a5de4abf0aacf48f23ed45d49
Author: Jamon Holmgren <[email protected]>
Date: Wed Nov 14 12:53:12 2018 -0800
Upgraded React Native to version 0.57.5, fixed `new` errors
:100644 100644 e52382ba7426f328925d82a03f649486defbf839 e80ef88f240b496e5406e0ba75b8f84a447edacf M boilerplate.js
:040000 040000 908268cafd151f95d34d795ce7aed8f1afa97018 333f9dcb1a0008fc602bd07fd5704db6e669c32c M boilerplate
:040000 040000 2c2646de709d479eaf4dcfabd5d0b96ab4497d17 d5e38dbd501c5d8e289ee5bff9e920943f16f412 M lib
This error occurs when Bowser runs react-native link (in its boilerplate.js)
When opening a project in XCode, items appear in a group in the project
explorer called "Recovered References". For each of these items, correpsonding
entires are added to project.pbxproj.
After this is done, react-native link will work without this error.
I mistakenly thought that react-native link was the cause of the changes in
project.pbxproj. Those changes are made BY XCODE upon opening the project!
So this issue could be fixed by programatically doing whatever XCode does,
immediately before running react-native link
โ But how does XCode do this?
I dug into this a bit, without resolution; here's as far as I got:
ignite new when it runs react-native link. That uses the xcode library to parse the project.pbxproj file, and that parser chokes and dies.merge_obj that deeply-merges two objects. Thereโs only one place where it gets called; if I console.log the objects being merged at that point, I get a ton of output that ends with this, which should be the ones it choked on:{ ASSETCATALOG_COMPILER_APPICON_NAME: 'AppIcon', ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME: 'LaunchImage',
CURRENT_PROJECT_VERSION: 1,
DEAD_CODE_STRIPPING: 'NO',
HEADER_SEARCH_PATHS:
[ '"$(inherited)"',
'"$(SRCROOT)/../node_modules/react-native-splash-screen/ios"' ],
INFOPLIST_FILE: 'bows/Info.plist',
LD_RUNPATH_SEARCH_PATHS: '"$(inherited) @executable_path/Frameworks"',
OTHER_LDFLAGS: [ '"$(inherited)"', '"-ObjC"', '"-lc++"' ],
PRODUCT_BUNDLE_IDENTIFIER:
'"org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"',
PRODUCT_NAME: 'bows',
VERSIONING_SYSTEM: '"apple-generic"' }
{ HEADER_SEARCH_PATHS:
[ '"$(inherited)"',
'"$(SRCROOT)/../node_modules/react-native-keychain/RNKeychainManager"',
'"$(SRCROOT)/../node_modules/react-native-languages/ios"',
'"$(SRCROOT)/../node_modules/react-native-splash-screen/ios"' ] }
'"$(inherited)"' and '"$(SRCROOT)/../node_modules/react-native-splash-screen/ios"'.I'm guessing that this isn't a problem with the merge_obj function - I think whatever modified the pbxproj file corrupted it. Further, since it mentions splash screens, I suspect that one of the splash screen patches is doing it, but haven't had a chance to dig further.
Is there any new progress?
Might be the splash-screen.patch that's the culprit. I had many issues with it when upgrading the bowser boilerplate previously.
We have a potential fix up in https://github.com/infinitered/ignite-ir-boilerplate-bowser/pull/127, just need to fix the CI and we'll get a new version up. @zuijiaoluo @nirre7
Closing since https://github.com/infinitered/ignite-bowser/pull/127 is merged.
Please open new issue if necessary.
Most helpful comment
Is there any new progress?