Stuck with Podfile.lock on EAS build

Hi @dbkable and @amanhimself

I think that expo doctor warning is not critical. I doubt it is the cause of your error. I created a issue for that a few days ago, though:

How are you building on your computer? And what dependencies do you have installed?

I see there was another issue about that expo doctor warning which has been fixed.

Try: expo doctor --fix-dependencies.

@wodin

Hello,

Nop the expo doctor --fix-dependencies doesn’t fix it.

How are you building on your computer?

With the terminal by using expo run:ios or by xcode with the normal way.

what dependencies do you have installed?

"@apollo/client": "^3.6.9",
    "@babel/preset-typescript": "^7.16.0",
    "@datadog/mobile-react-native": "^1.0.0",
    "@datadog/mobile-react-navigation": "^1.0.0",
    "@ethersproject/shims": "^5.6.0",
    "@expo/config-plugins": "^4.1.0",
    "@expo/configure-splash-screen": "^0.6.0",
    "@fortawesome/fontawesome-svg-core": "^1.2.35",
    "@fortawesome/free-brands-svg-icons": "^5.15.4",
    "@fortawesome/free-solid-svg-icons": "^5.15.4",
    "@fortawesome/pro-duotone-svg-icons": "^5.15.4",
    "@fortawesome/pro-light-svg-icons": "^5.15.4",
    "@fortawesome/pro-regular-svg-icons": "^5.15.4",
    "@fortawesome/pro-solid-svg-icons": "^5.15.4",
    "@fortawesome/react-native-fontawesome": "^0.3.0",
    "@gorhom/bottom-sheet": "^4.4.3",
    "@intercom/intercom-react-native": "^3.0.5",
    "@metamask/eth-sig-util": "^4.0.1",
    "@react-native-async-storage/async-storage": "^1.17.7",
    "@react-native-community/netinfo": "8.2.0",
    "@react-native-community/slider": "4.2.1",
    "@react-native-firebase/app": "^15.2.0",
    "@react-native-firebase/dynamic-links": "^15.2.0",
    "@react-native-masked-view/masked-view": "0.2.6",
    "@react-navigation/bottom-tabs": "^6.3.2",
    "@react-navigation/native": "^6.0.11",
    "@react-navigation/native-stack": "^6.7.0",
    "@shopify/flash-list": "^1.2.1",
    "@th3rdwave/react-navigation-bottom-sheet": "^0.2.2",
    "@types/apollo-upload-client": "^17.0.1",
    "@types/crypto-js": "^4.1.1",
    "@types/i18n-js": "^3.8.1",
    "@types/lodash": "^4.14.177",
    "@types/react-native-dotenv": "^0.2.0",
    "apollo-link-queue": "^3.1.0",
    "apollo-upload-client": "^17.0.0",
    "apollo3-cache-persist": "^0.14.1",
    "babel-plugin-inline-dotenv": "^1.6.0",
    "config-plugin-react-native-intercom": "^1.4.3",
    "crypto-js": "^4.1.1",
    "dayjs": "^1.11.4",
    "dotenv": "^16.0.1",
    "ethers": "^5.6.9",
    "expo": "^45.0.6",
    "expo-av": "~11.2.3",
    "expo-barcode-scanner": "~11.3.0",
    "expo-blur": "~11.1.0",
    "expo-clipboard": "~3.0.1",
    "expo-constants": "~13.1.1",
    "expo-contacts": "~10.2.0",
    "expo-crypto": "~10.2.0",
    "expo-dev-client": "~1.0.0",
    "expo-device": "~4.2.0",
    "expo-firebase-recaptcha": "~2.2.0",
    "expo-font": "~10.1.0",
    "expo-haptics": "~11.2.0",
    "expo-image-manipulator": "~10.3.1",
    "expo-image-picker": "~13.1.1",
    "expo-linear-gradient": "~11.3.0",
    "expo-linking": "~3.1.0",
    "expo-localization": "~13.0.0",
    "expo-notifications": "~0.15.4",
    "expo-random": "~12.2.0",
    "expo-secure-store": "~11.2.0",
    "expo-splash-screen": "~0.15.1",
    "expo-status-bar": "~1.3.0",
    "expo-updates": "~0.13.4",
    "expo-web-browser": "~10.2.1",
    "firebase": "^9.5.0",
    "graphql": "^16.0.1",
    "i": "^0.3.6",
    "install": "^0.13.0",
    "libphonenumber-js": "^1.9.43",
    "lodash": "^4.17.21",
    "lottie-react-native": "5.0.1",
    "nanoid": "^3.1.31",
    "node-libs-expo": "^0.0.3",
    "npm": "^8.11.0",
    "number-to-locale-string-polyfill": "^1.0.9",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-native": "0.68.2",
    "react-native-countdown-circle-timer": "^3.0.9",
    "react-native-dialog": "^9.2.2",
    "react-native-dotenv": "^3.3.1",
    "react-native-draggable-flatlist": "^3.1.2",
    "react-native-fast-image": "^8.5.11",
    "react-native-fs": "^2.20.0",
    "react-native-gesture-handler": "~2.2.1",
    "react-native-get-random-values": "~1.8.0",
    "react-native-pager-view": "5.4.15",
    "react-native-photoeditorsdk": "^2.13.1",
    "react-native-qrcode-svg": "^6.1.2",
    "react-native-reanimated": "^2.4.1",
    "react-native-safe-area-context": "4.2.4",
    "react-native-screens": "~3.11.1",
    "react-native-svg": "12.3.0",
    "react-native-svg-transformer": "^0.14.3",
    "react-native-tab-view": "^3.1.1",
    "react-native-web": "0.17.7",
    "react-native-webview": "11.18.1",
    "react-native-youtube-iframe": "^2.2.2"

eas build -p ios --clear-cache

@brents Also tried this one :confused:

link to build page?

Do you need this? (e.g. Do you have a config plugin that you wrote yourself?) Otherwise you should probably uninstall it. Also it should probably be a devDependency rather than a dependency.

What is this? Oh, I see it’s GitHub - pksunkara/inflect: custom inflections for nodejs

Do you need this?

If I install your dependencies (except for the @fortawesome/pro-* stuff) and run expo doctor --fix-dependencies, then expo doctor does not complain about @expo/config-plugins@5.0.0 for me.

If that doesn’t work for you, maybe after that try removing your yarn.lock / package-lock.json and node_modules and reinstalling your dependencies to see if that helps.

EDIT: But change your react-native-reanimated dependency to:

    "react-native-reanimated": "~2.8.0",

Hey @wodin,

I’ve follow your recommandation, but still stuck.

The locked podfile is still a huge problem for my build on EAS (not locally)

The build is launched with

eas build --profile production --platform ios --clear-cache

It fails, then I restart with the button “clear cache and restart” but stills same.

The locked podfile is still a huge problem for my build on EAS (not locally)

If you tried clearing cache then it’s not an issue with cached podfile.lock. Another explanation is that you have 2 libraries that depend on different versions of the same pod.

1 Like

Okay but I have the problem only on EAS, hard to debug!

[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
  In Podfile:
    EXFirebaseCore (from `../node_modules/expo-firebase-core/ios`) was resolved to 5.0.0, which depends on
      Firebase/Core (= 8.14.0) was resolved to 8.14.0, which depends on
        Firebase/CoreOnly (= 8.14.0)
    RNFBApp (from `../node_modules/@react-native-firebase/app`) was resolved to 15.4.0, which depends on
      Firebase/CoreOnly (= 9.5.0)

I don’t know if @react-native-firebase/app can even be used in the same app as expo-firebase-core, but to solve issues like this you need to check podspec of both libraries and find versions that depend on the same version of Firebase/CoreOnly

If you want to reproduce that locally you can run expo prebuild, go to ios directory and run pod install

2 Likes

When I bumped RNF, I think I forgot to update the bump of

$FirebaseSDKVersion = 8.13.0 => '9.5.0'

I hope it will work !

1 Like

I have this problem every couple days. Not sure why either. I run into it typically after bumping a package version or after running expo doctor --fix-dependencies but I have not investigated the root cause.

However! I typically resolve it by bumping the cache key in my eas.json. For each build key I update the cache.key. Next time I see this issue I will bump development_key3 to development_key4. I have the same setup for production_key3, internal_key3, etc. See example snippet below.

The dev team seems to be moving fast and things change often. So this works for me for now. If the frequency of these issues increase we will likely automate the changing of the cache.key.

{
  "build": {
    "development": {
      "extends": "production",
      "developmentClient": true,
      "distribution": "internal",
      "releaseChannel": "development",
      "cache": {
        "key": "development_key3"
      },

you can disable cache.cacheDefaultPaths in your build profile if you don’t want to cache the Podfile.lock by default: Build schema for eas.json - Expo Documentation

1 Like

Very cool! Thank you!

Okay, I have downgraded RNF and there is a problem…

    "@react-native-firebase/app": "~14.7.0",
    "@react-native-firebase/dynamic-links": "~14.7.0",

This version is not supported by Expo 45 (because it missing the Expo plugin objcpp)
The compatibility comes with fthe 14.9.1, but with this version, the incompatibility between RNF and EXFirebaseCore will be there.

How can I do ?

Fix the issue with patches while waiting for an update

@react-native-firebase+app+14.9.4.patch

diff --git a/node_modules/@react-native-firebase/app/RNFBApp.podspec b/node_modules/@react-native-firebase/app/RNFBApp.podspec
index 6f899b5..60d0a66 100644
--- a/node_modules/@react-native-firebase/app/RNFBApp.podspec
+++ b/node_modules/@react-native-firebase/app/RNFBApp.podspec
@@ -28,7 +28,7 @@ Pod::Spec.new do |s|
   end
 
   # Firebase dependencies
-  s.dependency          'Firebase/CoreOnly', firebase_sdk_version
+  s.dependency          'Firebase/CoreOnly', "8.14.0"
 
   if defined?($RNFirebaseAsStaticFramework)
     Pod::UI.puts "#{s.name}: Using overridden static_framework value of '#{$RNFirebaseAsStaticFramework}'"

@react-native-firebase+dynamic-links+14.9.4.patch

diff --git a/node_modules/@react-native-firebase/dynamic-links/RNFBDynamicLinks.podspec b/node_modules/@react-native-firebase/dynamic-links/RNFBDynamicLinks.podspec
index c000638..ae224cc 100644
--- a/node_modules/@react-native-firebase/dynamic-links/RNFBDynamicLinks.podspec
+++ b/node_modules/@react-native-firebase/dynamic-links/RNFBDynamicLinks.podspec
@@ -34,7 +34,7 @@ Pod::Spec.new do |s|
   end
 
   # Firebase dependencies
-  s.dependency          'Firebase/DynamicLinks', firebase_sdk_version
+  s.dependency          'Firebase/DynamicLinks', "8.14.0"
   s.dependency          'GoogleUtilities/AppDelegateSwizzler'
 
   if defined?($RNFirebaseAsStaticFramework)

Maybe you don’t need expo-firebase-core if you’re using @react-native-firebase/app? (I haven’t used firebase myself, but that seems to be what wkozyra is implying.)

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.