react-native icon indicating copy to clipboard operation
react-native copied to clipboard

XCode 15.3 — flipper crushes the build

Open kuzkokov opened this issue 10 months ago • 11 comments

Description

When using the latest XCode version the build crashes trying to build FlipperKit. XCode 15.2 works fine. Unfortunately, can't attach the reproducer since github actions don't have XCode 15.3 support yet.

Steps to reproduce

  1. Initialise the app from the template with RN 0.71.17
  2. Run the iOS build on XCode 15.3

React Native Version

0.71.17

Affected Platforms

Other (please specify)

Output of npx react-native info

-

Stacktrace or Logs

In file included from /Users/builder/clone/ios/Pods/FlipperKit/iOS/FlipperKit/FlipperPlatformWebSocket.mm:10:
In file included from /Users/builder/clone/ios/Pods/FlipperKit/iOS/FlipperKit/FlipperPlatformWebSocket.h:10:
/Users/builder/clone/ios/Pods/Headers/Private/Flipper/FlipperTransportTypes.h:24:14: error: no template named 'function' in namespace 'std'
typedef std::function<void(SocketEvent)> SocketEventHandler;
        ~~~~~^
/Users/builder/clone/ios/Pods/Headers/Private/Flipper/FlipperTransportTypes.h:29:14: error: no template named 'function' in namespace 'std'
typedef std::function<void(const std::string& message)> SocketMessageHandler;
        ~~~~~^
/Users/builder/clone/ios/Pods/Headers/Private/Flipper/FlipperTransportTypes.h:38:14: error: no template named 'function' in namespace 'std'
typedef std::function<std::string(char* password, size_t length)>
        ~~~~~^
/Users/builder/clone/ios/Pods/Headers/Private/Flipper/FlipperTransportTypes.h:45:14: error: no template named 'function' in namespace 'std'
typedef std::function<void()> SocketSendHandler;
        ~~~~~^
/Users/builder/clone/ios/Pods/Headers/Private/Flipper/FlipperTransportTypes.h:54:14: error: no template named 'function' in namespace 'std'
typedef std::function<void(std::string response, bool isError)>
        ~~~~~^
/Users/builder/clone/ios/Pods/FlipperKit/iOS/FlipperKit/FlipperPlatformWebSocket.mm:57:46: error: called object type 'facebook::flipper::SocketCertificateProvider' (aka 'int') is not a function or function pointer
  auto certificatePath = _certificateProvider(&PASSWORD[0], 512);
                         ~~~~~~~~~~~~~~~~~~~~^
/Users/builder/clone/ios/Pods/FlipperKit/iOS/FlipperKit/FlipperPlatformWebSocket.mm:158:18: error: called object type 'facebook::flipper::SocketEventHandler' (aka 'int') is not a function or function pointer
    _eventHandler(facebook::flipper::SocketEvent::CLOSE);
    ~~~~~~~~~~~~~^
/Users/builder/clone/ios/Pods/FlipperKit/iOS/FlipperKit/FlipperPlatformWebSocket.mm:185:16: error: called object type 'facebook::flipper::SocketEventHandler' (aka 'int') is not a function or function pointer
  _eventHandler(facebook::flipper::SocketEvent::OPEN);
  ~~~~~~~~~~~~~^
/Users/builder/clone/ios/Pods/FlipperKit/iOS/FlipperKit/FlipperPlatformWebSocket.mm:206:18: error: called object type 'facebook::flipper::SocketEventHandler' (aka 'int') is not a function or function pointer
    _eventHandler(facebook::flipper::SocketEvent::SSL_ERROR);
    ~~~~~~~~~~~~~^
/Users/builder/clone/ios/Pods/FlipperKit/iOS/FlipperKit/FlipperPlatformWebSocket.mm:208:18: error: called object type 'facebook::flipper::SocketEventHandler' (aka 'int') is not a function or function pointer
    _eventHandler(facebook::flipper::SocketEvent::ERROR);
    ~~~~~~~~~~~~~^
/Users/builder/clone/ios/Pods/FlipperKit/iOS/FlipperKit/FlipperPlatformWebSocket.mm:217:16: error: called object type 'facebook::flipper::SocketEventHandler' (aka 'int') is not a function or function pointer
  _eventHandler(facebook::flipper::SocketEvent::CLOSE);
  ~~~~~~~~~~~~~^
/Users/builder/clone/ios/Pods/FlipperKit/iOS/FlipperKit/FlipperPlatformWebSocket.mm:224:20: error: called object type 'facebook::flipper::SocketMessageHandler' (aka 'int') is not a function or function pointer
    _messageHandler([response UTF8String]);
    ~~~~~~~~~~~~~~~^
12 errors generated.

Reproducer

N/A

Screenshots and Videos

No response

kuzkokov avatar Mar 28 '24 14:03 kuzkokov

:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

github-actions[bot] avatar Mar 28 '24 14:03 github-actions[bot]

When using the latest XCode version the build crashes trying to build FlipperKit.

Is there anything preventing you from removing Flipper?

cortinico avatar Mar 28 '24 17:03 cortinico

@cortinico wdym? it comes with the RN out of the box, isn't it?

kuzkokov avatar Mar 28 '24 18:03 kuzkokov

@cortinico wdym? it comes with the RN out of the box, isn't it?

We're removing it in 0.74. You can disable it from your build if you're not using it and it's making your build harder to maintain. There is an option in the Podfile to do so

cortinico avatar Mar 28 '24 18:03 cortinico

We're removing it in 0.74. You can disable it from your build if you're not using it and it's making your build harder to maintain. There is an option in the Podfile to do so

well, okay. it's actually not a problem for me to use XCode 15.2 f.e. as well, but what you are saying is that RN < 0.74 isn't going to support latest XCode out of the box. is it okay for the RN team?

kuzkokov avatar Mar 28 '24 18:03 kuzkokov

You can just apply the fix to flipperkit, please see https://github.com/facebook/flipper/commit/b3dcdb87f930dbbc9dbacb53ad60996e0111e7d8

zhongwuzw avatar Mar 30 '24 16:03 zhongwuzw

still getting this error while building the app . For React native version 0.72.3

folly/folly-config.h not found

Ahsanali012 avatar Apr 01 '24 08:04 Ahsanali012

fixed

Bibazavr avatar Apr 18 '24 05:04 Bibazavr

@Bibazavr How to fix can you explain

Ahsanali012 avatar Apr 21 '24 03:04 Ahsanali012

@Ahsanali012 , just update RN to 0.71.18 or 0.72.12

Or you can look into changelog of react native and find out by yourself - which version include fixes for new xcode:)

Bibazavr avatar Apr 21 '24 04:04 Bibazavr

@Bibazavr i updated my project to 0.71.18 or 0.72.12 still the issue is same. folly/folly-config.h not found

Ahsanali012 avatar Apr 26 '24 20:04 Ahsanali012

https://stackoverflow.com/questions/78121217/build-error-on-xcode-15-3-called-object-type-facebookflippersocketcertifi

adding this fixed it for me

devonkoch avatar May 23 '24 00:05 devonkoch

We're removing it in 0.74. You can disable it from your build if you're not using it and it's making your build harder to maintain. There is an option in the Podfile to do so

Closing as for my previous comments as there is nothing actionable for us here

cortinico avatar Jun 04 '24 10:06 cortinico