question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Diff in Podfile.lock when runs in different machines

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:58
  • Comments:34 (13 by maintainers)

github_iconTop GitHub Comments

16reactions
habovhcommented, 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
12reactions
habovhcommented, 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 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Unexpected Podfile.lock Diffs After Pod Install
What is happening is that your machine is downloading public pods in a different way than your colleague's machine.
Read more >
Why does my team's Podfile.lock Podspec checksums change?
podspec.json inside your local Pods folder, when the next person runs pod install with your changes merged, they get a different SHA, as...
Read more >
Why should you include Podfile.lock under version control?
If not you get an error, telling you that you need to update pods on your machine. It of course makes sense for...
Read more >
pod install vs. pod update - CocoaPods Guides
Every time the pod install command is run — and downloads and install new pods — it writes the version it has installed,...
Read more >
Run CocoaPods install - Integrations
CocoaPods version is determined based on the Podfile.lock file or on the Gemfile.lock file. If your Gemfile.lock file contains the cocoapods gem, then...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found