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

Failed EAS build, error related to PayCardsRecognizerResult.h #18

Open
rodnoycry opened this issue Jul 4, 2024 · 2 comments
Open

Failed EAS build, error related to PayCardsRecognizerResult.h #18

rodnoycry opened this issue Jul 4, 2024 · 2 comments

Comments

@rodnoycry
Copy link

We got this error on the Run fastlane step of EAS build for iOS:

$ set -o pipefail && xcodebuild -workspace ./ZionBank.xcworkspace -scheme ZionBank -configuration Debug -destination 'generic/platform=iOS' -archivePath /Users/expo/Library/Developer/Xcode/Archives/2024-07-03/ZionBank\ 2024-07-03\ 16.18.10.xcarchive archive | tee /Users/expo/workingdir/logs/ZionBank-ZionBank.log > /dev/null

❌  error: Multiple commands produce '/Users/expo/Library/Developer/Xcode/DerivedData/ZionBank-dgtqcfaxpmiehehgfqbvtqbiqwfz/Build/Intermediates.noindex/ArchiveIntermediates/ZionBank/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/RNCardScanner.framework/Headers/PayCardsRecognizer.h'


❌  error: Multiple commands produce '/Users/expo/Library/Developer/Xcode/DerivedData/ZionBank-dgtqcfaxpmiehehgfqbvtqbiqwfz/Build/Intermediates.noindex/ArchiveIntermediates/ZionBank/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/RNCardScanner.framework/Headers/PayCardsRecognizerResult.h'

I am not sure what causes that but it points to the PayCardsRecognizer header file

Our package.json:

"dependencies": {
    "@dev-plugins/react-navigation": "^0.0.6",
    "@dev-plugins/redux": "^0.0.1",
    "@expo/metro-runtime": "~3.2.1",
    "@expo/react-native-action-sheet": "4.1.0",
    "@formatjs/intl-getcanonicallocales": "^2.3.0",
    "@formatjs/intl-locale": "4.0.0",
    "@formatjs/intl-pluralrules": "5.2.14",
    "@formatjs/intl-relativetimeformat": "11.2.14",
    "@gorhom/bottom-sheet": "4.6.3",
    "@react-native-async-storage/async-storage": "1.23.1",
    "@react-native-community/netinfo": "11.3.1",
    "@react-native-firebase/app": "^20.1.0",
    "@react-native-firebase/messaging": "^20.1.0",
    "@react-navigation/elements": "^1.3.30",
    "@reduxjs/toolkit": "2.2.6",
    "@sentry/react-native": "~5.22.0",
    "@tma.js/sdk": "2.6.1",
    "@tma.js/sdk-react": "2.2.7",
    "clsx": "2.1.1",
    "concurrently": "^8.2.2",
    "expo": "^51.0.17",
    "expo-blur": "~13.0.2",
    "expo-camera": "~15.0.13",
    "expo-clipboard": "~6.0.3",
    "expo-constants": "~16.0.2",
    "expo-crypto": "~13.0.2",
    "expo-dev-client": "~4.0.19",
    "expo-device": "~6.0.2",
    "expo-font": "~12.0.7",
    "expo-haptics": "~13.0.1",
    "expo-image": "~1.12.12",
    "expo-image-picker": "~15.0.7",
    "expo-linear-gradient": "~13.0.2",
    "expo-linking": "~6.3.1",
    "expo-local-authentication": "~14.0.1",
    "expo-localization": "~15.0.3",
    "expo-network": "~6.0.1",
    "expo-notifications": "~0.28.9",
    "expo-router": "~3.5.17",
    "expo-secure-store": "~13.0.2",
    "expo-sharing": "~12.0.1",
    "expo-splash-screen": "~0.27.5",
    "expo-status-bar": "~1.12.1",
    "expo-system-ui": "~3.0.7",
    "expo-web-browser": "~13.0.3",
    "i18next": "23.11.5",
    "lodash": "^4.17.21",
    "lottie-react-native": "6.7.0",
    "moment": "^2.30.1",
    "nativewind": "^4.0.36",
    "postinstall-postinstall": "^2.1.0",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-i18next": "14.1.2",
    "react-native": "0.74.3",
    "react-native-gesture-handler": "~2.16.1",
    "react-native-gifted-charts": "1.4.14",
    "react-native-gifted-chat": "^2.4.0",
    "react-native-mask-input": "^1.2.3",
    "react-native-qrcode-svg": "^6.3.1",
    "react-native-reanimated": "~3.10.1",
    "react-native-safe-area-context": "4.10.1",
    "react-native-screens": "3.31.1",
    "react-native-sse": "^1.2.1",
    "react-native-svg": "15.2.0",
    "react-native-switch": "^1.5.1",
    "react-native-toast-message": "^2.2.0",
    "react-native-url-polyfill": "^2.0.0",
    "react-native-web": "~0.19.12",
    "react-redux": "9.1.2",
    "rn-card-scanner": "^1.1.2",
    "tailwind-merge": "2.3.0",
    "tailwindcss": "3.4.4",
    "usehooks-ts": "^3.1.0",
    "zod": "^3.23.8",
    "expo-build-properties": "~0.12.3"
    
    ```
@edenmeshulam
Copy link

Any news about that?

@andrewsixsixsix
Copy link
Contributor

andrewsixsixsix commented Nov 5, 2024

I faced similar issue with React Native 0.75.4 and XCode 16.1

The solution for me was to remove use_frameworks! :linkage => :static from application target in Podfile:

target 'Application' do
  config = use_native_modules!

  use_frameworks! :linkage => :static # <---- ❌ Remove this line
  $RNFirebaseAsStaticFramework = true

  use_react_native!(
    :path => config[:reactNativePath],
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  ...

This line was required by Firebase services and after removing it, I got the following errors in build process:
module GoogleUtilities not found
module FirebaseCore not found

Those errors were fixed by adding the following lines to top level of Podfile:

pod 'GoogleUtilities', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true

My resulting Podfile looks like this:

def node_require(script)
  # Resolve script with node to allow for hoisting
  require Pod::Executable.execute_command('node', ['-p',
    "require.resolve(
      '#{script}',
      {paths: [process.argv[1]]},
    )", __dir__]).strip
end

node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')

platform :ios, min_ios_version_supported
prepare_react_native_project!

# uncomment wanted permissions
setup_permissions([
  # 'AppTrackingTransparency',
  # 'Bluetooth',
  ...
])

pod 'GoogleUtilities', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  use_frameworks! :linkage => linkage.to_sym
end

target 'Application' do
  config = use_native_modules!

  $RNFirebaseAsStaticFramework = true

  use_react_native!(
    :path => config[:reactNativePath],
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'Application' do
    inherit! :search_paths
    # Pods for testing
  end

  post_install do |installer|
    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false,
      # :ccache_enabled => true
    )
  end
end

Hope this will help

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

No branches or pull requests

3 participants