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

Error on build iOS PhaseScriptExecution after upgrade #31748

Closed
RigottiG opened this issue Jun 18, 2021 · 12 comments
Closed

Error on build iOS PhaseScriptExecution after upgrade #31748

RigottiG opened this issue Jun 18, 2021 · 12 comments

Comments

@RigottiG
Copy link

Description

Has an error to build the app after upgrade to React Native 0.64.2

React Native version:

System:
    OS: macOS 11.4
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 445.62 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 15.8.0 - /usr/local/opt/nvm/versions/node/v15.8.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.5.1 - /usr/local/opt/nvm/versions/node/v15.8.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /Users/guilhermerigotti/.rubies/ruby-3.0.1/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK: Not Found
  IDEs:
    Android Studio: 4.2 AI-202.7660.26.42.7351085
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.8 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: Not Found
    react-native: Not Found
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Upgrade react native version to 0.64.2
  2. Run build

Expected Results

Working well

Snack, code example, screenshot, or link to a repository:

image

The following build commands failed:
        PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/guilhermerigotti/Library/Developer/Xcode/DerivedData/MarketplaceZZ-bheshaapcwmmexacckshwnfmwppt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-01764D7489242E53DEA0875FA864C1DC.sh
(1 failure)
@mickael-h
Copy link

Same issue here. Following...

@SConaway
Copy link
Contributor

Is there any more detail in the logs? If you can't get them there, maybe try building in XCode and then grabbing logs from there.

@hipages-ligang
Copy link

Same issue

@evaei
Copy link

evaei commented Jul 24, 2021

The same issue, Following this thread.

@timjam
Copy link

timjam commented Aug 18, 2021

I started to have this issue already on RN 0.64.1 after upgrading to Big Sur. Updated RN to 0.64.2 and the problem still persists. The problem might not have anything to do with 0.64.2 itself

Current env:

System:
    OS: macOS 11.5.2
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 434.15 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.5 - ~/.nvm/versions/node/v14.17.5/bin/node
    Yarn: 2.4.1 - /usr/local/bin/yarn
    npm: 6.14.14 - ~/.nvm/versions/node/v14.17.5/bin/npm
    Watchman: 2021.08.02.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK:
      API Levels: 26, 28, 29, 30
      Build Tools: 26.0.0, 26.0.1, 26.0.2, 26.0.3, 28.0.3, 29.0.0, 29.0.1, 29.0.2, 29.0.3, 30.0.0
      System Images: android-26 | Intel x86 Atom, android-26 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom_64, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6626763
    Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_252 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: * => 17.0.1 
    react-native: 0.64.2 => 0.64.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

@berchan
Copy link

berchan commented Sep 13, 2021

Same issue, Completely clean the project cache does not work. when remove FBReactNativeSpec target's [CP-User] Generate Specs item, build success

env:
system: macOS Big Sur 11.2.1
xcode : 12.5

"react": "17.0.2",
"react-native": "0.65.1"

CocoaPods: 1.10.1

@mindira5
Copy link

@berchan I am facing same issue, the local xcode build is working fine but the archive build from github-actions is failing. Can you let us know how to remove FBReactNativeSpec target's [CP-User] Generate Specs item

@berchan
Copy link

berchan commented Sep 17, 2021

@mindira5 remove it in FBReactNativeSpec target build phase. i have fixed it when running "nvm unalias default" FBReactNativeSpec error after upgrade from 0.63.4 to 0.64.0 #138

@qgxpagamentos
Copy link

qgxpagamentos commented Nov 14, 2021

@berchan I am facing same issue, the local xcode build is working fine but the archive build from github-actions is failing. Can you let us know how to remove FBReactNativeSpec target's [CP-User] Generate Specs item

I'm having the same problem on Github Actions.

The following build commands failed:
	PhaseScriptExecution [CP]\ Copy\ XCFrameworks /Users/runner/Library/Developer/Xcode/DerivedData/appcardview-gbsbuuvggegwokbqlthgedyztsge/Build/Intermediates.noindex/ArchiveIntermediates/appcardview/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/EXStructuredHeaders.build/Script-FE2D2A8ABFF57EA7EA4B321A2D77B079.sh
(1 failure)

I'm using react-native 0.66.1 and Xcode11

My app doesn't use Expo.
I did several tests like including the "react-native-unimodules" package.

My dependencies on package.json

"@fnando/cnpj": "^1.0.2",
    "@fnando/cpf": "^1.0.2",
    "@ptomasroos/react-native-multi-slider": "^2.2.2",
    "@react-native-async-storage/async-storage": "^1.15.9",
    "@react-native-firebase/analytics": "^12.9.2",
    "@react-native-firebase/app": "^12.9.2",
    "@react-native-firebase/auth": "^12.9.2",
    "@react-native-firebase/crashlytics": "^12.9.2",
    "@react-native-firebase/database": "^12.9.2",
    "@react-navigation/compat": "^5.3.20",
    "@react-navigation/elements": "^1.2.1",
    "@react-navigation/native": "^6.0.2",
    "@react-navigation/stack": "^6.0.7",
    "@tele2/react-native-select-input": "^1.1.0",
    "axios": "^0.23.0",
    "babel-plugin-root-import": "^6.6.0",
    "base-64": "^1.0.0",
    "buffer": "^6.0.3",
    "configstore": "^6.0.0",
    "crc": "^3.8.0",
    "dayjs": "^1.10.7",
    "google-libphonenumber": "^3.2.25",
    "hybrid-crypto-js": "^0.2.4",
    "i18n-js": "^3.8.0",
    "jwt-decode": "^3.1.2",
    "lodash": "^4.17.21",
    "lottie-ios": "^3.2.3",
    "native-base": "^3.2.1",
    "otp-client": "^1.0.3",
    "prop-type": "0.0.1",
    "prop-types": "^15.7.2",
    "react": "17.0.2",
    "react-app-rewire-eslint": "^0.2.3",
    "react-app-rewired": "^2.1.3",
    "react-dom": "16.13.1",
    "react-native": "~0.66.1",
    "react-native-animatable": "^1.3.3",
    "react-native-barcode-mask": "^1.2.4",
    "react-native-config": "^1.4.5",
    "react-native-device-info": "^8.4.1",
    "react-native-document-picker": "^7.1.1",
    "react-native-elements": "^3.4.2",
    "react-native-fingerprint-scanner": "^6.0.0",
    "react-native-fs": "^2.18.0",
    "react-native-geolocation-service": "^5.3.0-beta.3",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-google-play-install-referrer": "^1.0.0",
    "react-native-image-picker": "^4.1.2",
    "react-native-image-resizer": "^1.4.5",
    "react-native-keyboard-aware-scroll-view": "^0.9.4",
    "react-native-keychain": "^8.0.0",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-masked-text": "^1.13.0",
    "react-native-modal": "^12.0.3",
    "react-native-onesignal": "^4.3.1",
    "react-native-orientation-locker": "^1.3.1",
    "react-native-paper": "^4.10.0",
    "react-native-permissions": "^3.1.0",
    "react-native-picker-select": "^8.0.4",
    "react-native-progress-circle": "^2.1.0",
    "react-native-qrcode-scanner": "^1.5.4",
    "react-native-reanimated": "~2.2.0",
    "react-native-rsa-native": "^2.0.4",
    "react-native-safe-area-context": "^3.3.2",
    "react-native-screens": "^3.4.0",
    "react-native-share": "^7.2.1",
    "react-native-svg": "^12.1.1",
    "react-native-swipeable": "^0.6.0",
    "react-native-swiper": "^1.6.0",
    "react-native-unimodules": "^0.14.10",
    "react-native-vector-icons": "^9.0.0",
    "react-native-web": "~0.13.12",
    "react-native-webview": "^11.14.2",
    "rxjs": "^7.4.0",
    "sprintf-js": "^1.1.2",
    "styled-components": "^5.3.3",
    "styled-system": "^5.1.5",
    "unimodules-app-loader": "^3.0.0",
    "update-notifier": "^5.1.0"

Podfile

require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '12.0'
target 'appcardview' do
  use_unimodules!
  config = use_native_modules!
  use_react_native!(
    :path => config[:reactNativePath],
    :hermes_enabled => false
  )

  permissions_path = '../node_modules/react-native-permissions/ios'
  pod 'RNPermissions', :path => '../node_modules/react-native-permissions'
  pod 'Permission-AppTrackingTransparency', :path => "#{permissions_path}/AppTrackingTransparency"
  pod 'Permission-BluetoothPeripheral', :path => "#{permissions_path}/BluetoothPeripheral"
  pod 'Permission-Calendars', :path => "#{permissions_path}/Calendars"
  pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
  pod 'Permission-Contacts', :path => "#{permissions_path}/Contacts"
  pod 'Permission-FaceID', :path => "#{permissions_path}/FaceID"
  pod 'Permission-LocationAccuracy', :path => "#{permissions_path}/LocationAccuracy"
  pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways"
  pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"
  pod 'Permission-MediaLibrary', :path => "#{permissions_path}/MediaLibrary"
  pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone"
  pod 'Permission-Motion', :path => "#{permissions_path}/Motion"
  pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
  pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"
  pod 'Permission-PhotoLibraryAddOnly', :path => "#{permissions_path}/PhotoLibraryAddOnly"
  pod 'Permission-Reminders', :path => "#{permissions_path}/Reminders"
  pod 'Permission-Siri', :path => "#{permissions_path}/Siri"
  pod 'Permission-SpeechRecognition', :path => "#{permissions_path}/SpeechRecognition"
  pod 'Permission-StoreKit', :path => "#{permissions_path}/StoreKit"
  pod 'GoogleMLKit/TextRecognition'
  pod 'GoogleMLKit/FaceDetection'
  pod 'GoogleMLKit/BarcodeScanning'
  use_flipper!()
  pod 'react-native-camera', path: '../node_modules/react-native-camera', subspecs: [
    'FaceDetectorMLKit', 'TextDetector', 'BarcodeDetectorMLKit'
  ]
  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)

    installer.pods_project.targets.each do |target|
      if target.name == 'react-native-google-maps'
        target.build_configurations.each do |config|
          config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
        end
      end
      # Fix for xCode build errors: https://github.com/facebook/react-native/issues/29709
      if target.name == "React-Core.common-AccessibilityResources"
        target.remove_from_project
      end
    end
  end
end

@DodoSpringLove
Copy link

DodoSpringLove commented Jul 20, 2022

@berchan I am facing same issue, the local xcode build is working fine but the archive build from github-actions is failing. Can you let us know how to remove FBReactNativeSpec target's [CP-User] Generate Specs item

I'm having the same problem on Github Actions.

The following build commands failed:
	PhaseScriptExecution [CP]\ Copy\ XCFrameworks /Users/runner/Library/Developer/Xcode/DerivedData/appcardview-gbsbuuvggegwokbqlthgedyztsge/Build/Intermediates.noindex/ArchiveIntermediates/appcardview/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/EXStructuredHeaders.build/Script-FE2D2A8ABFF57EA7EA4B321A2D77B079.sh
(1 failure)

I'm using react-native 0.66.1 and Xcode11

My app doesn't use Expo. I did several tests like including the "react-native-unimodules" package.

My dependencies on package.json

"@fnando/cnpj": "^1.0.2",
    "@fnando/cpf": "^1.0.2",
    "@ptomasroos/react-native-multi-slider": "^2.2.2",
    "@react-native-async-storage/async-storage": "^1.15.9",
    "@react-native-firebase/analytics": "^12.9.2",
    "@react-native-firebase/app": "^12.9.2",
    "@react-native-firebase/auth": "^12.9.2",
    "@react-native-firebase/crashlytics": "^12.9.2",
    "@react-native-firebase/database": "^12.9.2",
    "@react-navigation/compat": "^5.3.20",
    "@react-navigation/elements": "^1.2.1",
    "@react-navigation/native": "^6.0.2",
    "@react-navigation/stack": "^6.0.7",
    "@tele2/react-native-select-input": "^1.1.0",
    "axios": "^0.23.0",
    "babel-plugin-root-import": "^6.6.0",
    "base-64": "^1.0.0",
    "buffer": "^6.0.3",
    "configstore": "^6.0.0",
    "crc": "^3.8.0",
    "dayjs": "^1.10.7",
    "google-libphonenumber": "^3.2.25",
    "hybrid-crypto-js": "^0.2.4",
    "i18n-js": "^3.8.0",
    "jwt-decode": "^3.1.2",
    "lodash": "^4.17.21",
    "lottie-ios": "^3.2.3",
    "native-base": "^3.2.1",
    "otp-client": "^1.0.3",
    "prop-type": "0.0.1",
    "prop-types": "^15.7.2",
    "react": "17.0.2",
    "react-app-rewire-eslint": "^0.2.3",
    "react-app-rewired": "^2.1.3",
    "react-dom": "16.13.1",
    "react-native": "~0.66.1",
    "react-native-animatable": "^1.3.3",
    "react-native-barcode-mask": "^1.2.4",
    "react-native-config": "^1.4.5",
    "react-native-device-info": "^8.4.1",
    "react-native-document-picker": "^7.1.1",
    "react-native-elements": "^3.4.2",
    "react-native-fingerprint-scanner": "^6.0.0",
    "react-native-fs": "^2.18.0",
    "react-native-geolocation-service": "^5.3.0-beta.3",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-google-play-install-referrer": "^1.0.0",
    "react-native-image-picker": "^4.1.2",
    "react-native-image-resizer": "^1.4.5",
    "react-native-keyboard-aware-scroll-view": "^0.9.4",
    "react-native-keychain": "^8.0.0",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-masked-text": "^1.13.0",
    "react-native-modal": "^12.0.3",
    "react-native-onesignal": "^4.3.1",
    "react-native-orientation-locker": "^1.3.1",
    "react-native-paper": "^4.10.0",
    "react-native-permissions": "^3.1.0",
    "react-native-picker-select": "^8.0.4",
    "react-native-progress-circle": "^2.1.0",
    "react-native-qrcode-scanner": "^1.5.4",
    "react-native-reanimated": "~2.2.0",
    "react-native-rsa-native": "^2.0.4",
    "react-native-safe-area-context": "^3.3.2",
    "react-native-screens": "^3.4.0",
    "react-native-share": "^7.2.1",
    "react-native-svg": "^12.1.1",
    "react-native-swipeable": "^0.6.0",
    "react-native-swiper": "^1.6.0",
    "react-native-unimodules": "^0.14.10",
    "react-native-vector-icons": "^9.0.0",
    "react-native-web": "~0.13.12",
    "react-native-webview": "^11.14.2",
    "rxjs": "^7.4.0",
    "sprintf-js": "^1.1.2",
    "styled-components": "^5.3.3",
    "styled-system": "^5.1.5",
    "unimodules-app-loader": "^3.0.0",
    "update-notifier": "^5.1.0"

Podfile

require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '12.0'
target 'appcardview' do
  use_unimodules!
  config = use_native_modules!
  use_react_native!(
    :path => config[:reactNativePath],
    :hermes_enabled => false
  )

  permissions_path = '../node_modules/react-native-permissions/ios'
  pod 'RNPermissions', :path => '../node_modules/react-native-permissions'
  pod 'Permission-AppTrackingTransparency', :path => "#{permissions_path}/AppTrackingTransparency"
  pod 'Permission-BluetoothPeripheral', :path => "#{permissions_path}/BluetoothPeripheral"
  pod 'Permission-Calendars', :path => "#{permissions_path}/Calendars"
  pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
  pod 'Permission-Contacts', :path => "#{permissions_path}/Contacts"
  pod 'Permission-FaceID', :path => "#{permissions_path}/FaceID"
  pod 'Permission-LocationAccuracy', :path => "#{permissions_path}/LocationAccuracy"
  pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways"
  pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"
  pod 'Permission-MediaLibrary', :path => "#{permissions_path}/MediaLibrary"
  pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone"
  pod 'Permission-Motion', :path => "#{permissions_path}/Motion"
  pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
  pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"
  pod 'Permission-PhotoLibraryAddOnly', :path => "#{permissions_path}/PhotoLibraryAddOnly"
  pod 'Permission-Reminders', :path => "#{permissions_path}/Reminders"
  pod 'Permission-Siri', :path => "#{permissions_path}/Siri"
  pod 'Permission-SpeechRecognition', :path => "#{permissions_path}/SpeechRecognition"
  pod 'Permission-StoreKit', :path => "#{permissions_path}/StoreKit"
  pod 'GoogleMLKit/TextRecognition'
  pod 'GoogleMLKit/FaceDetection'
  pod 'GoogleMLKit/BarcodeScanning'
  use_flipper!()
  pod 'react-native-camera', path: '../node_modules/react-native-camera', subspecs: [
    'FaceDetectorMLKit', 'TextDetector', 'BarcodeDetectorMLKit'
  ]
  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)

    installer.pods_project.targets.each do |target|
      if target.name == 'react-native-google-maps'
        target.build_configurations.each do |config|
          config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
        end
      end
      # Fix for xCode build errors: https://github.com/facebook/react-native/issues/29709
      if target.name == "React-Core.common-AccessibilityResources"
        target.remove_from_project
      end
    end
  end
end
  • Same issue here. my env is :
System:
    OS: macOS 12.4
    CPU: (4) x64 Intel(R) Core(TM) i5-4308U CPU @ 2.80GHz
    Memory: 31.37 MB / 8.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 17.8.0 - ~/.nvm/versions/node/v17.8.0/bin/node
    Yarn: Not Found
    npm: 8.5.5 - ~/.nvm/versions/node/v17.8.0/bin/npm
    Watchman: 2022.03.21.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.1 AI-211.7628.21.2111.8309675
    Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.2 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: ^17.0.2 => 17.0.2 
    react-native: ^0.65.1 => 0.65.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
  • error message:
The following build commands failed:
        PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/togetu/Library/Developer/Xcode/DerivedData/Instpower-affwtpakkrcizwemlrmqacddvoam/Build/Intermediates.noindex/ArchiveIntermediates/Beta/IntermediateBuildFilesPath/Instpower.build/Release-iphoneos/Instpower.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'Instpower' from project 'Instpower')
(1 failure)
[15:28:43]: Exit status: 65

@lay-mand
Copy link

why this issue was closed? it's still reproduced. I have the same and I've been trying to fix this about a week, nothing helped

@TonyFTannous
Copy link

TonyFTannous commented Sep 16, 2022

Hello, i need help

in my mac using xcode, everything go well, but when publishing using azure/pipeline, the build failed
before the vm in azure update (Updating readme file for macOS-11 version 20220906.1)
everything go well and no build failed

The following build commands failed:
PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/runner/Library/Developer/Xcode/DerivedData/myproject-hfznzxvrsqgfuzajavqfcfjkopph/Build/Intermediates.noindex/myproject.build/Dev-iphoneos/myproject-IOS.build/Script-00DD1BFF1BD5951E006B06BC.sh

**
in my xcode -> build phases -> bundle react native code and images:

export NODE_BINARY=node
../node_modules/react-native/scripts/react-native-xcode.sh
**

please any help

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

No branches or pull requests