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

xcpretty: command not found #12331

Closed
kerwinAPG opened this issue Apr 17, 2018 · 4 comments
Closed

xcpretty: command not found #12331

kerwinAPG opened this issue Apr 17, 2018 · 4 comments

Comments

@kerwinAPG
Copy link

New Issue Checklist

Issue Description

I am getting the xcpretty: command not found error during build_app stage. I am running this as trigger in Xcode server. I can run the Fastfile beta directly on that machine without error, but when running through Xcode trigger, I see this. I have read a previous issue regarding this issue. I tried a

sudo gem install xcpretty --verbose

and verified that it installed. but it does not address the issue. That issue last dated Jul 2016 and was closed.

Complete output when running fastlane, including the stack trace and command used
[[11:25:46]: Detected provisioning profile mapping: {:"com.APG.DUMMY-APP-DO-NOT-DISTRIBUTE"=>"com.APG.DUMMY-APP-DO-NOT-DISTRIBUTE AppStore"}

+-------------------------------------------------------------------------+-------------------------------------------------------------+
| �[32mSummary for gym 2.92.1�[0m |
+-------------------------------------------------------------------------+-------------------------------------------------------------+
| scheme | DUMMY_APP_DO_NOT_DISTRIBUTE |
| export_method | app-store |
| export_options.provisioningProfiles.com.APG.DUMMY-APP-DO-NOT-DISTRIBUTE | com.APG.DUMMY-APP-DO-NOT-DISTRIBUTE AppStore |
| project | ./DUMMY_APP_DO_NOT_DISTRIBUTE.xcodeproj |
| destination | generic/platform=iOS |
| output_name | DUMMY_APP_DO_NOT_DISTRIBUTE |
| build_path | /Users/testuser/Library/Developer/Xcode/Archives/2018-04-17 |
| clean | false |
| output_directory | . |
| silent | false |
| skip_package_ipa | false |
| buildlog_path | ~/Library/Logs/gym |
| skip_profile_detection | false |
| xcode_path | /Library/Developer/XcodeServer/CurrentXcodeSymlink |
+-------------------------------------------------------------------------+-------------------------------------------------------------+

[11:25:46]: �[36m$ set -o pipefail && xcodebuild -scheme DUMMY_APP_DO_NOT_DISTRIBUTE -project ./DUMMY_APP_DO_NOT_DISTRIBUTE.xcodeproj -destination 'generic/platform=iOS' -archivePath /Users/testuser/Library/Developer/Xcode/Archives/2018-04-17/DUMMY_APP_DO_NOT_DISTRIBUTE\ 2018-04-17\ 11.25.46.xcarchive archive | tee /Users/testuser/Library/Logs/gym/DUMMY_APP_DO_NOT_DISTRIBUTE-DUMMY_APP_DO_NOT_DISTRIBUTE.log | xcpretty�[0m
[11:25:46]: ▸ �[35msh: xcpretty: command not found�[0m
sh: xcpretty: command not found
[11:25:54]: �[31mExit status: 127�[0m

+---------------+----------------------------------------------------+
| �[32m�[33mBuild environment�[0m |
+---------------+----------------------------------------------------+
| xcode_path | /Library/Developer/XcodeServer/CurrentXcodeSymlink |
| gym_version | 2.92.1 |
| export_method | app-store |
| sdk | iPhoneOS11.3.sdk |
+---------------+----------------------------------------------------+
]

Environment

[
✅ fastlane environment ✅

Stack

Key Value
OS 10.13.4
Ruby 2.3.3
Bundler? false
Git git version 2.15.1 (Apple Git-101)
Installation Source /usr/local/bin/fastlane
Host Mac OS X 10.13.4 (17E199)
Ruby Lib Dir /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
OpenSSL Version LibreSSL 2.2.7
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 9.3

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL
LANGUAGE

fastlane files:

No Fastfile found

No Appfile found

fastlane gems

Gem Version Update-Status
fastlane 2.92.1 ✅ Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.0.0
slack-notifier 2.3.2
atomos 0.1.2
CFPropertyList 3.0.0
claide 1.0.2
colored2 3.1.2
nanaimo 0.2.5
xcodeproj 1.5.7
rouge 2.0.7
xcpretty 0.2.8
terminal-notifier 1.8.0
unicode-display_width 1.3.0
terminal-table 1.8.0
plist 3.4.0
public_suffix 2.0.5
addressable 2.5.2
multipart-post 2.0.0
word_wrap 1.0.0
tty-screen 0.6.4
tty-cursor 0.5.0
tty-spinner 0.8.0
babosa 1.0.2
colored 1.2
highline 1.7.10
commander-fastlane 4.4.6
excon 0.62.0
faraday 0.14.0
unf_ext 0.0.7.5
unf 0.1.4
domain_name 0.5.20170404
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
fastimage 2.1.1
gh_inspector 1.1.3
json 1.8.3
mini_magick 4.5.1
multi_json 1.13.1
multi_xml 0.6.0
rubyzip 1.2.1
security 0.1.3
xcpretty-travis-formatter 1.0.0
dotenv 2.2.2
bundler 1.16.1
faraday_middleware 0.12.2
naturally 2.1.0
simctl 1.6.4
uber 0.1.0
declarative 0.0.10
declarative-option 0.1.0
representable 3.0.4
retriable 3.1.1
mime-types-data 3.2016.0521
mime-types 3.1
little-plugger 1.1.4
logging 2.2.2
jwt 2.1.0
memoist 0.16.0
os 0.9.6
signet 0.8.1
googleauth 0.6.2
httpclient 2.8.3
google-api-client 0.13.6
emoji_regex 0.1.1
io-console 0.4.5
libxml-ruby 2.9.0

generated on: 2018-04-17

]
@kerwinAPG
Copy link
Author

I did want to add that xcpretty occurs on my Xcode server machine in /usr/local/bin it does not reside in /usr/bin In my trigger script, I have to invoke fast lane with the line
/usr/local/bin/fastlane beta
I did that to address a "command not found" error when just trying to run
fastlane beta
Is it possible that the gym file needs know about this path difference?

Thanks, kerwin

@joshdholtz
Copy link
Member

@kerwinAPG I have never run Xcode server but it looks like this might be a configuration issue with your machine. It looks like one of your things is installed as/with a root account and the other is running with your user account?

@kerwinAPG
Copy link
Author

I found a fix for this was to add to my trigger script the following:

PATH="/usr/local/bin:$PATH"

and then as the Fastfile invokes gym, that the scripts will search the usr/local/bin/ for commands rather than the default usr/bin/ location. This is necessary for Xcode Server where a test user is created. I credit Honza Dvorsky for this solution. This fix was an adaptation of one he suggested in his pages about using Xcode Server Bot Triggers for Continuous Integration. https://honzadvorsky.com/articles/2015-08-17-17-30-xcode_server_tutorials_3_prebuild__postbuild_scripts/

@joshdholtz
Copy link
Member

@kerwinAPG Ah, so looks like it was a configuration issue with which user was executing fastlane. Glad you got it solved! Happy fastlaning 🚀

@fastlane fastlane locked and limited conversation to collaborators Jun 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@joshdholtz @kerwinAPG and others