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

[Fixed & Shipped in latest releases] Upgrading Xcode to 15.3 results in build error - Called object type 'facebook::flipper::SocketCertificateProvider' (aka 'int') is not a function or function pointer #43335

Closed
hengkx opened this issue Mar 6, 2024 · 83 comments
Labels
Needs: React Native Team Attention Platform: iOS iOS applications. Resolution: PR Submitted A pull request with a fix has been provided.

Comments

@hengkx
Copy link

hengkx commented Mar 6, 2024

Description

Called object type 'facebook::flipper::SocketCertificateProvider' (aka 'int') is not a function or function pointer
image

Steps to reproduce

run

React Native Version

0.73.5

Affected Platforms

Runtime - iOS

Output of npx react-native info

System:
  OS: macOS 14.3.1
  CPU: (10) arm64 Apple M1 Max
  Memory: 2.02 GB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.9.0
    path: ~/.nvm/versions/node/v20.9.0/bin/node
  Yarn:
    version: 1.22.19
    path: ~/.nvm/versions/node/v20.9.0/bin/yarn
  npm:
    version: 10.1.0
    path: ~/.nvm/versions/node/v20.9.0/bin/npm
  Watchman:
    version: 2023.11.06.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/tom/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.4
      - iOS 17.4
      - macOS 14.4
      - tvOS 17.4
      - visionOS 1.1
      - watchOS 10.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11330709
  Xcode:
    version: 15.3/15E204a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.9
    path: /usr/bin/javac
  Ruby:
    version: 3.2.0
    path: /Users/tom/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.5
    wanted: 0.73.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

not

Reproducer

not

Screenshots and Videos

No response

@github-actions github-actions bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Mar 6, 2024
Copy link

github-actions bot commented Mar 6, 2024

⚠️ Missing Reproducible Example
ℹ️ 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.

@liy010
Copy link

liy010 commented Mar 6, 2024

same

@young-st511
Copy link

young-st511 commented Mar 6, 2024

ENV
XCode: 15.4 / Simulator: iOS 17.4
RN: 0.71.14
Same issue.. please fix it..

@Sondouni
Copy link

Sondouni commented Mar 6, 2024

I think it`s because flipper. If you are using flipper, i dont know what to do but if not, delete
:flipper_configuration => flipper_config,
in your xcode podfile

@roneyyb
Copy link

roneyyb commented Mar 6, 2024

Facing same issue
ENV
XCode: 15.4 / Simulator: iOS 17.4
RN: 0.71.3

@netmaxt3r
Copy link
Contributor

netmaxt3r commented Mar 6, 2024

I was able to find temp fix with adding #include <functional> to ios/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h
may be an flipper needs an upgrade

Edit: can confirm flipper repo has this patch facebook/flipper@b3dcdb8

@grr1203
Copy link

grr1203 commented Mar 6, 2024

I have the same problem

@AppUU
Copy link

AppUU commented Mar 6, 2024

FlipperTransportTypes

@Pauligrinder
Copy link

The most recent RN Podfiles use the environment variable NO_FLIPPER.

I did export NO_FLIPPER=1 and then pod install (in the ios folder), which uninstalled all the flipper stuff, and after that the app builds. I don't use flipper anyway, so better this way.

@plannaAlain
Copy link

Same issue

@SarahBarbet
Copy link

same here

1 similar comment
@adrienjglx
Copy link

same here

@DavidMalinowski
Copy link

Exact same here. An here my solution:
Open Podfile in iOS Folder, disable the line:
#:flipper_configuration => flipper_config,

It should look like:

`use_react_native!(
:path => config[:reactNativePath],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
#:flipper_configuration => flipper_config,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."

)`

run pod install
This removes Flipper:
Removing CocoaAsyncSocket
Removing Flipper
Removing Flipper-Boost-iOSX
Removing Flipper-DoubleConversion
Removing Flipper-Fmt
Removing Flipper-Folly
Removing Flipper-Glog
Removing Flipper-PeerTalk
Removing FlipperKit
Removing OpenSSL-Universal

Works with my new Test and existing Project

@Grytsiv
Copy link

Grytsiv commented Mar 6, 2024

Facing same issue
ENV
XCode: 15.4 / Simulator: iOS 17.4
RN: 0.73.2

Fixed on M1 machine by next steps:

  1. edit/add react-native.config.js in the root folder of your project:
    dependencies: {
    ...(process.env.NO_FLIPPER
    ? {'react-native-flipper': {platforms: {ios: null}}}
    : {}),
    },

  2. run:
    NO_FLIPPER=1 arch -x86_64 pod install

The following link may be helpful
https://retyui.medium.com/speed-up-ios-builds-by-turning-off-flipper-on-ci-complete-react-native-guide-6846d8433d86

@mptorz
Copy link

mptorz commented Mar 6, 2024

If you still want to use flipper you can add this to your post_install

  post_install do |installer|
    installer.pods_project.targets.each do |target|
      if target.name == 'Flipper'
        file_path = 'Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h'
        contents = File.read(file_path)
        unless contents.include?('#include <functional>')
          File.open(file_path, 'w') do |file|
            file.puts('#include <functional>')
            file.puts(contents)
          end
        end
      end
    end
  end

@cipolleschi
Copy link
Contributor

cipolleschi commented Mar 6, 2024

Hi everyone! Thanks for reporting the issue.
As of 0.73, Flipper is deprecated and it has been removed in 0.74.

The fix for flipper has been shipped in Flipper 0.248.0, as mentioned here, but Flipper has not been released to Cocoapods since version 0.233.0.

Screenshot 2024-03-06 at 12 42 14

The workaround, for the time being, is to disable Flipper.

We are working toward bringing in the fix highlighted here to 0.73.5 and we will backport the fix at least to the React Native versions in the supported window.

@cortinico cortinico pinned this issue Mar 6, 2024
@cortinico cortinico changed the title upgrade xcode 15.3 run error [Has Workaround] Upgrading Xcode to 15.3 results in build error - Called object type 'facebook::flipper::SocketCertificateProvider' (aka 'int') is not a function or function pointer Mar 6, 2024
@cortinico cortinico added Platform: iOS iOS applications. Resolution: PR Submitted A pull request with a fix has been provided. and removed Needs: Triage 🔍 Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Mar 6, 2024
@diegopeixoto
Copy link

What to use if I don't want to use flipper.

comment the flipper_configuration line on PodFile, like this:
# :flipper_configuration => flipper_config,

@iYnaitD
Copy link

iYnaitD commented May 9, 2024

Exact same here. An here my solution: Open Podfile in iOS Folder, disable the line: #:flipper_configuration => flipper_config,

It should look like:

`use_react_native!( :path => config[:reactNativePath], # Enables Flipper. # # Note that if you have use_frameworks! enabled, Flipper will not work and # you should disable the next line. #:flipper_configuration => flipper_config, # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.."

)`

run pod install This removes Flipper: Removing CocoaAsyncSocket Removing Flipper Removing Flipper-Boost-iOSX Removing Flipper-DoubleConversion Removing Flipper-Fmt Removing Flipper-Folly Removing Flipper-Glog Removing Flipper-PeerTalk Removing FlipperKit Removing OpenSSL-Universal

Works with my new Test and existing Project

thank you very much, i have solved it

vincentritter added a commit to microdotblog/microblog-react that referenced this issue May 16, 2024
This is because it's no longer supported and removed from newer version of RN: facebook/react-native#43335 (comment)
@KarasuShin
Copy link

FlipperTransportTypes

Thanks so much, solved for me.

@Hemanshu-Varma
Copy link

The most recent RN Podfiles use the environment variable NO_FLIPPER.

I did export NO_FLIPPER=1 and then pod install (in the ios folder), which uninstalled all the flipper stuff, and after that the app builds. I don't use flipper anyway, so better this way.

Thanks, this fixed the issue.

@LaGregance
Copy link

If you still want to use flipper you can add this to your post_install

  post_install do |installer|
    installer.pods_project.targets.each do |target|
      if target.name == 'Flipper'
        file_path = 'Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h'
        contents = File.read(file_path)
        unless contents.include?('#include <functional>')
          File.open(file_path, 'w') do |file|
            file.puts('#include <functional>')
            file.puts(contents)
          end
        end
      end
    end
  end

Thanks for help, just note I get the following error: Permission denied @ rb_sysopen - Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h

Just need to add:

file_path = 'Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h'
system("chmod +w " + file_path)

@zerotower69
Copy link

I think it`s because flipper. If you are using flipper, i dont know what to do but if not, delete :flipper_configuration => flipper_config, in your xcode podfile

Thanks! It works for me. (XCode 15.4, RN 0.72.4,Ruby 2.7.5)

gaborszita added a commit to EagleScoutDev/EagleScout that referenced this issue Aug 22, 2024
Vir created a workaround to this error: facebook/react-native#43335
I fixed it the right way by upgrading react native
joaoloureirop added a commit to MetaMask/metamask-mobile that referenced this issue Sep 6, 2024
add pod post install script to include required import 
see more
facebook/flipper@b3dcdb8

facebook/react-native#43335 (comment)

NOTE: to install ios pods run `yarn pod:install`. It will execute `
bundle exec pod install --project-directory=ios` within the project root
directory.
Running  `pod install`  inside `ios` folder will error out
devin-ai-integration bot pushed a commit to MetaMask/metamask-mobile that referenced this issue Sep 9, 2024
add pod post install script to include required import 
see more
facebook/flipper@b3dcdb8

facebook/react-native#43335 (comment)

NOTE: to install ios pods run `yarn pod:install`. It will execute `
bundle exec pod install --project-directory=ios` within the project root
directory.
Running  `pod install`  inside `ios` folder will error out
@Paulraj153u1
Copy link

i am using react native
"react-native": "^0.72.4",
Screenshot 2024-09-17 at 3 24 29 PM
Screenshot 2024-09-17 at 3 34 30 PM
Screenshot 2024-09-17 at 3 34 55 PM

please support on this. thanks

jciereszko1 added a commit to Snapchat/camera-kit-react-native that referenced this issue Sep 19, 2024
## Background (Why?)

To update the repo to the latest version of the Camera Kit SDK - 1.34.0

## Change/Solution (What?)

- SDK version update
- Disabled Flipper per recommendation in
facebook/react-native#43335

## Screenshots for any visual changes

N/A

## Test Plans

Manually validated on iOS and Android device
@Yeasirarafat53
Copy link

i am using react native "react-native": "^0.72.4", Screenshot 2024-09-17 at 3 24 29 PM Screenshot 2024-09-17 at 3 34 30 PM Screenshot 2024-09-17 at 3 34 55 PM

please support on this. thanks

same as for me

@Yeasirarafat53
Copy link

I think it`s because flipper. If you are using flipper, i dont know what to do but if not, delete :flipper_configuration => flipper_config, in your xcode podfile

Thanks, it's works for me

@xulePlus
Copy link

xulePlus commented Oct 9, 2024

MacBook-Pro MyDome700 % npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 15.0
CPU: (8) arm64 Apple M3
Memory: 99.48 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.7.0 - /opt/homebrew/bin/node
Yarn: 3.6.4 - /opt/homebrew/bin/yarn
npm: 10.8.2 - /opt/homebrew/bin/npm
Watchman: 2024.08.19.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.15.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 24.0, iOS 18.0, macOS 15.0, tvOS 18.0, visionOS 2.0, watchOS 11.0
Android SDK: Not Found
IDEs:
Android Studio: 2023.3 AI-233.14808.21.2331.11709847
Xcode: 16.0/16A242d - /usr/bin/xcodebuild
Languages:
Java: 17.0.11 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.0 => 0.70.0
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

@xulePlus
Copy link

xulePlus commented Oct 9, 2024

截屏2024-10-09 10 50 09
RN 0.70.0
xcode 16
cocoapods 1.15.2

@xulePlus
Copy link

xulePlus commented Oct 9, 2024

FlipperTransportTypes

This will lead to other issues

@cipolleschi
Copy link
Contributor

0.72 and 0.70 are not supported anymore. Please migrate to the new versions.
Furthermore, Flipper is deprecated.

Meanwhile, you should be able to remove flipper by configuring your Podfile:

  • 0.70 Pass FlipperConfiguration.disabled
  • 0.72 Pass FlipperConfiguration.disabled

@GabrielleEmanoela
Copy link

GabrielleEmanoela commented Oct 29, 2024

Captura de Tela 2024-10-29 às 13 00 46

Disabling it solved my problem for now. thanks @cipolleschi

maciekstosio added a commit to software-mansion/radon-ide that referenced this issue Nov 27, 2024
Fixes #775

This PR fixes the configuration of `test-apps/react-native-73`. Two
things changed:
- get rid of Flipper as suggested in
facebook/react-native#43335
- force added `launch.json`, which was git ignored by `.gitignore` in
`radon-ide` root, imo it makes sense to merge it as this is project
specific config, and this is the suggested approach in our docs:
https://ide.swmansion.com/docs/guides/configuration#creating-configuration-file

### How Has This Been Tested: 

- open `test-apps/react-native-73` using Radon IDE
Apple0717 added a commit to Apple0717/radon that referenced this issue Nov 30, 2024
Fixes #775

This PR fixes the configuration of `test-apps/react-native-73`. Two
things changed:
- get rid of Flipper as suggested in
facebook/react-native#43335
- force added `launch.json`, which was git ignored by `.gitignore` in
`radon-ide` root, imo it makes sense to merge it as this is project
specific config, and this is the suggested approach in our docs:
https://ide.swmansion.com/docs/guides/configuration#creating-configuration-file

### How Has This Been Tested: 

- open `test-apps/react-native-73` using Radon IDE
kmagiera pushed a commit to software-mansion-labs/radon-ide-test-apps that referenced this issue Dec 3, 2024
Fixes #775

This PR fixes the configuration of `test-apps/react-native-73`. Two
things changed:
- get rid of Flipper as suggested in
facebook/react-native#43335
- force added `launch.json`, which was git ignored by `.gitignore` in
`radon-ide` root, imo it makes sense to merge it as this is project
specific config, and this is the suggested approach in our docs:
https://ide.swmansion.com/docs/guides/configuration#creating-configuration-file

### How Has This Been Tested: 

- open `test-apps/react-native-73` using Radon IDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: React Native Team Attention Platform: iOS iOS applications. Resolution: PR Submitted A pull request with a fix has been provided.
Projects
None yet
Development

No branches or pull requests