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

Flipper doesn't build with Xcode "react-native": "0.70.0", #4278

Open
R-Kiran-Raj opened this issue Oct 31, 2022 · 39 comments
Open

Flipper doesn't build with Xcode "react-native": "0.70.0", #4278

R-Kiran-Raj opened this issue Oct 31, 2022 · 39 comments

Comments

@R-Kiran-Raj
Copy link

R-Kiran-Raj commented Oct 31, 2022

🐛 Bug Report

Screenshot 2022-10-31 at 2 13 05 PM

Xcode 12.5 RC
React Native 0.70.0

@Acetyld
Copy link

Acetyld commented Oct 31, 2022

Exact same problem! Stuck on this for quite a while.

@Acetyld
Copy link

Acetyld commented Oct 31, 2022

Downgrade to flipper 0.163.0 seems to have fixed it.

@sylv1b
Copy link

sylv1b commented Oct 31, 2022

Same problem here, but with xcode 14.0.1

@TheWirv
Copy link

TheWirv commented Nov 3, 2022

Seems like Xcode is trying to link Flipper again for release builds.

This had been fixed by @mweststrate a long time ago: #976 (comment)

I wonder what happened for this bug to come up again. For now, my workaround has been downgrading, just like @Acetyld :/ The most recent published version (that is on npm, cocoapods, and Maven) without this bug is 0.164.0.

@BS-FastwebIT
Copy link

I was also looking for a solution for this problem, I updated to the latest version of Flipper and I was no longer able to do the building, after a while I found the solution through the Flipper site itself.

you can write this line in podfile :flipper_configuration => FlipperConfiguration.enabled(["Debug"]),

.....
  permissions_path = '../node_modules/react-native-permissions/ios'
 pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
use_react_native!(
   :path => config[:reactNativePath],
   # Hermes is now enabled by default. Disable by setting this flag to false.
   # Upcoming versions of React Native may rely on get_default_flags(), but
   # we make it explicit here to aid in the React Native upgrade process.
   :hermes_enabled => true,
   :fabric_enabled => flags[:fabric_enabled],
   # Enables Flipper.
   #
   # Note that if you have use_frameworks! enabled, Flipper will not work and
   # you should disable the next line.
   :flipper_configuration => FlipperConfiguration.enabled(["Debug"]),
   # An absolute path to your application root.
   :app_path => "#{Pod::Config.instance.installation_root}/.."
 )
.....

hope this can help you all :)

@TheWirv
Copy link

TheWirv commented Nov 3, 2022

@BS-FastwebIT
image
My podfile has been looking like this ever since they introduced FlipperConfiguration. (Obviously, I change the version number when updating.) It doesn't change anything—at least not for versions greater than 0.164.0.

@salmandayal
Copy link

Any solution for this issue yet?
I've tried 0.163.0 but still facing this issue when try to create in Release build in IOS

@lucasftcruz
Copy link

Same here, I can build the app locally, but any release version will fail with the error below:

Undefined symbols for architecture arm64: "_OBJC_CLASS_$_FlipperClient", referenced from: objc-class-ref in libreact-native-flipper.a(FlipperReactNativeJavaScriptPluginManager.o) ld: symbol(s) not found for architecture arm64

Xcode 13.3
React Native 0.70.3
react-native-flipper 0.172.0

@sylv1b
Copy link

sylv1b commented Nov 4, 2022

For me, the problem appeared after installing react-native-flipper (0.173.0).
To be able to install the app on my phone, I use this workaround, but it's not suitable for production:
:flipper_configuration => FlipperConfiguration.enabled(["Debug", "Release"], { 'Flipper' => '0.173.0' }),

@fjmorant
Copy link

fjmorant commented Nov 4, 2022

Same issue for me, I am going to try adding "Release"

@Steven-Thelin
Copy link

Steven-Thelin commented Nov 7, 2022

The same issue occurred here. I fixed this error by setting flipper version to 0.163.0 in Podfile:

:flipper_configuration => FlipperConfiguration.enabled(["Debug"], {'Flipper' => '0.163.0'}),

and setting react-native-flipper to 0.163.0 in package.json:


However this caused a different error:

main.jsbundle does not exist.

I got around that by adding the following build-script to package.json

"ios:build": "react-native bundle --entry-file='index.ts' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios'"

and running the above before building the app in xcode.

@alicja-mruk
Copy link

alicja-mruk commented Nov 8, 2022

I downgraded flipper version to 0.163.0 without changing anything else, and it worked for me. It is not the solution we are aiming for though, just temporary one.

@TheWirv
Copy link

TheWirv commented Nov 11, 2022

Still an issue on the most recent 0.174.0

@iamabdulhaseeb
Copy link

@alicja99 it worked for me too, thank you. :)

shadowsheep1 added a commit to shadowsheep1/TestRNOwlProject that referenced this issue Nov 14, 2022
This is the current Flipper issue: facebook/flipper#4278
@xeroxoid
Copy link

@Acetyld @alicja99 thanks that worked. Was about to completely remove Flipper as a last resort.

@YaoHuiJi
Copy link

downgrade to flipper 0.163.0 works for me with react native 0.70.2 & xcode 14.1

@JaakkoKammonen24center
Copy link

I got it working with
package.json:
"react-native": "0.70.6",
"react-native-flipper": "^0.164.0",
Podfile:
:flipper_configuration => FlipperConfiguration.enabled(["Debug"], {'Flipper' => '0.164.0'}),
android/gradle.properties:
FLIPPER_VERSION=0.164.0

Build:
App Center
Xcode version: 14.1
Node.js: 16.x

@cristianserban-dometic
Copy link

Same issue on my end, using :flipper_configuration => FlipperConfiguration.enabled(["Debug"], { 'Flipper' => '0.174.0' }) Any news on this one?

@longb1997
Copy link

longb1997 commented Jan 9, 2023

Still happens on react-native 0.70.6 and react-native-flipper 0.176.1

@pgpankajbigstep
Copy link

@longb1997 : i have also same react-native version 0.70.6 but i solve with :flipper_configuration => FlipperConfiguration.enabled(["Debug", "Release"], {'Flipper' => '0.163.0'}),

@stereodenis
Copy link

I got it working with package.json: "react-native": "0.70.6", "react-native-flipper": "^0.164.0", Podfile: :flipper_configuration => FlipperConfiguration.enabled(["Debug"], {'Flipper' => '0.164.0'}), android/gradle.properties: FLIPPER_VERSION=0.164.0

Build: App Center Xcode version: 14.1 Node.js: 16.x

Works for me!

@fcaldarelli
Copy link

In my case the problem was different.

Using in Podfile the default flipper configuration:

    :flipper_configuration => FlipperConfiguration.enabled(["Debug"]),

I found that when launched pod install --verbose I saw that the branch version was different, in my case was 1.76.0.1.9. The 1.76.0.1.9 missed asm folder needed to link the code.

In the screen I put the right version.

Screenshot 2023-01-20 alle 10 46 28

To fix, call pod repo list and update the CDN (usually named as trunk) with

pod repo update trunk (if at your side is named trunk)

Launch again pod install --verbose and you will see the same and right version of the Pod.

jakobo added a commit to jakobo/expo-community-flipper that referenced this issue Jan 24, 2023
This is related to facebook/flipper#4278, where it's possible to
generate a build that includes flipper via the .enabled() flag, but also
missing the correct metro configurations. To remedy this, ECF will
always enable flipper for all environments, with the disable option
respecting the newer NO_FLIPPER configuration in addition to the
legacy check of FLIPPER_DISABLE.
@HugoGresse
Copy link

Same issue using "react-native-flipper": "^0.189.0", with RN 0.70.8

Reverting to 0.163.0, npm i, pod install fixed the issue.

@fondue-tech
Copy link

When there are issues in my rn apps it's always flipper, I have tried all fixes mentioned above and nothing works.

@fukemy
Copy link

fukemy commented May 25, 2023

any solution please, Im feel much tied and painful when upgrade react native to 0.71.x

@fukemy
Copy link

fukemy commented May 25, 2023

just set
:flipper_configuration => FlipperConfiguration.enabled(["Debug", "Release"]),

work to me, nothing to do

@pgy108103
Copy link

just set :flipper_configuration => FlipperConfiguration.enabled(["Debug", "Release"]),

work to me, nothing to do

@fukemy thank you!! it works for me

@raphaelinmanage
Copy link

Same issue using "react-native-flipper": "^0.189.0", with RN 0.70.8

Reverting to 0.163.0, npm i, pod install fixed the issue.

Hey, i have the same problem with flipper 0.189.0
i downgraded to 0.163.0 and works fine
Any update on the latest version?

@Nensi9
Copy link

Nensi9 commented Jun 28, 2023

I have the same problem with flipper 0.192.0
I downgraded it to 0.163.0 and works perfectly.
Not working with the latest version 0.201.0 also.
Any update on the latest version?

@mManishTrivedi
Copy link

We also encountered this issue and spent almost two days investigating it. We eventually discovered that the versions of the package.json and Podfile files were different. After updating both files to flipper 0.163.0, the issue was resolved. (This was for React Native 0.71.0.)

leotm added a commit to MetaMask/metamask-mobile that referenced this issue Aug 2, 2023
Issue
- Fix: facebook/flipper#4278

Follow-up
- #6944

Branch from
- #6851

File changes
- package.json
- yarn lockfile
- cocoapods lockfile
leotm added a commit to MetaMask/metamask-mobile that referenced this issue Aug 2, 2023
@ark-app-admin
Copy link

just set :flipper_configuration => FlipperConfiguration.enabled(["Debug", "Release"]),

work to me, nothing to do

This enables flipper for your release build, which is not something you want to do

@npinney
Copy link

npinney commented Sep 20, 2023

Having this issue regardless of version and regardless of adding "Release" or not. I am using react native 0.71. Can anyone share a patch package or post_install script which removes FB_SONARKIT_ENABLED=1 from FlipperKit pod build settings? Using Bitrise and can't add NO_FLIPPER=1 to pod install command. I see no way to get around this other than removing flipper altogether 🤦‍♂️😒

@cam-shaw
Copy link

@npinney you should be able to add NO_FLIPPER=1 as an environment variable in Bitrise.
In your Podfile, it should look for NO_FLIPPER
e.g.

flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

@esbenvb
Copy link

esbenvb commented Sep 26, 2023

In my case, this was solved by installing the proper version of the react-native-flipper npm package.

I could see in the Podfile.lock and gradle.properties the binary Flipper version was 0.125.0 so I did a yarn add react-native-flipper@0.125.0 instead of the default version, and now I can build again :)

@recallwei
Copy link

recallwei commented Oct 11, 2023

Still not working, "react-native": "0.72.5", "react-native-flipper": "0.212.0"

@fimak
Copy link

fimak commented Oct 13, 2023

in Pods file
:flipper_configuration => FlipperConfiguration.enabled(["Debug"]),

in recat-native.config.js

module.exports = {
  dependencies: {
    'react-native-flipper': {
      platforms: {
        ios: null,
      },
    },
  },
...
};

then do pod install

@abhayagrawal-fareye
Copy link

I am facing this issue in RN 0.72.4 with flipper version 0.182.0
:flipper_configuration => FlipperConfiguration.enabled(["Debug","Release"], { 'Flipper' => '0.182.0' }),
This line solved the problem for me but it enables the flipper for Release which is not the right solution

I have to use Flipper version 0.182.0 because I am using fresco-plugin in android/app/build.gradle.

Is there any better solution ? @fukemy @fcaldarelli

@ceres-quangd
Copy link

Just wondering if there is any update on this issue or newer version of Flipper 163.

@fcaldarelli
Copy link

It might no longer be an issue since the use of Flipper is discouraged from version 0.73 onwards.

react-native-community/discussions-and-proposals#641

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