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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

macos 14.3.1 xcode 15.3 'facebook::flipper::SocketCertificateProvider' (aka 'int') is not a function or function pointer #5500

Closed
krmao opened this issue Mar 6, 2024 · 7 comments

Comments

@krmao
Copy link

krmao commented Mar 6, 2024

馃悰 Bug Report

after upgrade macos to 14.3.1, and xcode to 15.3, xcode build react native 0.72.4 with error

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

also have a apple bug report https://forums.developer.apple.com/forums/thread/747552

To Reproduce

upgrade macos to 14.3.1
upgrade xcode to 15.3
xcode build react-native 0.72.4 project

Environment

macos 14.3.1
xcode 15.3
react-native 0.72.4

Quick Fix

midify FlipperTransportTypes.h and add bellow code to line 11

#include <functional>
@krmao krmao changed the title macos 14.3.1 xcode 15.3 macos 14.3.1 xcode 15.3 'facebook::flipper::SocketCertificateProvider' (aka 'int') is not a function or function pointer Mar 6, 2024
@nstr
Copy link

nstr commented Mar 6, 2024

Same issue

@tboba
Copy link

tboba commented Mar 6, 2024

Hi there, I believe this issue is already fixed, since this commit is already on main (I can see this import in the newest release of Flipper as well).
Because of that, I'd suggest to move the discussion of this error to the React Native repo (there are already some issues that addresses this error).

@krmao
Copy link
Author

krmao commented Mar 6, 2024

thanks, now we can't use 0.248.0 #5486

flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled(["Debug"], { 'Flipper' => '0.248.0' })

[!] CocoaPods could not find compatible versions for pod "FlipperKit":
  In Podfile:
    FlipperKit (= 0.248.0)

None of your spec sources contain a spec satisfying the dependency: `FlipperKit (= 0.248.0)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

@krmao krmao closed this as completed Mar 6, 2024
@krmao
Copy link
Author

krmao commented Mar 7, 2024

@tboba
Copy link

tboba commented Mar 7, 2024

@krmao Looks like Xcode has some issues with compiling the library. Unfortunately I can't do much, since I'm not the maintainer of Flipper 馃槄 But I see that there are issues with publishing it, since 0.233.0 version - https://cocoapods.org/pods/Flipper

@krmao
Copy link
Author

krmao commented Mar 7, 2024

Thanks for the reply, @tboba. Now I found a valid fix. Happy coding! facebook/react-native#43335 (comment)

@johnny-washswat
Copy link

johnny-washswat commented May 20, 2024

We also solved by adding this into Podfile. You don't need to apply this fix every time

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.chmod(0755, file_path)
          File.open(file_path, 'w') do |file|
            file.puts('#include <functional>')
            file.puts(contents)
          end
        end
      end
    end
  end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants