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

RNScreens doesn't build on ReactNative 0.73.5 for iOS #2059

Open
Lubron88 opened this issue Mar 6, 2024 · 14 comments
Open

RNScreens doesn't build on ReactNative 0.73.5 for iOS #2059

Lubron88 opened this issue Mar 6, 2024 · 14 comments
Assignees
Labels
Missing repro This issue need minimum repro scenario Platform: iOS This issue is specific to iOS

Comments

@Lubron88
Copy link

Lubron88 commented Mar 6, 2024

Description

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

Steps to reproduce

  1. Buy a MacMini with M2 processor
  2. Create a new ReactNative project with version 0.73.5
  3. Plug-in iOS device (in my case iPhone 14)
  4. Follow React Navigation guide
  5. Run iOS app with npx react-native run-ios

Snack or a link to a repository

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

Screens version

^3.29.0

React Native version

0.73.5

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

None

Build type

Debug mode

Device

Real device

Device model

iPhone 14

Acknowledgements

Yes

@github-actions github-actions bot added the Missing repro This issue need minimum repro scenario label Mar 6, 2024
Copy link

github-actions bot commented Mar 6, 2024

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@github-actions github-actions bot added the Platform: iOS This issue is specific to iOS label Mar 6, 2024
@philipheinser
Copy link

@Lubron88 we build 0.73.5 and rnscreens fine for our app. did you try to delete the derived data folder and clean the Xcode build cache?

@Lubron88
Copy link
Author

Lubron88 commented Mar 8, 2024

@philipheinser I manually deleted ~/Library/Developer/Xcode/DerivedData (don't know how to clean XCode cache, I'm sorry) but still the same build failed when I try npx react-native run-ios

** 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)

@philipheinser
Copy link

@Lubron88 If you run it in Xcode you will get more details on why the build is failing. I would suggest to try to build it in Xcode and see what its says.

@Lubron88
Copy link
Author

Lubron88 commented Mar 8, 2024

@philipheinser Nothing more than this

image

@wongzigii
Copy link

i have the same issue
image

@Lubron88
Copy link
Author

I thought the problem was due to the fact that I'm developing on a MacMini with an M2 processor (arm64), but I tried to create a new project using Expo this time and following the installation procedures it works perfectly...strange

@eflashcards
Copy link

+1

@ehabinl
Copy link

ehabinl commented Mar 31, 2024

I have the same problem on the M3 as well!

The following build commands failed:
Ld /Users/e.hakawati/Library/Developer/Xcode/DerivedData/softfeeder-ctudookkecojqieymgkfvxaowdbc/Build/Products/Debug-iphonesimulator/RNScreens/RNScreens.framework/RNScreens normal (in target 'RNScreens' from project 'Pods')

@ehabinl
Copy link

ehabinl commented Mar 31, 2024

 To reproduce the issue
 
1- Upgrade react-native to 0.73.5
2- Update dependencies
3- run pod install.

@Samuel-Fipps
Copy link

Samuel-Fipps commented Mar 31, 2024

I have the same issue. It happened after I upgraded to react 0.73.6 from 0.73.3. I have cleans the pods folder, nodes folder, and clean the build, and still nothing.

@Samuel-Fipps
Copy link

The current fix:
Change the react-native-screens version to:
"react-native-screens": "3.29.0"

#2082

@tboba tboba self-assigned this Apr 2, 2024
@tboba
Copy link
Member

tboba commented Apr 2, 2024

Hi guys! Sorry for a pretty late delay, I've needed to finalize some of the things in screens 🙏
Unfortunately, I cannot reproduce this bug for now. Do you know if this error happens on mac mini? Currently, I'm on a MacBook with M2 Pro chip and my build passes correctly with the newest version of RN and Screens.
Could you send a file with a whole build log?

image

My dependencies:

    "@react-navigation/native": "^6.1.17",
    "@react-navigation/native-stack": "^6.9.26",
    "react": "18.2.0",
    "react-native": "0.73.6",
    "react-native-safe-area-context": "^4.9.0",
    "react-native-screens": "^3.30.1"

@rainjiang
Copy link

After i add use_frameworks! in Podfile, this error came up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro This issue need minimum repro scenario Platform: iOS This issue is specific to iOS
Projects
None yet
Development

No branches or pull requests

8 participants