After updating to 0.34.2
, the "Check Pods Manifest.lock" fails with the following error:
diff: /../Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
Enabling the "Show environment variables in build log" option for this build script reveals a difference. When using 0.34.1
, I see export PODS_ROOT=/Users/matt/MyProject/Pods
in the build log, but the PODS_ROOT
variable is clearly absent when using 0.34.2
.
I know that PODS_ROOT
is deprecated as of 0.34
, but if it's no longer available then the CocoaPods-generated build script should be fixed to work without it.
This is indeed a bug that we thought we fixed in 0.34.2
. Do you get any errors or warnings when running pod install
?
No warnings, just the usual output:
$ pod install
Analyzing dependencies
Downloading dependencies
Using ... (...)
Generating Pods project
Integrating client project
Uninstalling 0.34.2
and reverting to 0.34.1
fixes the problem.
I have this issue too. If I remove Pods/ and Podfile.lock, after run "pod install", then all work without problems. But if I run "pod update" or "pod install" where Podfile.lock exists, then I have this issue in compile time
@mattrubin @virasio Can either of you please look into what the actual issue is? I.e. inspect the shell script phase that’s added to your application target and see if the paths are incorrect etc.
@alloy I have error from script:
#!/bin/sh
diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
if [[ $? != 0 ]] ; then
cat << EOM
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
EOM
exit 1
fi
How I see variable ${PODS_ROOT}
is not defined (witch must be defined in files Pods-MyProject.{release|debug}.xcconfig) because Xcode can't found this files. I have warning: The file "Pods-MyProject.debug.xcconfig" couldn’t be opened because its path couldn't be resolved. It may be missing.
but xcconfig-file exists.
I use Xcode 6.
@alloy I investigated all files, and I not found diffs. I tried to launch Xcode, open workspace, run build, run pod install
in the console, relaunch Xcode, clean project and build project. It is work.
Conclusion: don't run pod install
while project opened in the Xcode 6.
You can close issue, IMHO.
@virasio Huh, that’s weird. We’ll keep an eye out for more reports of the likes. Thanks for the update!
I’ll await @mattrubin’s feedback before closing.
@alloy: @virasio is correct: running pod install
with the project closed works fine, while running it with the project open clearly puts Xcode it a bad state for building. Fortunately, just closing, reopening, and rebuilding the project seems to fix the problem.
I'd gotten so accustomed to running pod install
with Xcode open that I never thought to check that. Thanks for the help, all!
An additional note: while I noticed this issue when upgrading to 0.34.2
, it is not simply an issue with transitioning to the new version. Any subsequent run of pod install
when my project is open puts it back in the bad state, even if nothing else has changed.
Same happend to me on 0.34.2 now my project is stuck. The sequence of restarting and updating is not fixing it.
@mdikov
1) close Xcode
2) Console:
rm -rf Pods/ Podfile.lock
pod install
3) Open project in Xcode
4) Menu: Product -> Clean
5) Build or Run project.
If it is not work, then you have same other issue. Or are you have warning about file "Pods-MyProject.debug.xcconfig" too?
@mattrubin @virasio If you still have Xcode 5 around, can you verify if it still works as it always did in the past? If it does then it’s clearly an Xcode 6 thing, otherwise we might have regressed and should look into fixing it, because I can definitely see this being tedious.
I can confirm this as a 0.34.2 regression. Using 0.34.1, I can safely run pod install
with an open project and build without relaunching Xcode.
The issue boils down to this commit 87d622c3. My theory is that Xcode doesn't like that the XCConfigs are rewritten, but not the project file.
Reverted back to the previous version and all works fine.
Sent from a mobile phone
On Oct 10, 2014, at 12:45 AM, Victor Surikov [email protected] wrote:
@mdikov
1) close Xcode
2) Console:rm -rf Pods/ Podfile.lock
pod install
3) Open project in Xcode
4) Menu: Product -> Clean
5) Build or Run project.
If it is not work, then you have same other issue. Or are you have warning about file "Pods-MyProject.debug.xcconfig" too?—
Reply to this email directly or view it on GitHub.
We save the project when the configs are actually written.
-Samuel E. Giddins
On Oct 10, 2014, at 3:11 AM, Boris Bügling [email protected] wrote:
The issue boils down to this commit 87d622c. My theory is that Xcode doesn't like that the XCConfigs are rewritten, but not the project file.
—
Reply to this email directly or view it on GitHub.=
@segiddins do we write anything in case of pod install
without real changes?
We shouldn't be.
-Samuel E. Giddins
On Oct 10, 2014, at 8:27 AM, Boris Bügling [email protected] wrote:
@segiddins do we write anything in case of pod install without real changes?
—
Reply to this email directly or view it on GitHub.=
Turns out we actually rewrite everything all the time: https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/sandbox.rb#L93-L94
If we don't rewrite the XCConfigs, we can indeed avoid saving the Xcode project and still not trigger this issue.
IMHO, we should revert 87d622c35 for now. We can rely on xcproj or CocoaPods/Xcodeproj#203 to ensure the project file doesn't get changed unnecessarily. If we think it makes sense, we can then actually work on CP not rewriting files which do not need to be rewritten in a future release.
pod install
Is the only flow that fixed it for me.
I downgraded to 0.34.1
but I still get the issue - I don't seem to be able to find a workaround at all :-(
@virasio thx, a lot, it's works good for me :+1:
Hi all,
I got the issue same as Matt Rubin with pod -v 0.34.2. I followed @virasio's instructions but still get this issue
Any idea to help?
Thanks
Following the steps suggested by @virasio (https://github.com/CocoaPods/CocoaPods/issues/2627#issuecomment-58622743) I was able to fix the problem. I am using Xcode 6.0.1 (6A317). It is probably true that updating projects while Xcode is open messes up with the Pods project.
I'm also seeing this on 0.34.2. If I run pod install while xcode is open, I receive multiple warnings that: The file "Pods-MyProject.debug.xcconfig" couldn’t be opened because its path couldn't be resolved. It may be missing. Also, I get multiple errors that Podfile is out of sync when I run the project.
If I run pod install while xcode is closed, no issues/warnings.
Reverting back to 0.34.1 has no issues for me.
:+1: Thanks, @kylef!
Hey all, I've pushed a new version of Xcodeproj which contains all these fixes.
Can you please verify that this works, it can be installed with the following:
$ gem install xcodeproj
Thanks!
Actually, sorry for confusion. The full fix isn't in Xcodeproj, since there is also changes inside CocoaPods itself to fix the issue. Installing the updated Xcodeproj may not fix the issue*.
Hi all. I'm have the same issue.
My config: Xcodeproj 0.19.4, cocoapods 0.34.2, XCode 6.0.1, OS X Mavericks.
I'm archive "...Prod" target and get error: "...Pods/Pods-resources.sh: No such file or directory"
I'm try @virasio fix, it did not help me.
What else can I try to fix this error? I do not want to downgrade cocoapods.
@lexusilia The following should let you run CocoaPods from master which contains a fix:
$ gem install specific_install
$ gem specific_install https://github.com/CocoaPods/CocoaPods
That, or you should be able to simply restart Xcode after running pod install/update
and it should work.
@kylef i did what you said.
Install CocoaPods with "fix", clear project in XCode, close XCode, run pod install, open workspace and get the same issue:
I'm archive "...Prod" target and get error: "...Pods/Pods-resources.sh: No such file or directory"
@lexusilia Can you upload an example project demonstrating this issue?
@kylef No, sorry, NDA rules. I think we should wait for what others will say.
I had a project using 0.33.1 then updated to 0.34.2 and I had the same issue. Then downgraded to 0.34.1 and the issue still remains. I did what @virasio said and it still fails. It only works with 0.33.1. My project was an example open source project I use to teach junior programmer some objc/design concepts. You can check it out here https://github.com/Wolox/collection-view-example/tree/upgrade-cocoapods. I pushed a branch called upgrade-cocoapods
where I was testing this.
Can confirm that the xcconfig
s are never added to the user project there.
@segiddins I also tried with last commit of cocoapods and it did not work? Any idea how to "fix" this?
@guidomb with the latest CocoaPods bits from master
, I was able to get everything working by deleting the Pods
group from CollectionViewExample.xcodeproj
sorry guys I know I am late to this thread, I have the same issue - Using Xcode 5 and cocoa pods 0.34.1
Please suggest.
@segiddins Thanks, that did work. I guess we have to wait for version 0.34.3
Still experiencing this issue with cocoapods 0.34.4
, Xcode 6.1
, and OS X 10.10
.
Me too. To be honest I can't fix it with any idea posted here.
I have managed to fix it according to the instructions above, with 0.34.4
installed:
rm -rf Pods/ Podfile.lock
xcodeproj
from Terminal gem install xcodeproj
0.34.4
from Terminal gem install cocoapods
(might require sudo
)Podfile
with lines specifying project and targets:source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
xcodeproj 'ProjectName'
link_with 'Target A', 'Target B', 'Target C'
pod install
This fixed the issue for me.
Deleting the lock file is almost certainly unnecessary.
-Samuel E. Giddins
On Oct 21, 2014, at 10:50 AM, Henrik Söderqvist [email protected] wrote:
I have managed to fix it according to the instructions above, with 0.34.4 installed:
Exit Xcode
Remove Pods directory and Podfile.lock file from Terminal rm -rf Pods/ Podfile.lock
Install updated version of xcodeprojfrom Terminal gem install xcodeproj
Install CocoaPods 0.34.4 from Terminal gem install cocoapods (might require sudo)
Update Podfilewith lines specifying project and targets:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
xcodeproj 'ProjectName'
link_with 'Target A', 'Target B', 'Target C'
Install depencies from Terminal pod install
Now open workspace in Xcode again
This fixed the issue for me.
—
Reply to this email directly or view it on GitHub.=
mtlhd - Thanks, you solved my problem. Your instructions were great. None of the other solutions worked for me.
No problem ronbarr, I just tried everything i could find in this thread and finally I got it working. I might add that I had a quite old Podfile to start with and my first attempt wasn't adding the lines with project and targets, but then I noticed that PODS_ROOT was not present in Target B
and Target C
, only in Target A
so I figured that there was something missing related to the xcconfig files in the Pods group.
None of these helps. Still the same problem. Despite having "PODS_ROOT" defined in each target, it's still empty string.
Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
xcodeproj 'OSMapFinder.xcodeproj'
inhibit_all_warnings!
pod 'BlocksKit'
pod 'JASidePanels'
pod 'Bolts'
pod 'MagicalRecord/Shorthand', :inhibit_warnings => true
pod 'KCOrderedAccessorFix'
pod 'libextobjc'
pod 'AFNetworking', '~> 2.0'
pod 'LLACircularProgressView', '~> 0.1.1'
pod 'FXReachability'
pod 'Block-KVO'
pod 'FMDB'
pod 'MRProgress', '~> 0.2'
pod 'MMProgressHUD', '~> 0.2.2'
pod 'MBProgressHUD', '~> 0.8'
pod 'SVProgressHUD', :head
pod 'iCarousel'
pod 'AXRatingView', '~> 0.9.7'
target :XXX, :exclusive=>true do
pod 'OCMock', '~> 2.2'
end
link_with 'XXX’,’XXX', 'XXX', 'XXX', 'XXX'
Still getting this error and I've tried everythign above.
diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
if [[ $? != 0 ]] ; then
cat << EOM
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
EOM
exit 1
fi
Sadly I've wasted 1 hour trying all the aforementioned "solutions" without success…
I'm using 0.34.4
of CocoaPods
and
Version 6.1 (6A1052d)
of Xcode
Can't make this work
In my project, I have three targets, one for distribution, one for in house, and one for developemnt.
I have tried rm all things, updated my Profile and pod install. Very weird, the distribution target is ok now, however, the other two still have PODS_ROOT empty issue.
I am using CocoaPods 0.34.4 and Xcode 6.1
:exclamation: To anyone that’s still reporting this issue, please provide an example project that exhibits the issue. It should be a project that we can just download and build with Xcode without the need for any other work to be done (including pod install
).
This got things working again for me
http://stackoverflow.com/questions/17072396/cocoapods-errors-on-project-build
Is it possible that this issue has something to do with Synx? I've had this bug twice now over the past month after using synx on my project. If I run synx, and then pod install, I notice that the xcconfigs in Project -> Info won't be updated, and PODS_ROOT won't be added to my targets. Maybe this can help you guys find the root of the issue :)
I have to confirm @johndpope 's solution works. Thank you.
PODS_ROOT is specified in each targets xcconfig but i still had the same error.
Anyway, By following the proposal by @johndpope, (Add a user defined setting for PODS_ROOT) it seems to work for me too!
Thanks!
I tried all the methods above and only @mtlhd's solution worked. I only needed to do the last step, which is specifying the project & targets. Of course pod install
after that.
I have the same issue but nothing worked.
Run Custom Shell Script: .... Pods/Pods-resources.sh: No such file or directory
If I downgraded It triggered other bugs, so I tried to make it work on 0.35
The script is not found because it is looking for in the "${SRCROOT}/Pods/Pods-resources.sh" but it is actually in "${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh"
When I manually changed the Target > Build Phases > Copy Pod Resources to "${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh" it worked fine.
I tried a few hacks and eventually got it to work.
1 - Ensure Podfile has sources
2 - In your app targets Build Phases->Check Pods Manifest
Use SRCROOT
rather than PODS_ROOT
3 - In your app targets Build Phases->Copy Pods Resources
, ensure it's Target Support Files
4 - I also noticed my Other Linker Flags were set on my target. I had to clear those and then do a Pod Install.
I have been bothered by this issue for one day, and tried all the methods above with no luck. Everytime I ran pod install
, there will be two red item xcconfig
files created in 'Podsgroup of the project, and the
Configuration Set` of the project will be set to that red item which is not existed.
After digging around, finally the fix is, highlight the Pods
of the project in project navigator (Not the Pods project itself), and spot the Full Path
at right information bar, it should ends with project directory instead of Pods
.
I simply do following:
Pods
group from the projectNone
pod install
Then it's fixed for me. Just FYI.
I had this issue, and it was because I hadn't used in my Podfile
link_with 'xxxx', 'xxxx'
for my extra targets. Once I added those and did a new pod install, I was all good
I keep getting this and none of the fixes mentioned is working for me
CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target xxxxxxx
to Pods/Target Support Files/Pods-default/Pods-default.test iphone.xcconfig
or include the Pods/Target Support Files/Pods-default/Pods-default.test iphone.xcconfig
in your build configuration.
Do I have to worry about the warnings ??
@SunnyGit yes, if you use your own custom XCConfig, CocoaPods integration cannot function, as stated in the warning.
link_with 'Target A', 'Target B', 'Target C'
was the magic line for me. Just add every target from your project.
I'm running cocoa pods 0.35.0, Xcode 6.1.1, and just like @ogezue said, adding link_with 'Target x' to my podfile and running pod install
did the trick.
hi im using CocoaPods 0.39.0.beta.4 is available. getting the above error
using xcode 6.4
can any one help me please
Make sure you have all of your target included in the Podfile somehow.
I had this problem and was because since last update I had moved pod dependencies to the test target only and with the _exclusive_ clause. This caused the Pods.debug.config and the Pods.release.config not to be generated.
I have come across this issue on 0.39.0 when using the link_with
directive. Switching to adding pods to each target separately fixed it:
target 'Target' do
pod 'MyPod'
end
target 'OtherTarget' do
pod 'MyPod'
end
That cocoapods-deintegrate tool worked for me. Thanks jurijstur!
Most helpful comment
This got things working again for me
http://stackoverflow.com/questions/17072396/cocoapods-errors-on-project-build