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

Diff in Podfile.lock when runs in different machines #31121

Closed
franciscomorais opened this issue Mar 9, 2021 · 64 comments
Closed

Diff in Podfile.lock when runs in different machines #31121

franciscomorais opened this issue Mar 9, 2021 · 64 comments
Labels
Needs: React Native Team Attention Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@franciscomorais
Copy link

franciscomorais commented Mar 9, 2021

Description

When we run pod install we have different hashes in FBReactNativeSpec. This is because I think the building scripts are using full paths to generate the hash. For example, on the same machine if we rename the project directory, the hash will be different.

I think the PR that injects this bug is this.

Steps To Reproduce

1 - install node dependencies: yarn
2 - install ios pods dependencies: pod install
3 - create a commit in git: git commit -m "whatever your want"
4 - rename project folder: cd ../.. && mv projectSample projectSample2 && cd projectSample2/ios
5 - runs again pods installation command: pod install

Expected Results

Podfile.lock doesn't have diffs after run pod install --repo-update.

Founded Results

   ...
   FBLazyVector: 5776f027522ce1b2415982c48c8407c95966c60f
-  FBReactNativeSpec: 162f37a35ac13f9ef7ef0a77973a21393ba0dbab
+  FBReactNativeSpec: 7594b4ffdc73f2695967c9f7c766cf3c26da86a8
   Flipper: d3da1aa199aad94455ae725e9f3aa43f3ec17021
   ...

React Native version:

Module Version
react 17.0.1
react-native 0.64.0-rc.4
@chrisglein chrisglein added Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. Needs: Issue Template This issue does not make use of the Issue Template, and may be missing necessary information. and removed Needs: Triage 🔍 labels Mar 9, 2021
@github-actions
Copy link

github-actions bot commented Mar 9, 2021

⚠️ Missing Environment Information
ℹ️ Your issue may be missing information about your development environment. You can obtain the missing information by running react-native info in a console.

@github-actions
Copy link

github-actions bot commented Mar 9, 2021

⚠️ Missing Required Fields
ℹ️ It looks like your issue may be missing some necessary information. GitHub provides an example template whenever a new issue is created. Could you go back and make sure to fill out the template? You may edit this issue, or close it and open a new one.

@madandrija
Copy link

We have the same problem, each machine generates a different FBReactNativeSpec hash. @franciscomorais, please add your system info, here's mine

System:
    OS: macOS 11.2.1
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 1.99 GB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.15.4 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.14.10 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK:
      API Levels: 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 30.0.3
      System Images: android-30 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.7042882
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_282 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1 
    react-native: 0.64.0-rc.4 => 0.64.0-rc.4 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

@franciscomorais
Copy link
Author

System info:

System:
    OS: macOS 10.15.7
    CPU: (8) x64 Intel(R) Core(TM) i7-9700F CPU @ 3.00GHz
    Memory: 7.74 GB / 64.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.20.0 - /usr/local/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.14.8 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.7042882
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.5 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1
    react-native: 0.64.0-rc.4 => 0.64.0-rc.4
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Mar 11, 2021
@mlazari
Copy link
Contributor

mlazari commented Mar 16, 2021

I think the issue comes from here:

spec.script_phase = {

The object assigned to spec.script_phase contains some absolute paths (for example in srcs_dir), which I think affects the hash in Podfile.lock for FBReactNativeSpec. The issue was probably introduced even earlier, in this commit: c901c1f#diff-43504ce3403645032fd1e42a7fe7a52171a9fbd0946229948e2c6abff3681120R58

@martintreurnicht
Copy link

martintreurnicht commented Mar 18, 2021

The root cause of this is absolute pathing in script_phase, you can inspect the resolved spec file by running:

pod ipc spec node_modules/react-native/React/FBReactNativeSpec/FBReactNativeSpec.podspec

you should see something like:

{
  "name": "FBReactNativeSpec",
  "version": "0.64.0",
  "summary": "-",
  "homepage": "https://reactnative.dev/",
  "license": "MIT",
  "authors": "Facebook, Inc. and its affiliates",
  "platforms": {
    "ios": "10.0"
  },
  "compiler_flags": "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32 -Wno-nullability-completeness",
  "source": {
    "git": "https://github.com/facebook/react-native.git",
    "tag": "v0.64.0"
  },
  "source_files": "**/*.{c,h,m,mm,cpp}",
  "header_dir": "FBReactNativeSpec",
  "pod_target_xcconfig": {
    "USE_HEADERMAP": "YES",
    "CLANG_CXX_LANGUAGE_STANDARD": "c++14",
    "HEADER_SEARCH_PATHS": "\"$(PODS_TARGET_SRCROOT)/React/FBReactNativeSpec\" \"$(PODS_ROOT)/RCT-Folly\""
  },
  "dependencies": {
    "RCT-Folly": [
      "2020.01.13.00"
    ],
    "RCTRequired": [
      "0.64.0"
    ],
    "RCTTypeSafety": [
      "0.64.0"
    ],
    "React-Core": [
      "0.64.0"
    ],
    "React-jsi": [
      "0.64.0"
    ],
    "ReactCommon/turbomodule/core": [
      "0.64.0"
    ]
  },
  "script_phases": {
    "name": "Generate Specs",
    "input_files": [
      "<absolute project path>/node_modules/react-native/scripts/../Libraries"
    ],
    "output_files": [
      "$(DERIVED_FILE_DIR)/codegen-FBReactNativeSpec.log",
      "<absolute project path>/node_modules/react-native/scripts/../React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h",
      "<absolute project path>/node_modules/react-native/scripts/../React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm"
    ],
    "script": "set -o pipefail\n\nbash -l -c 'SRCS_DIR=<absolute project path>/node_modules/react-native/scripts/../Libraries CODEGEN_MODULES_OUTPUT_DIR=<absolute project path>/node_modules/react-native/scripts/../React/FBReactNativeSpec/FBReactNativeSpec CODEGEN_MODULES_LIBRARY_NAME=FBReactNativeSpec <absolute project path>/node_modules/react-native/scripts/generate-specs.sh' 2>&1 | tee \"${SCRIPT_OUTPUT_FILE_0}\"",
    "execution_position": "before_compile",
    "show_env_vars_in_log": true
  },
  "prepare_command": "mkdir -p <absolute project path>/node_modules/react-native/scripts/../React/FBReactNativeSpec/FBReactNativeSpec && touch <absolute project path>/node_modules/react-native/scripts/../React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h <absolute project path>/node_modules/react-native/scripts/../React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm"
}

@martintreurnicht
Copy link

martintreurnicht commented Mar 18, 2021

I've created a patch file that seems to solve the problem, i might have missed something but it seems to be working great for me and builds are passing, i had a look at the generated code output too and it seems to all be there. Could be cleaned up a bit but the main issue with the current approach is that $PODS_TARGET_SRCROOT is not accessible from prepare_command so the logic will have to be split for script_phase and prepare_command, but the good news is that the working directory for prepare_command is that of the pod, so it's pretty safe to just assume the relative path for that.

diff --git a/node_modules/react-native/scripts/react_native_pods.rb b/node_modules/react-native/scripts/react_native_pods.rb
index 2a8affb..a807b2b 100644
--- a/node_modules/react-native/scripts/react_native_pods.rb
+++ b/node_modules/react-native/scripts/react_native_pods.rb
@@ -149,7 +149,7 @@ def use_react_native_codegen!(spec, options={})
   return if ENV['DISABLE_CODEGEN'] == '1'

   # The path to react-native (e.g. react_native_path)
-  prefix = options[:path] ||= File.join(__dir__, "..")
+  prefix = options[:path] ||= '$PODS_TARGET_SRCROOT/../../'

   # The path to JavaScript files
   srcs_dir = options[:srcs_dir] ||= File.join(prefix, "Libraries")
@@ -192,10 +192,12 @@ def use_react_native_codegen!(spec, options={})
     :name => 'Generate Specs',
     :input_files => [srcs_dir],
     :output_files => ["$(DERIVED_FILE_DIR)/codegen-#{codegen_modules_library_name}.log"].concat(generated_files),
-    :script => "set -o pipefail\n\nbash -l -c '#{env_vars} CODEGEN_MODULES_LIBRARY_NAME=#{codegen_modules_library_name} #{File.join(__dir__, "generate-specs.sh")}' 2>&1 | tee \"${SCRIPT_OUTPUT_FILE_0}\"",
+    :script => "set -o pipefail\n\nbash -l -c '#{env_vars} CODEGEN_MODULES_LIBRARY_NAME=#{codegen_modules_library_name} #{File.join("$PODS_TARGET_SRCROOT/../../scripts", "generate-specs.sh")}' 2>&1 | tee \"${SCRIPT_OUTPUT_FILE_0}\"",
     :execution_position => :before_compile,
     :show_env_vars_in_log => true
   }

-  spec.prepare_command = "#{mkdir_command} && touch #{generated_files.reduce() { |str, file| str + " " + file }}"
+
+
+  spec.prepare_command = "#{mkdir_command.sub prefix, '../../'} && touch #{generated_files.reduce() { |str, file| (str.sub prefix, '../../') + " " + (file.sub prefix, '../../') }}"
 end

now if you run pod ipc spec node_modules/react-native/React/FBReactNativeSpec/FBReactNativeSpec.podspec, you should see the following:

{
  "name": "FBReactNativeSpec",
  "version": "0.64.0",
  "summary": "-",
  "homepage": "https://reactnative.dev/",
  "license": "MIT",
  "authors": "Facebook, Inc. and its affiliates",
  "platforms": {
    "ios": "10.0"
  },
  "compiler_flags": "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32 -Wno-nullability-completeness",
  "source": {
    "git": "https://github.com/facebook/react-native.git",
    "tag": "v0.64.0"
  },
  "source_files": "**/*.{c,h,m,mm,cpp}",
  "header_dir": "FBReactNativeSpec",
  "pod_target_xcconfig": {
    "USE_HEADERMAP": "YES",
    "CLANG_CXX_LANGUAGE_STANDARD": "c++14",
    "HEADER_SEARCH_PATHS": "\"$(PODS_TARGET_SRCROOT)/React/FBReactNativeSpec\" \"$(PODS_ROOT)/RCT-Folly\""
  },
  "dependencies": {
    "RCT-Folly": [
      "2020.01.13.00"
    ],
    "RCTRequired": [
      "0.64.0"
    ],
    "RCTTypeSafety": [
      "0.64.0"
    ],
    "React-Core": [
      "0.64.0"
    ],
    "React-jsi": [
      "0.64.0"
    ],
    "ReactCommon/turbomodule/core": [
      "0.64.0"
    ]
  },
  "script_phases": {
    "name": "Generate Specs",
    "input_files": [
      "$PODS_TARGET_SRCROOT/../../Libraries"
    ],
    "output_files": [
      "$(DERIVED_FILE_DIR)/codegen-FBReactNativeSpec.log",
      "$PODS_TARGET_SRCROOT/../../React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h",
      "$PODS_TARGET_SRCROOT/../../React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm"
    ],
    "script": "set -o pipefail\n\nbash -l -c 'SRCS_DIR=$PODS_TARGET_SRCROOT/../../Libraries CODEGEN_MODULES_OUTPUT_DIR=$PODS_TARGET_SRCROOT/../../React/FBReactNativeSpec/FBReactNativeSpec CODEGEN_MODULES_LIBRARY_NAME=FBReactNativeSpec $PODS_TARGET_SRCROOT/../../scripts/generate-specs.sh' 2>&1 | tee \"${SCRIPT_OUTPUT_FILE_0}\"",
    "execution_position": "before_compile",
    "show_env_vars_in_log": true
  },
  "prepare_command": "mkdir -p ../../React/FBReactNativeSpec/FBReactNativeSpec && touch ../../React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h ../../React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm"
}

@thaapasa
Copy link

I have encountered this same problem and reported it here: #31193 (sorry, I did not find this issue report before). For me fixing the prefix in react_native_pods.rb works.

@chrisglein chrisglein added Platform: iOS iOS applications. and removed Needs: Attention Issues where the author has responded to feedback. Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. Needs: Issue Template This issue does not make use of the Issue Template, and may be missing necessary information. labels Apr 20, 2021
@habovh
Copy link
Contributor

habovh commented Jul 2, 2021

I'm encountering a a similar behaviour with glog and DoubleConversion. It seems their checksums also change when running pod install on a different machine. Both of these pods are also included in React Native, but are they all related to the FBReactNativeSpec? If not I can open a separate issue, but I thought it would make sense to mention it here anyway.

diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index a27ec70a8..8ff577408 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -673,7 +673,7 @@ SPEC CHECKSUMS:
   boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
   BVLinearGradient: 0d985ec461359c82bc254f26d11008bdae50d17a
   CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
-  DoubleConversion: cde416483dac037923206447da6e1454df403714
+  DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
   FBLazyVector: 7b423f9e248eae65987838148c36eec1dbfe0b53
   FBReactNativeSpec: 976b4f05ee6cfd75377064c69875f5dd09bb992d
   FBSDKCoreKit: 4afd6ff53d8133a433dbcda44451c9498f8c6ce4
@@ -686,7 +686,7 @@ SPEC CHECKSUMS:
   Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
   Flipper-RSocket: 127954abe8b162fcaf68d2134d34dc2bd7076154
   FlipperKit: 8a20b5c5fcf9436cac58551dc049867247f64b00
-  glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3
+  glog: 1f3da668190260b06b429bb211bfbee5cd790c28
   libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
   libwebp: 946cb3063cea9236285f7e9a8505d806d30e07f3
   OneSignal: fa98eaa90372bb367b6a4a1c1622ffb9832c7600

@mlazari
Copy link
Contributor

mlazari commented Jul 2, 2021

@habovh I use "react-native": "0.64.2" and only have this issue with FBReactNativeSpec.

The versions in Podfile.lock are:

- FBReactNativeSpec (0.64.2):

- DoubleConversion (1.1.6):

- glog (0.3.5)

@habovh
Copy link
Contributor

habovh commented Jul 2, 2021

@mlazari so my discrepancy probably comes from something else, I'll keep investigating. Thanks for making sure this issue was not related!

@sonicdoe
Copy link
Contributor

sonicdoe commented Jul 5, 2021

@habovh I’ve been seeing DoubleConversion and glog in my diffs as well, which seems to be due to stale pods in the Pods directory. Removing them (rm -rf ios/Pods/{DoubleConversion,glog}) and re-running pod install resolves that issue for me.

@habovh
Copy link
Contributor

habovh commented Jul 5, 2021

@sonicdoe I've come to the same conclusion. However I fixed it by running pod update glog and pod update DoubleConversion, which then fetches the podspec from the React Native node_modules directory! A bit quicker than removing the whole Pods folder :)

@gaberogan
Copy link
Contributor

@chrisglein What's the status on this?

Our team has been running into this issue, constantly ping-ponging Podfile.lock changes to each other. I realize users have submitted patch-package fixes but we would appreciate if these changes could actually be merged. Thanks

@chrisglein
Copy link

@chrisglein Chris Glein FTE What's the status on this?

No status drive by me - I've just been helping tag issues. I have no iOS expertise myself. But since there are a number of people hitting this let me see if I can flag the right folks to take a look.

@Shahaed
Copy link

Shahaed commented Aug 28, 2023

This specific issue should have been resolved with this commit: 751708d

The issue could be closed.

@matinzd
Copy link
Contributor

matinzd commented Nov 3, 2023

We've been scratching our heads for a while now, trying to figure out why our CI cache isn't cooperating. It appears that there's an inconsistency after installing pods on a different machine. Is this the only issue, or are there any specific pods that might be messing with the checksum stability?

@Reeywhaar
Copy link

Reeywhaar commented Nov 24, 2023

Has the same three packages: DoubleConversion, boost and glog which differ on m1 and intel procs

--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -1106,10 +1106,10 @@ SPEC CHECKSUMS:
   Amplitude: 10f20d4436fdcd38ddd5be1da7033fcc21f4143e
   amplitude-react-native: 6e5b9e38c53e11a86f62f874a42cf176e2b82c86
   AnalyticsConnector: a53214d38ae22734c6266106c0492b37832633a9
-  boost: a7c83b31436843459a1961bfd74b96033dc77234
+  boost: 57d2868c099736d80fcd648bf211b4431e51a558
   BVLinearGradient: 880f91a7854faff2df62518f0281afb1c60d49a3
   CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
-  DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
+  DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
   FBLazyVector: 5fbbff1d7734827299274638deb8ba3024f6c597
   FBReactNativeSpec: 638095fe8a01506634d77b260ef8a322019ac671
   Firebase: 414ad272f8d02dfbf12662a9d43f4bba9bec2a06
@@ -1132,7 +1132,7 @@ SPEC CHECKSUMS:
   Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
   FlipperKit: 2efad7007d6745a3f95e4034d547be637f89d3f6
   fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
-  glog: 5337263514dd6f09803962437687240c5dc39aa4
+  glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
   GoogleAppMeasurement: 70ce9aa438cff1cfb31ea3e660bcc67734cb716e
   GoogleDataTransport: 54dee9d48d14580407f8f5fbf2f496e92437a2f2
   GoogleUtilities: 0759d1a57ebb953965c2dfe0ba4c82e95ccc2e34

@mlazari
Copy link
Contributor

mlazari commented Nov 24, 2023

@Reeywhaar If you try to remove pod caches and reinstall pods on both computers, does it fix the issue?

mihai@Mihais-Mac-mini ios % rm -rf ~/Library/Caches/CocoaPods
mihai@Mihais-Mac-mini ios % rm -rf ~/.cocoapods
mihai@Mihais-Mac-mini ios % rm -rf Pods                              
mihai@Mihais-Mac-mini ios % pod install

@Reeywhaar
Copy link

Nope, no luck, tried updating said pods, install with repo-update, update with repo-update, cleaning cache with pod cache clean %podname% --all.

@Reeywhaar
Copy link

Reeywhaar commented Nov 24, 2023

I've also found someone in google with exact same hashes for boost, glog and DoubleConversion, which means it is not some per-machine hash:

https://gitlab.ow2.org/RocketChat/Rocket.Chat.ReactNative/-/blob/5e8e359fa8d9f48d9207c2256fff9524aa231e74/ios/Podfile.lock
https://github.com/callstack/react-native-pager-view/blob/master/example/ios/Podfile.lock

@mlazari
Copy link
Contributor

mlazari commented Nov 24, 2023

@Reeywhaar I have the same hashes as the green ones in your example on my Mac Mini with M1:

boost: 57d2868c099736d80fcd648bf211b4431e51a558
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b

@Reeywhaar
Copy link

Indeed! Updating pods on m1 resolved the issue. Now I have correct hashes (e.g 57d286 for boost). My problem was because I thought hashes on m1 were correct because I did install there last. @mlazari Thank you for the enlightenment!

@stianjensen
Copy link
Contributor

The general problem with glog, DoubleConversion etc. is simply that their podspecs are often updated without bumping the version number at the same time. The hashes in your podfile is a checksum of that package's podspec file, which cocoapods only expects to change when its version number changes. This confuses cocoapods, so you need to explicitly update these packages to be able to get the correct new hash when updating react-native.

In our project we just have a permanent list of some packages to always call update on when resolving new versions (just make sure to also not run this update command on CI, where you want to only install from your lockfile).


Our Makefile pod install target is basically this:

ifeq ($(CI), true)
  POD_INSTALL_ARGS := --deployment
endif

install:
  ifneq ($(CI),true)
      cd ios && bundle exec pod update glog RCT-Folly DoubleConversion boost hermes-engine
  endif
      cd ios && bundle exec pod install ${POD_INSTALL_ARGS}

@jnak
Copy link

jnak commented Dec 31, 2023

For those running into an issue with boost today, the jfrog mirror is currently down -> boostorg/boost#842

@danidaryaweesh
Copy link

@jnak I'm running into the issue today after upgrading cocoaPods to the latest version. So we only have to wait for them to fit? or what can we do, appreciate your help here.

@jnak
Copy link

jnak commented Dec 31, 2023

@danidaryaweesh If you have access to the filesystem , you can update the podspec file to point at Sourceforge

Screenshot 2023-12-31 at 2 34 36 PM

@sanduluca
Copy link

@danidaryaweesh If you have access to the filesystem , you can update the podspec file to point at Sourceforge

Screenshot 2023-12-31 at 2 34 36 PM

Where is the file ?

@danidaryaweesh
Copy link

@sanduluca If you have the node_modules installed, you should find it under this path: /node_modules/react-native/third-party-podspecs/boost.podspec

@jordiepasman
Copy link

jordiepasman commented Jan 17, 2024

Boost looks fixed I think with the new RN versions, but I currently have the following issue that seems related or similar to the error message.

I try to upgrade an app from 0.71.8 to 0.73.2, i get this issue. 😢
Maybe someone have any idea what causes this issue and if there is a way to solve it?

Tanks in advance!

Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
Verifying no changes
[!] There were changes to the lockfile in deployment mode:
SPEC CHECKSUMS:
  glog:
    New Lockfile: ..........
    Old Lockfile: ..........

@mlazari
Copy link
Contributor

mlazari commented Jan 18, 2024

@jordiepasman Did you try this #31121 (comment) ?

@storm2513
Copy link

I'm upgrading an app from 0.72.9 to 0.73.2 and also get glog checksum issue on CI:

[!] There were changes to the lockfile in deployment mode:
SPEC CHECKSUMS:
  glog:
    New Lockfile: 035f1e36e53b355cf70f6434d161b36e7d21fecd
    Old Lockfile: c5d68082e772fa1c511173d6b30a9de2c05a69a2

I've tried #31121 (comment), result is the same

@stianjensen
Copy link
Contributor

stianjensen commented Jan 19, 2024

I'm upgrading an app from 0.72.9 to 0.73.2 and also get glog checksum issue on CI:

You have to run pod update glog once locally before committing changes to your Pod lockfile. The reason is that react-native keeps changing the contents of the glog podspec file (which the checksum is computed from), without changing its version number at the same time. This confuses cocoapods.

Check the history here where you see that the contents of the podspec is changed, but there version number is not (not even for the next release of react-native):
https://github.com/facebook/react-native/commits/fd0ca4dd6209d79ac8c93dbffac2e3dca1caeadc/packages/react-native/third-party-podspecs/glog.podspec

By explicitly calling pod update glog (or bundle exec pod update glog if you don't have a global cocoapods install), you're forcing it to 'pull the latest version' (only from your node_modules though, so you do get the version you want anyway). This way you should get the same version as a fresh box on your CI, instead of a stale version from your local cache (which cocoapods thinks is valid since they have the same version number).

@storm2513
Copy link

Running pod update glog (and bundle exec pod repo update) doesn't lead to changes to Podfile.lock, glog checksum stays the same.

Using Xcode 14.3.1 instead of Xcode 14.2 on CI helped though.

@mlazari
Copy link
Contributor

mlazari commented Jan 19, 2024

@storm2513 I think the checksum in your Podfile.lock file is correct, I have the same one in my projects (glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2), that's why it doesn't changes. Probably it was some caching issue on CI.

@stianjensen
Copy link
Contributor

Using Xcode 14.3.1 instead of Xcode 14.2 on CI helped though.

Tracked down the reason why you get different checksums for glogdepending on Xcode version if you use a mix of pre-14.3 and newer versions:

is_greater_than_14_3 = major_version == 14 && minor_version >= 3
should_define_modules = is_greater_than_15 ? "YES" : is_greater_than_14_3 ? "YES" : "NO"

These lines cause DEFINES_MODULE to flip between YES and NO in the generated podspec, which results in different checksums for the file.

I don't think cocoapods has a good general answer to having lockfiles shared between Xcode versions (at least not with the level of dynamic code in podspec files that react-native – necessarily – uses).

@react-native-bot
Copy link
Collaborator

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@react-native-bot react-native-bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 2, 2024
@react-native-bot
Copy link
Collaborator

This issue was closed because it has been stalled for 7 days with no activity.

@react-native-bot react-native-bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 9, 2024
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. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests