We have a project which uses a development pod. Since we updated to cocoapods version 1.6.1 the following PhaseScriptExecution error occured:
/Users/.../Library/Developer/Xcode/DerivedData/<project>-btkioiepgjiygbdoirfuymqlkurk/Build/Intermediates.noindex/<project>.build/Debug-iphonesimulator/<target>.build/Script-962734B0374980AA4BB6EC824561B7D4.sh: line 2: <path to project>/Pods/Target Support Files/Pods-<target>/Pods-<target>-resources.sh: No such file or directory
We updated from cocoapods 1.5.3 to cocoapods 1.6.1 and everything seems to be ok locally, but our build server showed the error above. I can reproduce the issue as soon as I delete the pods directory (no files from old version are available anymore) and execute bundle exec pod install. It seems that cocoapods 1.5.3 creates the resources.sh file, but cocoapods 1.6.1 doesn't.
The problem exists with cocoapods version 1.6.0.beta.1, too. Maybe it has something to do with the release note _Don't generate framework or resource scripts if they will not be used._
pod 'devpod', path: '../'bundle installbundle exec pod installAll pods including generated scripts are installed successfully.
Build error during PhaseScriptExecution [CP]\ Copy\ Pods\ Ressource: The resources.sh file is missing.
bundle exec pod env | pbcopy
CocoaPods : 1.6.1
Ruby : ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin17]
RubyGems : 3.0.3
Host : Mac OS X 10.14.4 (18E226)
Xcode : 10.2 (10E125)
Git : git version 2.20.1 (Apple Git-117)
Ruby lib dir : /Users/<user>/.rbenv/versions/2.3.1/lib
Repositories : <internal>
Executable Path: /Users/<user>/.rbenv/versions/2.3.1/bin/pod
cocoapods-deintegrate : 1.0.4
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.1.0
cocoapods-trunk : 1.3.1
cocoapods-try : 1.1.0
```ruby
source '
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
inhibit_all_warnings!
target '
pod '
target '
use_frameworks!
inherit! :search_paths
platform :ios, '10.0'
pod 'Nimble', '8.0.1'
pod 'Quick', '2.0.0'
pod 'OHHTTPStubs/Swift', '6.1.0'
pod 'MockUIAlertController', '3.2.0'
end
end
````
Please provide a sample app. We are unable to diagnose with given information and the script phase works.
The problem is solved: the old cocoapods version 1.5.3 generated the resources.sh file and added the [CP] Copy Pods Ressources build phase to the Xcode project. After cocoapods version update (to 1.6.1) the resources.sh file is not generated anymore (for our project), but the [CP] Copy Pods Ressources build phase still remains in the project.
Solution:
I deleted the [CP] Copy Pods Ressources build phase manually from the the project. bundle exec pod install doesn't add the [CP] Copy Pods Ressources build phase again, so this solution is fine for us.
ah...that is a bug then a minor one but a bug nonetheless.
Maybe not very minor? Currently seeing a similar issue in our CI process as part of linting static libraries. What's strange is that it seems to be pretty inconsistent. This may also be an issue with Travis CI as I haven't been able to reproduce this locally.
Here's a link to a failing job. The output is: https://travis-ci.org/facebook/facebook-ios-sdk/jobs/640198778?utm_medium=notification&utm_source=github_status
- NOTE | [iOS] xcodebuild: warning:
- NOTE | [iOS] xcodebuild: note:
- ERROR | [iOS] [FBSDKCoreKit/Core] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
- NOTE | [iOS] [FBSDKCoreKit/Core] xcodebuild: rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-52.200.1/rsync/rsync.c(244) [sender=2.6.9]
- NOTE | [iOS] [FBSDKCoreKit/Core] xcodebuild: /privateTarget Support Files/Pods-App/Pods-App-resources.sh:107: error: Unexpected failure
@joesus that issue looks unrelated, since the file exists in that case (note the line number in FBSDKCoreKit/Core] xcodebuild: /privateTarget Support Files/Pods-App/Pods-App-resources.sh:107: error: Unexpected failure)
If you are experiencing a bug a new issue would be greatly appreciated 馃檹
@joesus I'm getting a similar issue right now. Have you solved this?
I also facing this issue , have anyone resolved it yet?
This issue is still open, but this comment provided some steps for a potential workaround if this is affecting you.
The problem is solved: the old cocoapods version 1.5.3 generated the resources.sh file and added the
[CP] Copy Pods Ressourcesbuild phase to the Xcode project. After cocoapods version update (to 1.6.1) the resources.sh file is not generated anymore (for our project), but the[CP] Copy Pods Ressourcesbuild phase still remains in the project.Solution:
I deleted the[CP] Copy Pods Ressourcesbuild phase manually from the the project.bundle exec pod installdoesn't add the[CP] Copy Pods Ressourcesbuild phase again, so this solution is fine for us.
Hey @VirtualFox0 can you please give more details on how to find this file? I've been trying to find it but I can't.
Thanks you so much
The problem is solved: the old cocoapods version 1.5.3 generated the resources.sh file and added the
[CP] Copy Pods Ressourcesbuild phase to the Xcode project. After cocoapods version update (to 1.6.1) the resources.sh file is not generated anymore (for our project), but the[CP] Copy Pods Ressourcesbuild phase still remains in the project.
Solution:
I deleted the[CP] Copy Pods Ressourcesbuild phase manually from the the project.bundle exec pod installdoesn't add the[CP] Copy Pods Ressourcesbuild phase again, so this solution is fine for us.Hey @VirtualFox0 can you please give more details on how to find this file? I've been trying to find it but I can't.
Thanks you so much
I deleted the [CP] Copy Pods Ressources build phase manually from the the project.
This step was generated by Cocoapods, but the script doesn't exist anymore.
You can find this step in your Xcode project in tab Build Phases. Delete this step and it should be fine.
This seems to be an issue with dependencies introduced in CocoaPods 1.10.
When the project references a Pod with its own Asset Catalog, and that library is NOT named Assets.xcassets (let's say, Images.xcassets), the compilation phase always produces Assets.car.
With a clean install of CocoaPods 1.9.x, the generated Copy Resources script attempts to copy the entire source Asset Catalog file by file; when upgrades to CocoaPods 1.10.x, pod install again changes the Copy Resources script to copy the compiled Images.car, which cannot be found as expected (because the compiled version was named Assets.car).
Downgrading CocoaPods alone does not revert to the old behavior, which makes me think one of the dependencies must be downgraded as well. I did gem uninstall -aIx (WARNING: This uninstalls all Gems!) and then gem install cocoapods -v 1.9.1 to reinstall CocoaPods to solve it.
Edit: I'm not saying this is a solution or fix, but it does work. CocoaPods needs to rethink about how it deals with Asset Catalog from Pods; if copying the compiled version is indeed the new direction, it should make sure it gets the naming correct.
Most helpful comment
The problem is solved: the old cocoapods version 1.5.3 generated the resources.sh file and added the
[CP] Copy Pods Ressourcesbuild phase to the Xcode project. After cocoapods version update (to 1.6.1) the resources.sh file is not generated anymore (for our project), but the[CP] Copy Pods Ressourcesbuild phase still remains in the project.Solution:
I deleted the
[CP] Copy Pods Ressourcesbuild phase manually from the the project.bundle exec pod installdoesn't add the[CP] Copy Pods Ressourcesbuild phase again, so this solution is fine for us.