react-native
react-native copied to clipboard
XCode 15.3 — flipper crushes the build
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
- Initialise the app from the template with RN 0.71.17
- 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
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
When using the latest XCode version the build crashes trying to build FlipperKit.
Is there anything preventing you from removing Flipper?
@cortinico wdym? it comes with the RN out of the box, isn't it?
@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
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?
You can just apply the fix to flipperkit, please see https://github.com/facebook/flipper/commit/b3dcdb87f930dbbc9dbacb53ad60996e0111e7d8
still getting this error while building the app . For React native version 0.72.3
folly/folly-config.h not found
@Bibazavr How to fix can you explain
@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 i updated my project to 0.71.18 or 0.72.12 still the issue is same. folly/folly-config.h not found
https://stackoverflow.com/questions/78121217/build-error-on-xcode-15-3-called-object-type-facebookflippersocketcertifi
adding this fixed it for me
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