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 · 71 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
@cortinico cortinico changed the title [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 [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 Mar 15, 2024
@GitKat
Copy link

GitKat commented Mar 18, 2024

Adding #include to ios/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h does the job
All other workaround causes issues if your app is using flipper somewhere. i.e. vector Icons etc

flipper repo patch facebook/flipper@b3dcdb8

@GitKat
Copy link

GitKat commented Mar 18, 2024

I was able to update and build my app again but now the console logs do not appear in the terminal, does anyone know why this could be? and I don't have hot reload either, I modify something and save and the change is not reflected in the ios emulator 😭

Flipper is the debuger tool as they mention in the docs 😅, disabling it will cause weird issues.

try the solution above i commented

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

Wowwww u save my time 👍

@jenishx
Copy link

jenishx commented Mar 19, 2024

#include <functional>
Add this line on flipperTransportType file

Uploading Screenshot 2024-03-19 at 9.57.55 PM.png…

asafkorem added a commit to wix/react-native-navigation that referenced this issue Mar 20, 2024
asafkorem added a commit to wix/react-native-navigation that referenced this issue Mar 20, 2024
* fix(playground): add Xcode 15.3 compliance workaround on Podfile.

See issue & resolution on React Native project repo:
facebook/react-native#43335

* fix(playground): remove obsolete (& redundant) team signing.

* chore: bump `react-native-reanimated` version.

* fix(playground): apply workaround for Xcode 15.

See:
facebook/react-native#37748 (comment)
@egzon-mustafa
Copy link

egzon-mustafa commented Mar 20, 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

if someone wants to combine two post installs 🥳

  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
    
    react_native_post_install(
      installer,
      # Set `mac_catalyst_enabled` to `true` in order to apply patches
      # necessary for Mac Catalyst builds
      :mac_catalyst_enabled => false
    )
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end

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

Worked for me, thank you.

@gorbat-o
Copy link

gorbat-o commented Mar 26, 2024

Hey, when updating to 0.73.6 i have a different error
image
image

@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

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