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

React-Codegen build failure on Xcode 14.3 (iOS 16.4) simulators #36690

Closed
daveslutzkin opened this issue Mar 29, 2023 · 9 comments
Closed

React-Codegen build failure on Xcode 14.3 (iOS 16.4) simulators #36690

daveslutzkin opened this issue Mar 29, 2023 · 9 comments
Labels
📮Known Issues This indicates an issue that refers to a bug or limitation of RN that is not currently being handled Platform: iOS iOS applications. Resolution: Duplicate

Comments

@daveslutzkin
Copy link

daveslutzkin commented Mar 29, 2023

Description

A clean, empty React Native 0.71.4 project fails to build in Xcode 14.3 (to iOS 16.4) with the following errors:

In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:19:
In file included from /<directory>/dev/clean_rn_project/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety/RCTConvertHelpers.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.4.sdk/usr/include/c++/v1/optional:1014:27: note: 'value' has been explicitly marked unavailable here
    constexpr value_type& value() &
                          ^
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
/<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:2065:46: error: 'value' is unavailable: introduced in iOS 12.0
  d[@"screen"] = screen.has_value() ? screen.value().buildUnsafeRawValue() : nil;
                                             ^
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:19:
In file included from /<directory>/dev/clean_rn_project/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety/RCTConvertHelpers.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.4.sdk/usr/include/c++/v1/optional:1014:27: note: 'value' has been explicitly marked unavailable here
    constexpr value_type& value() &
                          ^
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
/<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:2067:88: error: 'value' is unavailable: introduced in iOS 12.0
  d[@"windowPhysicalPixels"] = windowPhysicalPixels.has_value() ? windowPhysicalPixels.value().buildUnsafeRawValue() : nil;
                                                                                       ^
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:19:
In file included from /<directory>/dev/clean_rn_project/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety/RCTConvertHelpers.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.4.sdk/usr/include/c++/v1/optional:1014:27: note: 'value' has been explicitly marked unavailable here
    constexpr value_type& value() &
                          ^
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
/<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:2069:88: error: 'value' is unavailable: introduced in iOS 12.0
  d[@"screenPhysicalPixels"] = screenPhysicalPixels.has_value() ? screenPhysicalPixels.value().buildUnsafeRawValue() : nil;
                                                                                       ^
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:19:
In file included from /<directory>/dev/clean_rn_project/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety/RCTConvertHelpers.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.4.sdk/usr/include/c++/v1/optional:1014:27: note: 'value' has been explicitly marked unavailable here
    constexpr value_type& value() &
                          ^
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
/<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:2080:96: error: 'value' is unavailable: introduced in iOS 12.0
  d[@"isIPhoneX_deprecated"] = isIPhoneX_deprecated.has_value() ? @((BOOL)isIPhoneX_deprecated.value()) : nil;
                                                                                               ^
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:19:
In file included from /<directory>/dev/clean_rn_project/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety/RCTConvertHelpers.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.4.sdk/usr/include/c++/v1/optional:1014:27: note: 'value' has been explicitly marked unavailable here
    constexpr value_type& value() &
                          ^
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
/<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:2288:68: error: 'value' is unavailable: introduced in iOS 12.0
  d[@"prerelease"] = prerelease.has_value() ? @((double)prerelease.value()) : nil;
                                                                   ^
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:19:
In file included from /<directory>/dev/clean_rn_project/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety/RCTConvertHelpers.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.4.sdk/usr/include/c++/v1/optional:1014:27: note: 'value' has been explicitly marked unavailable here
    constexpr value_type& value() &
                          ^
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
/<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:2414:110: error: 'value' is unavailable: introduced in iOS 12.0
  d[@"DEFAULT_BACKGROUND_COLOR"] = DEFAULT_BACKGROUND_COLOR.has_value() ? @((double)DEFAULT_BACKGROUND_COLOR.value()) : nil;
                                                                                                             ^
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm:14:
In file included from /<directory>/dev/clean_rn_project/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h:19:
In file included from /<directory>/dev/clean_rn_project/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety/RCTConvertHelpers.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.4.sdk/usr/include/c++/v1/optional:1014:27: note: 'value' has been explicitly marked unavailable here
    constexpr value_type& value() &
                          ^
7 errors generated.

These errors occur when building from the command line or in Xcode itself:

Screenshot 2023-03-29 at 3 06 18 pm

Why are we using Xcode 14.3?

Devices which have been upgraded to iOS 16.4 can't be connected to Xcode with anything except the newest version of Xcode, which is 14.3. Unfortunately this is not yet officially released, it's only available currently as a release candidate, so it's entirely possible that the release candidate is somehow broken.

React Native Version

0.71.4

Output of npx react-native info

info Fetching system and libraries information...
System:
    OS: macOS 13.2.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 78.23 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 19.1.0 - /opt/homebrew/opt/node/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 9.4.0 - /opt/homebrew/bin/npm
    Watchman: 2022.11.14.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /Users/daveslutzkin/.rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8609683
    Xcode: 14.3/14E222b - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0
    react-native: 0.71.4 => 0.71.4
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

  • Download and install Xcode 14.3 RC 2
  • Generate a clean React Native 0.71.4 project
    • npx react-native@latest init clean_rn_project
  • Build the project for iOS
    • cd clean_rn_project
    • npx react-native run-ios
  • The build error occurs during this first build.

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

This is reproduced in a clean RN project so no code is necessary.

@aleciosouza
Copy link

Having the same issue here.

image

@tuliosciotta
Copy link

tuliosciotta commented Mar 29, 2023

Same here using 14.3 RC 2.

@daveslutzkin
Copy link
Author

Oh sorry, my fault, this is a duplicate of #36635

@blakef blakef added 📮Known Issues This indicates an issue that refers to a bug or limitation of RN that is not currently being handled and removed Needs: Triage 🔍 labels Apr 1, 2023
@blakef blakef closed this as completed Apr 1, 2023
@nathannewyen
Copy link

Having the same issue here.

image

I got same error any solution for this one ?

@punjasin
Copy link

punjasin commented Apr 2, 2023

i am working and suddenly xcode it auto-update itself now here we are it broke again T^T

@daveslutzkin
Copy link
Author

More details in the linked issue #36635

Personally I just rolled back to 14.2 until the fix lands.

@punjasin
Copy link

punjasin commented Apr 2, 2023

@daveslutzkin
There are custom pod script that solve this on duplicates issue above those will be included in next week release as i know

travis-mark/lrn@0158547

@CherukuriSiva
Copy link

Goto Pods -> Select React-Codegen and update iOS Deployment Target to iOS 12.4.
Screenshot 2023-04-03 at 10 40 29 AM

@facebook facebook locked and limited conversation to collaborators Apr 3, 2023
@blakef
Copy link
Contributor

blakef commented Apr 3, 2023

Just locking as we've got a bunch of mitigations listed in this and the coordinating issue and a fix being deployed really soon now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📮Known Issues This indicates an issue that refers to a bug or limitation of RN that is not currently being handled Platform: iOS iOS applications. Resolution: Duplicate
Projects
None yet
Development

No branches or pull requests

8 participants