-
Notifications
You must be signed in to change notification settings - Fork 8
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
DISABLE_FLIPPER=1 breaks CI #18
Comments
Hey, can you run |
The following is the Podfile after I ran // package.json
...
"expo": "^46.0.0",
"expo-community-flipper": "^46.0.0",
"react-native-flipper": "^0.161.0",
... # Podfile
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
require File.join(File.dirname(`node --print "require.resolve('@react-native-community/cli-platform-ios/package.json')"`), "native_modules")
require 'json'
podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}
platform :ios, podfile_properties['ios.deploymentTarget'] || '12.4'
install! 'cocoapods',
:deterministic_uuids => false
target 'XXX' do
use_expo_modules!
config = use_native_modules!
use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => flags[:hermes_enabled] || podfile_properties['expo.jsEngine'] == 'hermes',
:fabric_enabled => flags[:fabric_enabled],
# An absolute path to your application root.
:app_path => "#{Dir.pwd}/.."
)
# @generated begin expo-community-flipper - expo prebuild (DO NOT MODIFY) sync-eaa63d5375e7930ea096abf972908f639babe2c9
# Flipper support successfully added via expo config plugin
# https://www.npmjs.com/package/expo-community-flipper
if !ENV['FLIPPER_DISABLE']
use_flipper!()
end
# @generated end expo-community-flipper
# Uncomment to opt-in to using Flipper
# Note that if you have use_frameworks! enabled, Flipper will not work
#
# if !ENV['CI']
# use_flipper!()
# end
post_install do |installer|
# @generated begin expo-community-flipper-post-install - expo prebuild (DO NOT MODIFY) sync-616283d65c598f00dc6cc76cb3079af422438f93
# Flipper support successfully added via expo config plugin
# https://www.npmjs.com/package/expo-community-flipper
if !ENV['FLIPPER_DISABLE']
flipper_post_install(installer)
end
# @generated end expo-community-flipper-post-install
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
post_integrate do |installer|
begin
expo_patch_react_imports!(installer)
rescue => e
Pod::UI.warn e
end
end
end |
tl;dr: Definitely a bug, the kind we would have never seen because the backwards incompatible change was in a patch release of React Native. So, here's what I've learned
Full Changelog from 0.68 to Expo's RN Version: https://react-native-community.github.io/upgrade-helper/?from=0.68.3&to=0.69.4 |
@jakobo here are my results I ran the following: the new podfile is different from before. however when i startup the xcode workspace the podfile that seems to still be having trouble is still react-native-flipper for some odd reason #Podfile
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
require File.join(File.dirname(`node --print "require.resolve('@react-native-community/cli-platform-ios/package.json')"`), "native_modules")
require 'json'
podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}
platform :ios, podfile_properties['ios.deploymentTarget'] || '12.4'
install! 'cocoapods',
:deterministic_uuids => false
target 'XXX' do
use_expo_modules!
config = use_native_modules!
use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# @generated begin expo-community-flipper-isprod - expo prebuild (DO NOT MODIFY) sync-e002ec08de24fbbe5b9a843ae9231b9627b8b9c4
# https://www.npmjs.com/package/expo-community-flipper
:production => ENV["PRODUCTION"] == "1" ? true : false,
# @generated end expo-community-flipper-isprod
:hermes_enabled => flags[:hermes_enabled] || podfile_properties['expo.jsEngine'] == 'hermes',
:fabric_enabled => flags[:fabric_enabled],
# @generated begin expo-community-flipper-urn - expo prebuild (DO NOT MODIFY) sync-4e2a82fdf3281fe0e3d2b3cffce0e78c985bced0
# https://www.npmjs.com/package/expo-community-flipper
:flipper_configuration => ENV['FLIPPER_DISABLE'] ? FlipperConfiguration.disabled : FlipperConfiguration.enabled,
# @generated end expo-community-flipper-urn
# An absolute path to your application root.
:app_path => "#{Dir.pwd}/.."
)
# Uncomment to opt-in to using Flipper
# Note that if you have use_frameworks! enabled, Flipper will not work
#
# if !ENV['CI']
# use_flipper!()
# end
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
post_integrate do |installer|
begin
expo_patch_react_imports!(installer)
rescue => e
Pod::UI.warn e
end
end
end |
Alright, the Podfile now looks correct matching Flipper's podfile changes post 0.69.2. Because it's been a while since I started a new project, I went back through Can you make the following changes and retest? (We're currently Mac-less over here so I can't check the xcode output). These steps remove the JS module. We won't be able to use custom plugins such as the Redux flipper plugin yet, but it will get rid of possible noise.
|
@jakobo I was able to get the Whenever I want to enable flipper by building locally in my local environment with the following command it successfully builds my XXX.app and I'm able to install it into my iOS simulator. However, the app is not showing up in the Flipper desktop app which previously was showing up before removing
Is there some other thing that I would require to edit in my configuration? By default if we install this module, are we expecting FLIPPER_DISABLE=0? Thanks! |
I'm glad we traced the error to the npm module. That at least will help the Flipper team if there's something going wrong with autolinking. I'll begin looking into their module this evening in case there's some weird interaction w/ it and expo.
No, currently flipper will treat any value for
That will keep flipper enabled by default (like it is in React Native) except if making a production build or Flipper is explicitly disabled. |
Setting
export FLIPPER_DISABLE=1
breaks eas buildHey @jakobo, when I set my environmental variable to be disabled in as an expo secret and CI and I was hit with the following error:
It seems as though when we set DISABLE_FLIPPER=1, react-native-flipper is not disabled and is looking for Flipper plugin as well. Is there a way to tell cocoapods to not install react-native-flipper?
Thanks!
The text was updated successfully, but these errors were encountered: