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 · 76 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
@Prince-AppsTango
Copy link

@AppUU thanks

@city0666
Copy link

city0666 commented Apr 3, 2024

FlipperTransportTypes

its work for me

@MarcosJBM
Copy link

FlipperTransportTypes

it works for me, thanks.

  • react-native: 0.68.0
  • react: 17.0.2

@Gaurav-MobDev
Copy link

Gaurav-MobDev commented Apr 9, 2024

The solution is already mentioned in podfile, read the comments

Screenshot 2024-04-09 at 11 36 26 PM Screenshot 2024-04-09 at 11 01 26 PM

and if you get HERMES error then add this to your podfile

Screenshot 2024-04-09 at 11 34 44 PM

@MehmetKaplan
Copy link

MehmetKaplan commented Apr 9, 2024

The solution is in react-native version 0.72.12.
Upgrading to this version solved my eas build problem.

@usmanabid94
Copy link

FlipperTransportTypes

Saved me i just updated my Xcode and was going to build my app to make it live and saw this error but thanks to your solution it is working now.

@pedroara
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

Solved for me.
react-native: "0.73.2"
react-native-flipper: "^0.212.0"
Xcode: Version 15.3 (15E204a)

@diegopeixoto
Copy link

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

Solved for me.

@pujanrajrai
Copy link

comenting flipper in pod file solved my issue
# :flipper_configuration => flipper_config,

@harshilparmar
Copy link

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

@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
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