Version control woes.
When I pulled my project onto another machine it refused to compile - giving error
Multiple commands produce '/Users/.../Build/Products/Debug-iphonesimulator/cocoapods-artifacts-Debug.txt':
1) That command depends on command in Target '____' (project '____'): script phase “[CP] Prepare Artifacts”
2) That command depends on command in Target '___UITests' (project '_____'): script phase “[CP] Prepare Artifacts”
And it was deeply annoying and frustrating.
So the fix was as follows:
I had used pod update when I should have used pod install (or possibly vice versa. I am trying to be a good citizen recording notes - but I don't want to break my project again to recreate the steps!).
I also reinstalled cocoapods on my backup machine this may or may not have been part of the fix.
Related
I have a couple bash scripts to automate the setup process for a new devices e.g. installing packages, configuring environment variables, etc.
I'm working on making the process more automated with autoexpect, and adding a few thing other things; however, it's difficult to test since every time I run the install script I have to manually go back an undo the changes that were made from running the script. Is there a way to run the scripts without actually installing anything so I can observe the behaviour for testing? something like the --dry-run option with rsync
for configuring your machine and being able to test this quickly and knowing you won't cause problems to your PC locally, create a VM using Virtual box or VMwWare player and then snapshot the VM so you can revert back to the state before you run the script, and then you can run your script on this VM, and check what configuration has been applied successfully.
I installed Xcode 10 Beta 6 and I am updating everything and in this process I have run into a small issue with Fabric. Fabric's website has special instructions for Xcode 10 that says:
When I am in Xcode 10 I go to Build Phases an on the Run Script that has my Fabric key there is a + sign under the section Input Fields
When I click the + it automatically generates $(SRCROOT)/newInputFile where newInputFile is automatically highlighted.
I'm not understanding Fabric's instructions. Do I copy the $(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH) after $(SRCROOT)/ Do I replace INFOPLIST_PATH with the file path to my info.plist?
I've tried all these options but Fabric is still crashing in Xcode 10. I know it is Fabric because I've commented out Fabric.with([Crashlytics.self]) in my App Delegate's didFinishLaunchingWithOptions
For Xcode 10 only, user's who face issue in final setup of fabric is your project.
From Xcode 10 you need to make one more setup in Build Phase's Input Files field.
Simply You need to copy this $(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH) and paste to Build Phase's Input Files field under Run Script as display in below image.
Read more on this link : https://fabric.io/kits/ios/crashlytics/install
I had same problem, if your info.plist is in your root directory like this:
yo should change $(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH) like this:
I did exactly what was recommend by Mahdi RB. Also followed the steps on official manual guide, didn't work.
When I build using XCode I see it processes about 2k tasks. The fabric builds usually works when I start the machine, open xcode and execute archive. After that the build starts to break most of the time. I'm using the latest fabric & crashlytics downloaded on 03/OCT/18. It's really weird as it works for my other projects, it's just this one that fails. This started with XCode 10 - Version 10.0 (10A255). It was working with previous XCode 9.
This is some proof of what I'm talking:
My workaround was to add this command before calling the fabric command. E.g
sleep 15
"${PROJECT_DIR}/Fabric.framework/run" aaaaa aaaa
I noticed on my mac console app loads of this error, not sure if it's related:
IBAgent-iOS - assertion failed - libxpc.dylib - and some numbers here.
Error on XCode
2018-10-03 13:53:58.698 uploadDSYM[46168:550157] Fabric.framework/run 1.7.2 (210)
2018-10-03 13:53:58.704 uploadDSYM[46168:550157] Using API Key: "123"
2018-10-03 13:53:58.704 uploadDSYM[46168:550157] Launched uploader in validation mode
error: Fabric: Info.plist Error
Unable to process Info.plist at path /Users/someuser/Library/Developer/Xcode/DerivedData/SampleApp-amwweapikvrbgafmmnyeyorkiufq/Build/Intermediates.noindex/ArchiveIntermediates/SampleApp/BuildProductsPath/Release-iphoneos/SampleApp.app/Info.plist
This could be a timing issue, make sure the Fabric run script build phase is the last build phase and no other scripts have moved Inspector.app from the location Xcode generated it. You can also add '$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)' as an "Input Files" dependency for your Fabric run script build phase.
I tried to open that plist link, it points to a shortcut, and that shortcut points to a real file. Not sure why that is failing. My guess it has something to do with files not being present at the time the script is executed. The delay fixes the issue. I hope this can help.
I removed the original app names for privacy.
fabric info.plist error can be solved by changing the Xcode workspace settings-->build settings--> legacy build system
Go into Build settings of the your target. Find "Debug Information Format". Set this from "DWARF" in both debug and release to "DWARF with dSYM File"
source
I solved this issue by moving the "Run Script" to the bottom of the build phases. Of course I changed to "DWARF with dSYM File" and $(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH).
Add script run phase at end of build phases.
Set Shell for script phase to /bin/bash.
Set input files to:
(1) $(PROJECT_DIR)/$(INFOPLIST_FILE).
(2) $(PROJECT_DIR)/Scripts/set_bundle_build_number.sh
Change path to path of script so changes you make to the script
cause a re-run.
(3) $(TARGET_BUILD_DIR)/$(INFOPLIST_PATH)
Fixes XCode 10 issues of duplicate output phases.
Check image for more reference
The solution for me was to replace the round brackets with curly brackets like this
${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}
You can check if the path actually exists if you call echo $(BUILT_PRODUCTS_DIR) in the script phase. Using round brackets gave me following info in the Xcode build console "BUILT_PRODUCTS_DIR: command not found"
Replacing the round brackets with curly brackets will print the actuall path and therefore the script finally worked for me.
None of the above works for me. If someone using Cocoapods, do these steps.
Add $(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH) to Input Files on Run Script section.
Replace ./Fabric.framework/run to "${PODS_ROOT}/Fabric/run" in Run Script box.
Go to Build Settings, search for Debug Information, Change it to DWARF with dSYM File.
It worked for me, at least.
For me changing the build system to "Legacy Build system" fixed the archiving error.
To change the build system go to File -> Workspace Settings, and change the build system from default "New Build system" to "Legacy Build system".
I am using the Jenkins Azure VM Agents Plugin with a Linux Master, to launch jobs on Windows agents.
I have been through all the configuration steps and everything works fine until I try to use Docker on the agents.
My pipeline script:
pipeline {
agent {
docker {
image 'myurl.io/myimage:latest'
registryUrl 'https://myurl.io/'
registryCredentialsId '123456789abcdefg'
}
}
The pipeline appears to fails on when it runs this command:
docker pull myurl.io/myimage:latest
The error reported comes down to this:
Caused: java.io.IOException: Cannot run program "nohup" (in directory "C:\Jenkins\workspace\Test Pipeline Docker"): CreateProcess error=2, The system cannot find the file specified
Some notes:
I have ticked the box to install git on the image:
The Git tools appear to be successfully installed on the agent VM
This question seems to be related but is it not exactly the same
I am not running the sh command directly, it is being run by the plugin.
I do not think I have access to set the PATH at this stage
This issue on JIRA https://issues.jenkins-ci.org/browse/JENKINS-36776 is related, but it does not seems to be fixed and the suggested workarounds don't seem to apply to my situation
My question
Is there a way to get my pipeline script to work? Maybe there are some extra commands I can somehow execute on the agent after it launches - but before the docker pull command - to add the required directories to the PATH?
Or is there some other workaround?
I think you were on the right track with the question you already found:
Jenkins pipeline sh fail with "cannot run program nohup" on windows
But, according to the wiki page of the docker-pipeline plugin, running docker on windows workers is not supported (a bit hidden though...):
For Jenkins environments which have macOS, Windows, or other agents, which are unable to run the Docker daemon, this default setting may be problematic. [https://www.jenkins.io/doc/book/pipeline/docker/#specifying-a-docker-label]
As far as I can see, there were several tries to add that feature, but it doesn't seem to be added (yet): https://github.com/jenkinsci/docker-workflow-plugin/pull/148
In the last link it is also stated, that fixing the sh/nohup issue will not be your only problem, for example the docker plugin will try to run id to get the user.
Nevertheless, you could try to make linux commands available by editing the path in your pipeline declaration:
https://stackoverflow.com/a/45101214/12338776
EDIT:
Just saw this question is 3 years old... Well. But since there was no answer so far, and a lot of people still seem to get here, it might still help someone.
Trying to incorporate Continuous Integration into my Xcode builds.
I have setup OS X Server on my MacBook and everything seems to work fine except for the actual submit/upload script for Crashlytics.
I am getting this error in the 'Trigger' log:
/var/folders/1d/5y5tn0hd1qj01wbxgd3sxrs4000086/T/EFFB7FF5-CFF5-41CF-8AEB-D8813069D831-16127-000004A29A1D79A7: line 2: /Crashlytics.framework/submit: No such file or directory
Couple things to note:
I am able to manually archive/distribute my builds through Crashlytics without any problems.
Crashlytics is installed via PODS and my Run Script looks like this (with my real keys obviously):
${PODS_ROOT}/Crashlytics.framework/submit MYAPIKEY MYCLIENTKEY -emails myEmail#myEmail.com -notesPath ~/Notes/ReleaseNotes.txt -groupAliases myGroupAlias -notifications YES
${PODS_ROOT} is not available to the post trigger action.
You should use
${XCS_SOURCE_DIR}/*RepoName*/Pods/Crashlytics/Crashlytics.framework/submit etc
Where *RepoName* is the name of your repo. Sadly, I haven't been able to find a env variable for it or something.
I'm new to Mesos. I would like to know how do I know whether Mesos master is set up correctly in the node?
I have follow the set up given by http://mesos.apache.org/gettingstarted/
I am unable to run the following command:
Comment: Start mesos master (Ensure work directory exists and has proper permissions).
$ ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos
but it shown error given:
./bin/mesos-master.sh: line 24: /home/user/mesos-0.20.0/build/src/mesos-master: No such file or directory
What ways should I proceed?
First, a few questions to help us debug your build:
Did the mesos build (make) complete successfully, and did make check pass all the tests?
If /home/user/mesos-0.20.0/build/src/mesos-master does exist, do you have execute permissions on it?
Are you running ./bin/mesos-master.sh from within /home/user/mesos-0.20.0/build/, or did you move the directory elsewhere?
If this is your first attempt at Mesos and you just want to run it and try it out (rather than fix bugs and develop features for it). I would recommend using a pre-built or cloud-deployed version of Mesos, rather than trying to build it yourself. See:
http://mesosphere.com/downloads/
http://mesosphere.com/downloads/details/index.html#apache-mesos
I'd suggest to follow Mesos Getting Started documentation.
After your system requirements are satisfied, following the section:
System Requirements
Once you reach the following section:
Building Mesos
when you execute the make without disabling verbosity, ensure that all process completed successfully. If it stops (e.g. tipically for proxy related issues) try to fix it accordingly or otherwise post your stack somewhere and I would be happy to help (if I can).
Unfortunately, running make check could not reveal the problem sometimes.
Have you run the make check command ? It is said in the documentation that the binaries will only be available after running the make checkcommand.Ì faced the same issue and it was because i didn't run that command.