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

Can't run react-native run-ios with Build Active Architecture Only=NO #23159

Closed
vitalii opened this issue Jan 25, 2019 · 5 comments
Closed

Can't run react-native run-ios with Build Active Architecture Only=NO #23159

vitalii opened this issue Jan 25, 2019 · 5 comments
Labels
Bug Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@vitalii
Copy link

vitalii commented Jan 25, 2019

Environment

  React Native Environment Info:
    System:
      OS: macOS 10.14.2
      CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
      Memory: 1.40 GB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.4.0 - ~/.nvm/versions/node/v10.4.0/bin/node
      Yarn: 1.7.0 - ~/.nvm/versions/node/v10.4.0/bin/yarn
      npm: 6.7.0 - ~/.nvm/versions/node/v10.4.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        API Levels: 27, 28
        Build Tools: 27.0.3, 28.0.3
        System Images: android-25 | Google APIs ARM 64 v8a, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
    IDEs:
      Android Studio: 3.3 AI-182.5107.16.33.5199772
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.3 => 16.6.3
      react-native: ^0.58.3 => 0.58.3
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

Description

Can't build debug scheme with new build system but can and Build Active Architecture Only set to NO

Basically, when I run Fastlane release build or through Xcode it works fine
this is a command from Fastlane/Xcode and it's working fine, binary is built.

xcodebuild -scheme myproject -project ./myproject.xcodeproj -destination 'generic/platform=iOS' -archivePath /Users/me/Library/Developer/Xcode/Archives/2019-01-25/myproject\ 2019-01-25\ 11.13.17.xcarchive archive

But if I try to build debug version on simulator

react-native run-ios simulator="iPhone Xs"
xcodebuild -project myproject.xcodeproj -configuration Debug -scheme myproject -destination id=EF0BB000-FC1C-4E47-BD8C-97C9115D1AF4 -derivedDataPath build

it throws me error

clang: error: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a'

clang: error: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTBlob.a'

clang: error

: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTAnimation.a'

clang: error


: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTActionSheet.a'

clang: error

: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTGeolocation.a'

clang: error

:

no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTImage.a'

clang: error:


no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTLinking.a'

clang: error

: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTNetwork.a'

clang:

error: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTSettings.a'



clang: error: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTText.a'



clang: error

: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTVibration.a'



Ld /Users/me/projects/myProject/ios/build/Build/Intermediates.noindex/myproject.build/Debug-iphonesimulator/myproject.build/Objects-normal/i386/myproject normal i386 (in target: myproject)
    cd /Users/me/projects/myProject/ios
    export IPHONEOS_DEPLOYMENT_TARGET=9.0
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk -L/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator -F/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator -filelist /Users/me/projects/myProject/ios/build/Build/Intermediates.noindex/myproject.build/Debug-iphonesimulator/myproject.build/Objects-normal/i386/myproject.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=9.0 -Xlinker -object_path_lto -Xlinker /Users/me/projects/myProject/ios/build/Build/Intermediates.noindex/myproject.build/Debug-iphonesimulator/myproject.build/Objects-normal/i386/myproject_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lc++ -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/me/projects/myProject/ios/build/Build/Intermediates.noindex/myproject.build/Debug-iphonesimulator/myproject.build/myproject.app-Simulated.xcent -framework JavaScriptCore /Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a /Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libReact.a /Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTBlob.a /Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTAnimation.a /Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTActionSheet.a /Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTGeolocation.a /Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTImage.a /Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTLinking.a /Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTNetwork.a /Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTSettings.a /Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTText.a /Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTVibration.a -lRNGestureHandler -lRCTVideo -Xlinker -dependency_info -Xlinker /Users/me/projects/myProject/ios/build/Build/Intermediates.noindex/myproject.build/Debug-iphonesimulator/myproject.build/Objects-normal/i386/myproject_dependency_info.dat -o /Users/me/projects/myProject/ios/build/Build/Intermediates.noindex/myproject.build/Debug-iphonesimulator/myproject.build/Objects-normal/i386/myproject
clang: error: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a'
clang: error: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTBlob.a'
clang: error: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTAnimation.a'
clang: error: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTActionSheet.a'
clang: error: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTGeolocation.a'
clang: error: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTImage.a'
clang: error: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTLinking.a'
clang: error: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTNetwork.a'
clang: error: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTSettings.a'
clang: error: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTText.a'
clang: error: no such file or directory: '/Users/me/projects/myProject/ios/build/Build/Products/Debug-iphonesimulator/libRCTVibration.a'



** BUILD FAILED **


The following commands produced analyzer issues:

	Analyze /Users/me/projects/myProject/node_modules/react-native/React/Base/RCTModuleMethod.mm normal x86_64
(1 command with analyzer issues)

The following build commands failed:
	Ld /Users/me/projects/myProject/ios/build/Build/Intermediates.noindex/myproject.build/Debug-iphonesimulator/myproject.build/Objects-normal/x86_64/myproject normal x86_64
	Ld /Users/me/projects/myProject/ios/build/Build/Intermediates.noindex/myproject.build/Debug-iphonesimulator/myproject.build/Objects-normal/i386/myproject normal i386
(2 failures)

Installing build/Build/Products/Debug-iphonesimulator/myproject.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/myproject.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist


Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/myproject.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

    at checkExecSyncError (child_process.js:603:11)
    at Object.execFileSync (child_process.js:621:13)
    at Promise.then (/Users/me/projects/myProject/node_modules/react-native/local-cli/runIOS/runIOS.js:208:5)

it will only work when I change Build Active Architecture Only to YES

npm dependecies

  "dependencies": {
    "apollo-cache-inmemory": "^1.3.11",
    "apollo-client": "^2.4.7",
    "apollo-link": "^1.2.6",
    "apollo-link-context": "^1.0.12",
    "apollo-link-error": "^1.1.2",
    "apollo-link-http": "^1.5.7",
    "apollo-link-state": "^0.4.2",
    "formik": "^1.4.2",
    "graphql": "^14.0.2",
    "graphql-tag": "^2.10.0",
    "lodash": "^4.17.11",
    "native-base": "^2.8.1",
    "react": "16.6.3",
    "react-apollo": "^2.3.2",
    "react-native": "^0.57.8",
    "react-native-gesture-handler": "^1.0.10",
    "react-native-video": "^4.0.1",
    "react-navigation": "^3.0.5"
  },
  "devDependencies": {
    "@babel/preset-flow": "^7.0.0",
    "babel-cli": "^6.26.0",
    "babel-eslint": "^8.2.6",
    "babel-jest": "23.6.0",
    "detox": "^10.0.2",
    "eslint": "^5.10.0",
    "eslint-config-airbnb": "^17.1.0",
    "eslint-plugin-flowtype": "^3.2.0",
    "eslint-plugin-import": "^2.14.0",
    "eslint-plugin-jsx-a11y": "^6.1.2",
    "eslint-plugin-react": "^7.11.1",
    "eslint-plugin-react-native": "^3.5.0",
    "flow-bin": "^0.89.0",
    "husky": "^1.2.1",
    "jest": "23.6.0",
    "metro-react-native-babel-preset": "^0.50.0",
    "react-test-renderer": "^16.6.3"
  },

So, wonder why it happens, and what I can do fix it? What's interesting it was working 2 weeks ago, and I didn't change my npm dependencies and was using the same package-lock.json file.
I tried multiple times to clean build, resintall dependencies but haven't managed it to work, with legacy build system as well

@react-native-bot
Copy link
Collaborator

It looks like you are using an older version of React Native. Please update to the latest release, v0.58 and verify if the issue still exists.

The "⏪Old Version" label will be removed automatically once you edit your original post with the results of running react-native info on a project using the latest release.

@dulmandakh
Copy link
Contributor

dulmandakh commented Jan 28, 2019

@vitalii could you please upgrade to 0.58 and check if new build system works?

@vitalii
Copy link
Author

vitalii commented Jan 29, 2019

I have updated version, there is still error if build the app with Build Active Architecture Only=NO
It's working though if set this option to YES

@stale
Copy link

stale bot commented Aug 2, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 2, 2019
@stale
Copy link

stale bot commented Aug 9, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 9, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

5 participants