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

ReactNavigation doesn't build on ReactNative 0.73.5 on iOS (on Android everything is ok) #11871

Closed
1 of 11 tasks
Lubron88 opened this issue Mar 6, 2024 · 4 comments
Closed
1 of 11 tasks

Comments

@Lubron88
Copy link

Lubron88 commented Mar 6, 2024

Current behavior

Hi everyone

I'm developing a brand new iOS/Android app and I want to use a single code, so I decided to use ReactNative for my pourpouses, and I want to build myself the executable instead of using something like Expo for remote building, so I bought a MacMini with Apple M2 processor where I connected my Android and iOS physical devices (where i'll run my project).

I'm using VisualStudioCode as IDE and did all the passages to install ReactNative (v0.73.5) and everything goes well, I have my base project that runs perfectly using

npm start

and running both version on my devices without problems.

The problem came when I try to add navigation-container in my project; I followed the guide (https://reactnavigation.org/docs/getting-started/) for version 6.x and installed native stack navigator library too (https://reactnavigation.org/docs/hello-react-navigation) and write a simple code to automatically switch from project start (App.tsx) to a splash page, like this:

import * as React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';

import SplashScreen from './screens/SplashScreen';

const Stack = createNativeStackNavigator();

function App() {
  return (
    <NavigationContainer>
      <Stack.Navigator>
        <Stack.Screen name="Splash" component={SplashScreen} />
      </Stack.Navigator>
    </NavigationContainer>
  );
}

export default App;

and run it using npx react-native run-ios and npx react-native run-android.
On Android everything works well, and I land in my splash screen as I intended, but on iOS I can't even build and run anything: I got this error

** BUILD FAILED **


The following build commands failed:
        Ld /Users/telemed/Library/Developer/Xcode/DerivedData/ETMHOMECROSS-avqdpcaltzlgykcghamktxvqeiyk/Build/Products/Debug-iphoneos/RNScreens/RNScreens.framework/RNScreens normal (in target 'RNScreens' from project 'Pods')
(1 failure)

while using npm start and typing "i" the build stucks with no error while compiling

info Opening app on iOS...
info A dev server is already running for this project on port 8081.
info Found Xcode workspace "ETMHOMECROSS.xcworkspace"
info Found booted iPhone 14 Development , iPad
info Building (using "xcodebuild -workspace ETMHOMECROSS.xcworkspace -configuration Debug -scheme ETMHOMECROSS -destination id=00008110-000255322130A01E")

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 

Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace ETMHOMECROSS.xcworkspace -configuration Debug -scheme ETMHOMECROSS -destination id=00008110-000255322130A01E

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

Prepare packages

ComputeTargetDependencyGraph
note: Building targets in dependency order
note: Target dependency graph (61 targets)
    Target 'ETMHOMECROSS' in project 'ETMHOMECROSS'
        ➜ Implicit dependency on target 'Pods-ETMHOMECROSS' in project 'Pods' via file 'Pods_ETMHOMECROSS.framework' in build phase 'Link Binary'
        ➜ Implicit dependency on target 'CocoaAsyncSocket' in project 'Pods' via options '-framework CocoaAsyncSocket' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-CoreModules' in project 'Pods' via options '-framework CoreModules' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'DoubleConversion' in project 'Pods' via options '-framework DoubleConversion' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTAnimation' in project 'Pods' via options '-framework RCTAnimation' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTBlob' in project 'Pods' via options '-framework RCTBlob' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTFabric' in project 'Pods' via options '-framework RCTFabric' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTImage' in project 'Pods' via options '-framework RCTImage' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTLinking' in project 'Pods' via options '-framework RCTLinking' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTNetwork' in project 'Pods' via options '-framework RCTNetwork' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTSettings' in project 'Pods' via options '-framework RCTSettings' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTText' in project 'Pods' via options '-framework RCTText' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'RCTTypeSafety' in project 'Pods' via options '-framework RCTTypeSafety' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTVibration' in project 'Pods' via options '-framework RCTVibration' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'RNCMaskedView' in project 'Pods' via options '-framework RNCMaskedView' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'RNGestureHandler' in project 'Pods' via options '-framework RNGestureHandler' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'RNReanimated' in project 'Pods' via options '-framework RNReanimated' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'RNScreens' in project 'Pods' via options '-framework RNScreens' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-Core' in project 'Pods' via options '-framework React' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'ReactCommon' in project 'Pods' via options '-framework ReactCommon' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-Codegen' in project 'Pods' via options '-framework React_Codegen' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-Fabric' in project 'Pods' via options '-framework React_Fabric' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-FabricImage' in project 'Pods' via options '-framework React_FabricImage' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-ImageManager' in project 'Pods' via options '-framework React_ImageManager' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-Mapbuffer' in project 'Pods' via options '-framework React_Mapbuffer' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-NativeModulesApple' in project 'Pods' via options '-framework React_NativeModulesApple' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTAppDelegate' in project 'Pods' via options '-framework React_RCTAppDelegate' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-debug' in project 'Pods' via options '-framework React_debug' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-graphics' in project 'Pods' via options '-framework React_graphics' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-jserrorhandler' in project 'Pods' via options '-framework React_jserrorhandler' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-nativeconfig' in project 'Pods' via options '-framework React_nativeconfig' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-rendererdebug' in project 'Pods' via options '-framework React_rendererdebug' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-runtimescheduler' in project 'Pods' via options '-framework React_runtimescheduler' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-utils' in project 'Pods' via options '-framework React_utils' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'SocketRocket' in project 'Pods' via options '-framework SocketRocket' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-cxxreact' in project 'Pods' via options '-framework cxxreact' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'fmt' in project 'Pods' via options '-framework fmt' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'RCT-Folly' in project 'Pods' via options '-framework folly' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'glog' in project 'Pods' via options '-framework glog' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-jsi' in project 'Pods' via options '-framework jsi' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-jsinspector' in project 'Pods' via options '-framework jsinspector' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-jsiexecutor' in project 'Pods' via options '-framework jsireact' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'libevent' in project 'Pods' via options '-framework libevent' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-logger' in project 'Pods' via options '-framework logger' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'react-native-change-icon' in project 'Pods' via options '-framework react_native_change_icon' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'react-native-safe-area-context' in project 'Pods' via options '-framework react_native_safe_area_context' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-hermes' in project 'Pods' via options '-framework reacthermes' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-perflogger' in project 'Pods' via options '-framework reactperflogger' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'Yoga' in project 'Pods' via

The output stops without saying anything else...

I think I got some conflicts on Pods, but I can't get any info about what and how to resolve.

I also tried to clear my node_modules folder and package-lock.json file, re-install packages with npm adn pod install, but I still had the same issue, adding another failure:

** BUILD FAILED **
The following build commands failed:

...Debug-iphoneos/RNScreens/RNScreens.framework/RNScreens normal (in target 'RNScreens' from project 'Pods') 
.../Debug-iphoneos/RNReanimated/RNReanimated.framework/RNReanimated normal (in target 'RNReanimated' from project 'Pods') (2 failures)

Any help, also on procedures to install dependencies in the right way, are welcome!

Thanks in advance

Expected behavior

Same behaviour as Android, build the app and land to my SplashScreen

Reproduction

Can't reproduce on Snack just because i don't use Expo

Platform

  • Android
  • iOS
  • Web
  • Windows
  • MacOS

Packages

  • @react-navigation/bottom-tabs
  • @react-navigation/drawer
  • @react-navigation/material-top-tabs
  • @react-navigation/stack
  • @react-navigation/native-stack
  • react-native-tab-view

Environment

  • [] I've removed the packages that I don't use
package version
@react-navigation/native ^6.1.14
@react-navigation/native-stack ^6.9.22
react 18.2.2
react-native 0.73.5
react-native-safe-area-context ^4.9.0
react-native-screens ^3.29.0
react-native-change-icon ^5.0.0
node v21.6.1
npm or yarn npm 10.4.0
@Lubron88 Lubron88 added the bug label Mar 6, 2024
Copy link

github-actions bot commented Mar 6, 2024

Hey @Lubron88! Thanks for opening the issue. It seems that the issue doesn't contain a link to a repro.

The best way to get attention to your issue is to provide an easy way for a developer to reproduce the issue.

You can provide a repro using any of the following:

A snack link is preferred since it's the easiest way to both create and share a repro. If it's not possible to create a repro using a snack, link to a GitHub repo under your username is a good alternative. Don't link to a branch or specific file etc. as it won't be detected.

Try to keep the repro as small as possible by narrowing down the minimal amount of code needed to reproduce the issue. Don't link to your entire project or a project containing code unrelated to the issue. See "How to create a Minimal, Reproducible Example" for more information.

You can edit your original issue to include a link to the repro, or leave it as a comment. The issue will be closed automatically after a while if you don't provide a repro.

Copy link

github-actions bot commented Apr 6, 2024

Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

@ReiAurellano
Copy link

When you installed dependencies, always run npx pod-install. And check this https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started about react-native-reanimated.

Copy link

Hey! This issue is closed and isn't watched by the core team. You are welcome to discuss the issue with others in this thread, but if you think this issue is still valid and needs to be tracked, please open a new issue with a repro.

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

2 participants