facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.23k stars 24.34k forks source link

Upgrade to 0.68/0.69 Failed on iOS #34140

Closed Nibycz closed 2 years ago

Nibycz commented 2 years ago

New Version

0.68.2 / 0.69.1

Old Version

0.67.2

Build Target(s)

iPhone 12 Pro

Output of react-native info

System: OS: macOS 12.4 CPU: (8) arm64 Apple M1 Memory: 137.78 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.15.0 - /usr/local/bin/node Yarn: 1.22.19 - ~/projects/XXXX-XXX/node_modules/.bin/yarn npm: 8.6.0 - /opt/homebrew/bin/npm Watchman: Not Found Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: API Levels: 29, 30, 31 Build Tools: 28.0.3, 29.0.2, 30.0.2, 31.0.0 System Images: android-29 | Google Play ARM 64 v8a, android-31 | Google APIs ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8193401 Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild Languages: Java: 11.0.12 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Issue and Reproduction Steps

Hello, i want to upgrade my React Native Project to 0.69.1 / 0.68.2 Doesnt matter if i use 0.68.2 or 0.69.1 im getting the same Problems.

2022-07-06 10:53:48.180 xcodebuild[88109:603653] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-07-06 10:53:48.180 xcodebuild[88109:603653] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **

The following build commands failed:
        CompileC /Users/emrah/Library/Developer/Xcode/DerivedData/XXXX-eulyicccbjkthhgqrgfrobeqoyfq/Build/Intermediates.noindex/XXX.build/Debug-iphonesimulator/XXX.build/Objects-normal/arm64/AppDelegate.o /Users/emrah/projects/XXXX/ios/XXX/AppDelegate.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'XXX' from project 'XXX')
(1 failure)

Im facing the same error in both Versions. i checked XCode and there i got this error:

fatal error: module map file '/Users/emrah/Library/Developer/Xcode/DerivedData/XXX-eeorhcitvcndzmbsuknszlrtojie/Build/Products/Release-iphonesimulator/YogaKit/YogaKit.modulemap' not found

My package.json: (in this case i didnt upgrade all deps. Even if i upgrade them i got the same Error.)

{
  "dependencies": {
    "@fortawesome/fontawesome-pro": "^6.1.1",
    "@fortawesome/fontawesome-svg-core": "^6.1.1",
    "@fortawesome/pro-duotone-svg-icons": "^6.1.1",
    "@fortawesome/pro-light-svg-icons": "^6.1.1",
    "@fortawesome/pro-regular-svg-icons": "^6.1.1",
    "@fortawesome/pro-solid-svg-icons": "^6.1.1",
    "@fortawesome/pro-thin-svg-icons": "^6.1.1",
    "@fortawesome/react-native-fontawesome": "^0.2.7",
    "@matrix-org/olm": "^3.2.8",
    "@peculiar/webcrypto": "^1.1.7",
    "@react-native-async-storage/async-storage": "^1.15.9",
    "@react-native-clipboard/clipboard": "^1.10.0",
    "@react-native-community/push-notification-ios": "^1.10.1",
    "@react-native-firebase/app": "^12.9.0",
    "@react-native-firebase/messaging": "^12.9.0",
    "@react-navigation/bottom-tabs": "^6.0.8",
    "@react-navigation/drawer": "^6.1.8",
    "@react-navigation/native": "^6.0.5",
    "@react-navigation/stack": "^6.0.10",
    "@reduxjs/toolkit": "^1.6.2",
    "@wdio/cli": "^7.19.1",
    "@wdio/local-runner": "^7.19.1",
    "@wdio/mocha-framework": "^7.19.1",
    "add": "^2.0.6",
    "asyncstorage-down": "^4.2.0",
    "await-lock": "^2.1.0",
    "axios": "^0.23.0",
    "axios-auth-refresh": "^3.2.1",
    "base-64": "^1.0.0",
    "browser-encrypt-attachment": "^0.3.0",
    "buffer": "^6.0.3",
    "date-fns": "^2.25.0",
    "events": "^3.3.0",
    "fbemitter": "^3.0.0",
    "flux": "^4.0.2",
    "i18next": "^21.3.0",
    "jwt-decode": "^3.1.2",
    "lodash": "4.17.21",
    "matrix-js-sdk": "^17.0.0",
    "moment": "^2.29.1",
    "path-browserify": "1.0.1",
    "process": "^0.11.0",
    "promise.allsettled": "^1.0.5",
    "prop-types": "^15.7.2",
    "qs": "^6.10.1",
    "react": "17.0.2",
    "react-i18next": "^11.11.4",
    "react-native": "0.68.2",
    "react-native-background-timer": "^2.4.1",
    "react-native-base64": "^0.2.1",
    "react-native-blob-util": "^0.13.16",
    "react-native-crypto": "^2.2.0",
    "react-native-encrypted-storage": "^4.0.2",
    "react-native-fast-image": "^8.5.11",
    "react-native-file-viewer": "^2.1.4",
    "react-native-fs": "^2.18.0",
    "react-native-gesture-handler": "^1.10.3",
    "react-native-image-crop-picker": "^0.36.4",
    "react-native-image-viewing": "^0.2.0",
    "react-native-inappbrowser-reborn": "^3.6.3",
    "react-native-keychain": "^8.0.0",
    "react-native-level-fs": "^3.0.1",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-localize": "^2.1.5",
    "react-native-mmkv": "^1.3.3",
    "react-native-mmkv-storage": "^0.6.12",
    "react-native-modalize": "^2.0.8",
    "react-native-progress": "^5.0.0",
    "react-native-push-notification": "^8.1.1",
    "react-native-randombytes": "^3.6.1",
    "react-native-reanimated": "2.2.4",
    "react-native-render-html": "^6.1.0",
    "react-native-restart": "^0.0.22",
    "react-native-safe-area-context": "^3.3.2",
    "react-native-screens": "^3.8.0",
    "react-native-share": "^7.2.0",
    "react-native-splash-screen": "^3.2.0",
    "react-native-svg": "^12.1.1",
    "react-native-url-polyfill": "^1.3.0",
    "react-native-video": "^5.1.1",
    "react-native-web-swiper": "^2.2.1",
    "react-native-webview": "^11.14.0",
    "react-redux": "^7.2.6",
    "readable-stream": "^3.6.0",
    "redux": "^4.1.2",
    "redux-flipper": "^2.0.1",
    "request": "^2.88.2",
    "rn-nodeify": "^10.3.0",
    "rxjs": "^7.5.5",
    "stream-browserify": "^3.0.0",
    "util": "^0.12.4",
    "vm-browserify": "1.1.2",
    "wd": "^1.14.0",
    "xmlhttp-request": "^0.4.1",
    "yarn": "^1.22.15"
  },
  "devDependencies": {
    "@babel/core": "^7.15.8",
    "@babel/plugin-proposal-export-namespace-from": "^7.14.5",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^3.0.2",
    "@types/axios": "^0.14.0",
    "@types/base-64": "^1.0.0",
    "@types/fbemitter": "^2.0.32",
    "@types/flux": "^3.1.10",
    "@types/jest": "^27.0.2",
    "@types/lodash": "4.14.175",
    "@types/qs": "^6.9.7",
    "@types/react": "^17.0.29",
    "@types/react-native": "^0.65.5",
    "@types/react-native-background-timer": "^2.0.0",
    "@types/react-native-push-notification": "^7.3.2",
    "@types/react-native-restart": "^0.0.14",
    "@types/react-native-video": "^5.0.9",
    "@types/react-test-renderer": "^17.0.1",
    "@types/request": "^2.48.7",
    "@typescript-eslint/eslint-plugin": "^5.27.0",
    "@typescript-eslint/parser": "^5.27.0",
    "@wdio/spec-reporter": "^7.19.1",
    "babel-jest": "^28.1.0",
    "babel-plugin-module-resolver": "^4.1.0",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "chromedriver": "^99.0.0",
    "eslint": "^8.16.0",
    "eslint-config-airbnb": "^19.0.4",
    "eslint-config-airbnb-typescript": "^17.0.0",
    "eslint-config-prettier": "^8.5.0",
    "eslint-plugin-import": "^2.26.0",
    "eslint-plugin-jest": "^26.4.6",
    "eslint-plugin-jsx-a11y": "^6.5.1",
    "eslint-plugin-prettier": "^4.0.0",
    "eslint-plugin-react": "^7.30.0",
    "eslint-plugin-react-hooks": "^4.5.0",
    "eslint-plugin-react-native": "^4.0.0",
    "jest": "^28.1.0",
    "metro-react-native-babel-preset": "^0.66.0",
    "prettier": "^2.6.2",
    "react-devtools": "^4.19.2",
    "react-native-codegen": "^0.0.11",
    "react-native-flipper": "^0.144.0",
    "react-native-svg-transformer": "^0.14.3",
    "react-test-renderer": "17.0.2",
    "rn-async-storage-flipper": "^0.0.10",
    "ts-node": "^10.7.0",
    "typescript": "^4.7.2",
    "wdio-chromedriver-service": "^7.3.2"
  },
  "resolutions": {
    "@types/react": "^18.0.1"
  },
  "jest": {
    "preset": "react-native"
  },
  "react-native": {
    "fs": "react-native-level-fs",
    "path": "path-browserify",
    "_stream_transform": "readable-stream/transform",
    "_stream_readable": "readable-stream/readable",
    "_stream_writable": "readable-stream/writable",
    "_stream_duplex": "readable-stream/duplex",
    "_stream_passthrough": "readable-stream/passthrough",
    "stream": "stream-browserify",
    "vm": "vm-browserify",
    "zlib": "browserify-zlib",
    "console": "console-browserify",
    "constants": "constants-browserify",
    "dns": "dns.js",
    "net": "react-native-tcp",
    "domain": "domain-browser",
    "http": "@tradle/react-native-http",
    "https": "https-browserify",
    "os": "react-native-os",
    "querystring": "querystring-es3",
    "dgram": "react-native-udp",
    "timers": "timers-browserify",
    "tty": "tty-browserify",
    "tls": false,
    "crypto": "react-native-crypto"
  },
  "browser": {
    "fs": "react-native-level-fs",
    "path": "path-browserify",
    "_stream_transform": "readable-stream/transform",
    "_stream_readable": "readable-stream/readable",
    "_stream_writable": "readable-stream/writable",
    "_stream_duplex": "readable-stream/duplex",
    "_stream_passthrough": "readable-stream/passthrough",
    "stream": "stream-browserify",
    "vm": "vm-browserify",
    "zlib": "browserify-zlib",
    "console": "console-browserify",
    "constants": "constants-browserify",
    "dns": "dns.js",
    "net": "react-native-tcp",
    "domain": "domain-browser",
    "http": "@tradle/react-native-http",
    "https": "https-browserify",
    "os": "react-native-os",
    "querystring": "querystring-es3",
    "dgram": "react-native-udp",
    "timers": "timers-browserify",
    "tty": "tty-browserify",
    "tls": false,
    "crypto": "react-native-crypto"
  }
}

I tried different XCode Version - Same Problem

pnthach95 commented 2 years ago

Have you tried adding arm64 in Excluded Architecture? I found this in stackoverflow

Nibycz commented 2 years ago

Yes, i tried it, thanks for it. (i already tested it but i didnt build the App through XCode) im using atm RN 0.68.2. I added the arm64in XCode and i can run the App through XCode. I never use XCode to build the App im doing it from the command line. This doesnt work. There i get the error.


2022-07-06 12:30:47.273 xcodebuild[15468:735081] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-07-06 12:30:47.274 xcodebuild[15468:735081] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
pnthach95 commented 2 years ago
2022-07-06 12:30:47.273 xcodebuild[15468:735081] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-07-06 12:30:47.274 xcodebuild[15468:735081] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **

I don't think this is the error caused build failed. I just ran success and had the same log as your.

success Successfully built the app
2022-07-06 17:49:13.507 xcodebuild[12840:83024] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-07-06 17:49:13.508 xcodebuild[12840:83024] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
Nibycz commented 2 years ago

So, i tried it with RN 0.69.1 i changed build active architecture only to YES and it works with XCode. unfortunately not through command line.

here the log:

The following build commands failed:
    CompileC /Users/emrah/Library/Developer/Xcode/DerivedData/XXX-eulyicccbjkthhgqrgfrobeqoyfq/Build/Intermediates.noindex/XXX.build/Debug-iphonesimulator/xxx.build/Objects-normal/arm64/AppDelegate.o /Users/emrah/projects/xxx-app/ios/xxx/AppDelegate.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'xxx' from project 'xxx')
(1 failure)
pnthach95 commented 2 years ago

I see you have AppDelegate.m in log. I think you deleted it but forgot to replace it with the .mm file in .xcodeproj file. Open Xcode replace it.

EDIT: Wait, why does it work with Xcode, but not command line?

Nibycz commented 2 years ago

So, i removed the AppDelegate.m in the .xcodeworkspace (app does not build in xcodeproj). in my VSC i can see that i have the .mm File but not in my .xcodeworkspace

Well, i dont know why my App builds with xcode and not with commandline. My CommandLineTools are the same version as XCode

EDIT: I have the AppDelegate.mm but this file is not shown in my .xcodeworkspace only in VSC

Nibycz commented 2 years ago

So, i changed the .m file to .mm and now i can run the app through terminal. Now it doesnt work in XCode

pnthach95 commented 2 years ago

So, i removed the AppDelegate.m in the .xcodeworkspace (app does not build in xcodeproj).

I mean when you open .xcworkspace to edit something, .xcodeproj file is changed eventually

Now it doesnt work in XCode

You have to open Xcode and dive into it to fix it yourself. But if you only run project via command line, you can ignore it. I'm just not sure about build release process is successful or not.

Nibycz commented 2 years ago

Well, it works now. I had a Problem with my mainjs bundle but i fixed it. The app is working now from cmd and XCode. I did the same process which u said above again with the AppDelegate and now it works.

Thanks for your help!