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

[REGRESSION] ios/tvos fails to build on a new project #1368

Closed
pauliusguzas opened this issue Jan 31, 2024 · 0 comments
Closed

[REGRESSION] ios/tvos fails to build on a new project #1368

pauliusguzas opened this issue Jan 31, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@pauliusguzas
Copy link
Collaborator

pauliusguzas commented Jan 31, 2024

Describe the bug
ios/tvos build fails on new project

To Reproduce

  1. create new project with default settings
  2. do npx rnv build -p ios (or tvos)
✖ FAILED: bundle exec pod install
┌──────────────────────────────────────────────────────────────────────────────┐
│  🚀  SUMMARY | 1/31/2024, 2:58:47 PM                                         │
│  $ npx rnv build -p ios                                                      │
├──────────────────────────────────────────────────────────────────────────────┤
│  ReNative Version: 1.0.0-rc.10                                               │
│  Project Name ($package.name): desimt                                        │
│  Project Version ($package.version): 0.1.0                                   │
│  Workspace ($.workspaceID): rnv                                              │
│  Platform (-p): ios                                                          │
│  Engine ($.platforms.ios.engine): engine-rn                                  │
│  Template: @rnv/[email protected]                                 │
│  App Config (-c): app                                                        │
│  Build Scheme (-s): debug                                                    │
│  Target (-t): iPhone 14                                                      │
│  Supported Platforms: ios                                                    │
│  Env Info: darwin | x64 | node v18.17.0                                      │
│  Executed Time: 0h:7m:30s:984ms                                              │
│                                                                              │
│ [ success ] [configure] /react-native-gesture-handler/RNGestureHandler.podspec requires override by: REACT_CORE_OVERRIDES. FIXING...DONE
│ [ error ] [configure] COMMAND:

bundle exec pod install

FAILED with ERROR:

[!] Error installing hermes-engine
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
### Command
```
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/bin/pod install
```
### Error
```
Errno::EEXIST - File exists @ syserr_fail2_in - /Users/pauliusguzas/Library/Caches/CocoaPods/Pods/External/hermes-engine/1ad58e253b23350eece8e5811e48c6ed-81191/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64_x86_64-maccatalyst/hermes.framework/Resources
/Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/fileutils.rb:1370:in `symlink'
/Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/fileutils.rb:1370:in `copy'
/Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/fileutils.rb:490:in `block in copy_entry'
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=File+exists+%40+syserr_fail2_in+-+%2FUsers%2Fpauliusguzas%2FLibrary%2FCaches%2FCocoaPods%2FPods%2FExternal%2Fhermes-engine%2F1ad58e253b23350eece8e5811e48c6ed-81191%2Fdestroot%2FLibrary%2FFrameworks%2Funiversal%2Fhermes.xcframework%2Fios-arm64_x86_64-maccatalyst%2Fhermes.framework%2FResources&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:

Error: Command failed with exit code 1: bundle exec pod install
Auto-linking React Native module for target `RNVApp`: RNGestureHandler
Framework build type is static library
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
[Codegen] Found rncore
Fetching podspec for `boost` from `../../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../../node_modules/react-native/third-party-podspecs/glog.podspec`
Fetching podspec for `hermes-engine` from `../../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`
[Hermes] Using the release tarball from Maven Central
Downloading dependencies
Installing CocoaAsyncSocket (7.6.5)
Installing DoubleConversion (1.1.6)
Installing FBLazyVector (0.72.4)
Installing FBReactNativeSpec (0.72.4)
Installing Flipper (0.182.0)
Installing Flipper-Boost-iOSX (1.76.0.1.11)
Installing Flipper-DoubleConversion (3.2.0.1)
Installing Flipper-Fmt (7.1.7)
Installing Flipper-Folly (2.6.10)
Installing Flipper-Glog (0.5.0.5)
Installing Flipper-PeerTalk (0.0.4)
Installing FlipperKit (0.182.0)
Installing OpenSSL-Universal (1.1.1100)
Installing RCT-Folly (2021.07.22.00)
Installing RCTRequired (0.72.4)
Installing RCTTypeSafety (0.72.4)
Installing RNGestureHandler (2.13.1)
Installing React (0.72.4)
Installing React-Codegen (0.72.4)
Installing React-Core (0.72.4)
Installing React-CoreModules (0.72.4)
Installing React-NativeModulesApple (0.72.4)
Installing React-RCTActionSheet (0.72.4)
Installing React-RCTAnimation (0.72.4)
Installing React-RCTAppDelegate (0.72.4)
Installing React-RCTBlob (0.72.4)
Installing React-RCTImage (0.72.4)
Installing React-RCTLinking (0.72.4)
Installing React-RCTNetwork (0.72.4)
Installing React-RCTSettings (0.72.4)
Installing React-RCTText (0.72.4)
Installing React-RCTVibration (0.72.4)
Installing React-callinvoker (0.72.4)
Installing React-cxxreact (0.72.4)
Installing React-debug (0.72.4)
Installing React-hermes (0.72.4)
Installing React-jsi (0.72.4)
Installing React-jsiexecutor (0.72.4)
Installing React-jsinspector (0.72.4)
Installing React-logger (0.72.4)
Installing React-perflogger (0.72.4)
Installing React-rncore (0.72.4)
Installing React-runtimeexecutor (0.72.4)
Installing React-runtimescheduler (0.72.4)
Installing React-utils (0.72.4)
Installing ReactCommon (0.72.4)
Installing SocketRocket (0.6.1)
Installing Yoga (1.14.0)
Installing YogaKit (1.18.1)
Installing boost (1.76.0)
Installing fmt (6.2.1)
Installing glog (0.3.5)
Installing hermes-engine (0.72.4)

[!] Error installing hermes-engine

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

### Command

```
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/bin/pod install
```

### Report

* What did you do?

* What did you expect to happen?

* What happened instead?


### Stack

```
   CocoaPods : 1.15.0
        Ruby : ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x86_64-darwin20]
    RubyGems : 3.3.7
        Host : macOS 13.5.2 (22G91)
       Xcode : 14.3 (14E222b)
         Git : git version 2.39.2 (Apple Git-143)
Ruby lib dir : /Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib
Repositories : cocoapods - git - https://github.com/CocoaPods/Specs.git @ 4ed1f7954d0250606764079e339107ca615df3d1

               react-native-tvos-react-native-tvos-podspecs - git - https://github.com/react-native-tvos/react-native-tvos-podspecs.git @ b4bd3ab652bb204a63e3b19344c0825ce249a181

               trunk - CDN - https://cdn.cocoapods.org/
```

### Plugins

```
cocoapods-deintegrate : 1.0.5
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.1
cocoapods-trunk       : 1.6.0
cocoapods-try         : 1.2.0
```

### Podfile

```ruby
# Resolve react_native_pods.rb with node to allow for hoisting
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')


# RN PERMISSIONS
permissions_required = ENV['REACT_NATIVE_PERMISSIONS_REQUIRED']
if permissions_required != '' && permissions_required != nil
  node_require('react-native-permissions/scripts/setup.rb')
  setup_permissions(permissions_required.split(","))
end

platform :ios, '14.0'
prepare_react_native_project!

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
#   dependencies: {
#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

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 'RNVApp' do
  config = use_native_modules!

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    # Hermes is now enabled by default. Disable by setting this flag to false.
    :hermes_enabled => true,
    :fabric_enabled => flags[:fabric_enabled],
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    :flipper_configuration => flipper_config,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/../.."
  )

  target 'RNVAppTests' do
    inherit! :complete
    # 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
    )
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end
end
```

### Error

```
Errno::EEXIST - File exists @ syserr_fail2_in - /Users/pauliusguzas/Library/Caches/CocoaPods/Pods/External/hermes-engine/1ad58e253b23350eece8e5811e48c6ed-81191/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64_x86_64-maccatalyst/hermes.framework/Resources
/Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/fileutils.rb:1370:in `symlink'
/Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/fileutils.rb:1370:in `copy'
/Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/fileutils.rb:490:in `block in copy_entry'
/Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/fileutils.rb:1493:in `wrap_traverse'
/Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/fileutils.rb:1496:in `block in wrap_traverse'
/Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/fileutils.rb:1495:in `each'
/Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/fileutils.rb:1495:in `wrap_traverse'
/Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/fileutils.rb:487:in `copy_entry'
/Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/fileutils.rb:461:in `block in cp_r'
/Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/fileutils.rb:1577:in `block in fu_each_src_dest'
/Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/fileutils.rb:1586:in `block in fu_each_src_dest0'
/Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/fileutils.rb:1584:in `each'
/Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/fileutils.rb:1584:in `fu_each_src_dest0'
/Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/fileutils.rb:1575:in `fu_each_src_dest'
/Users/pauliusguzas/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/fileutils.rb:460:in `cp_r'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:343:in `block (2 levels) in copy_files'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:341:in `each'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:341:in `block in copy_files'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:128:in `lock'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:99:in `write_lock'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:332:in `copy_files'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:269:in `block (2 levels) in uncached_pod'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:265:in `each'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:265:in `block in uncached_pod'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:291:in `in_tmpdir'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:238:in `uncached_pod'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:33:in `download_pod'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/downloader.rb:42:in `download'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_downloader.rb:69:in `download!'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_installer.rb:117:in `download_source'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_installer.rb:67:in `install!'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:621:in `install_source_of_pod'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:539:in `block (2 levels) in install_pod_sources'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/user_interface.rb:86:in `titled_section'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:538:in `block in install_pod_sources'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:535:in `each'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:535:in `install_pod_sources'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:258:in `block in download_dependencies'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/user_interface.rb:64:in `section'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:257:in `download_dependencies'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:163:in `install!'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/command/install.rb:52:in `run'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/lib/cocoapods/command.rb:52:in `run'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/gems/cocoapods-1.15.0/bin/pod:55:in `<top (required)>'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/bin/pod:25:in `load'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/bin/pod:25:in `<main>'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/bin/ruby_executable_hooks:22:in `eval'
/Users/pauliusguzas/.rvm/gems/ruby-3.1.1/bin/ruby_executable_hooks:22:in `<main>'
```

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=File+exists+%40+syserr_fail2_in+-+%2FUsers%2Fpauliusguzas%2FLibrary%2FCaches%2FCocoaPods%2FPods%2FExternal%2Fhermes-engine%2F1ad58e253b23350eece8e5811e48c6ed-81191%2Fdestroot%2FLibrary%2FFrameworks%2Funiversal%2Fhermes.xcframework%2Fios-arm64_x86_64-maccatalyst%2Fhermes.framework%2FResources&type=Issues

If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...
Found no similar issues. To create a new issue, please visit:
https://github.com/cocoapods/cocoapods/issues/new
    at makeError (/Users/pauliusguzas/Desktop/desimt/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/pauliusguzas/Desktop/desimt/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)


│                                                                              │
│  Project location:                                                           │
│  ./platformBuilds/app_ios/RNVApp.xcworkspace                                 │
└──────────────────────────────────────────────────────────────────────────────┘
pauliusguzas@MBP-de-Flexn desimt %

Expected behavior
app is built

Desktop (please complete the following information):

  • OS: macOS Ventura
  • Node Version 18.17.0
  • RNV Version 1.0.0-rc.10
  • @rnv/template-starter 1.0.0-rc.10
@pauliusguzas pauliusguzas added the bug Something isn't working label Jan 31, 2024
@pauliusguzas pauliusguzas changed the title [REGRESSION] ios fails to build on a new project [REGRESSION] ios/tvos fails to build on a new project Jan 31, 2024
@ElenaDiachenko ElenaDiachenko self-assigned this Feb 1, 2024
@mihaiblaga89 mihaiblaga89 added this to the 1.0 milestone Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants