fastlane: invalid byte sequence in US-ASCII (ArgumentError)
I’m running a lane that works fine on my development machine, but fails on our Jenkins machine. The Jenkins machine has the latest XCode (6.3.1) with ruby setup via rbenv. bundle install
was run before running fastlane and fastlane was run using bundle exec fastlane dev
.
The error I’m getting is:
[37mINFO [2015-04-24 10:19:41.60]: [0m[32m-----------------[0m
[37mINFO [2015-04-24 10:19:41.60]: [0m[32m--- [0m[32mStep: ipa[0m[32m ---[0m
[37mINFO [2015-04-24 10:19:41.60]: [0m[32m-----------------[0m
[35mDEBUG [2015-04-24 10:19:41.60]: [0mset -o pipefail && ipa build -w "<snip>.xcworkspace" -s "<snip>" -d "./build" -m "/Users/ribot/.jenkins/jobs/<snip>-ios-nightly/workspace/build/profile.mobileprovision" --verbose | xcpretty
[37mINFO [2015-04-24 10:19:41.60]: [0m[SHELL COMMAND]: [33mset -o pipefail && ipa build -w "<snip>.xcworkspace" -s "<snip>" -d "./build" -m "/Users/ribot/.jenkins/jobs/<snip>-ios-nightly/workspace/build/profile.mobileprovision" --verbose | xcpretty[0m
/Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/lib/fastlane/actions/actions_helper.rb:68:in `strip': invalid byte sequence in US-ASCII (ArgumentError)
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/lib/fastlane/actions/actions_helper.rb:68:in `block (2 levels) in sh_no_action'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/lib/fastlane/actions/actions_helper.rb:67:in `each'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/lib/fastlane/actions/actions_helper.rb:67:in `block in sh_no_action'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/lib/fastlane/actions/actions_helper.rb:66:in `popen'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/lib/fastlane/actions/actions_helper.rb:66:in `sh_no_action'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/lib/fastlane/actions/actions_helper.rb:56:in `sh'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/lib/fastlane/actions/ipa.rb:64:in `run'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/lib/fastlane/fast_file.rb:112:in `block (2 levels) in method_missing'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/lib/fastlane/actions/actions_helper.rb:35:in `execute_action'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/lib/fastlane/fast_file.rb:94:in `block in method_missing'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/lib/fastlane/fast_file.rb:93:in `chdir'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/lib/fastlane/fast_file.rb:93:in `method_missing'
from (eval):20:in `block (3 levels) in parse'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/lib/fastlane/runner.rb:34:in `call'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/lib/fastlane/runner.rb:34:in `block in execute'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/lib/fastlane/runner.rb:24:in `chdir'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/lib/fastlane/runner.rb:24:in `execute'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/lib/fastlane/lane_manager.rb:33:in `cruise_lane'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/bin/fastlane:39:in `block (2 levels) in run'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/commander-4.3.3/lib/commander/command.rb:178:in `call'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/commander-4.3.3/lib/commander/command.rb:178:in `call'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/commander-4.3.3/lib/commander/command.rb:153:in `run'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/commander-4.3.3/lib/commander/runner.rb:428:in `run_active_command'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/commander-4.3.3/lib/commander/runner.rb:68:in `run!'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/commander-4.3.3/lib/commander/delegates.rb:15:in `run!'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/bin/fastlane:118:in `run'
from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/fastlane-0.12.4/bin/fastlane:124:in `<top (required)>'
from /Users/ribot/.rbenv/versions/2.1.2/bin/fastlane:23:in `load'
from /Users/ribot/.rbenv/versions/2.1.2/bin/fastlane:23:in `<main>'
[37mINFO [2015-04-24 10:19:46.82]: [0m[SHELL OUTPUT]: 2015-04-24 10:19:46.824 xcodebuild[5102:18549] [MT] iPhoneSimulator: SimVerifier returned: Error Domain=NSPOSIXErrorDomain Code=53 "Simulator verification failed." UserInfo=0x7f980ad0dea0 {NSLocalizedFailureReason=A connection to the simulator verification service could not be established., NSLocalizedRecoverySuggestion=Ensure that Xcode.app is installed on a volume with ownership enabled., NSLocalizedDescription=Simulator verification failed.}
[37mINFO [2015-04-24 10:19:48.99]: [0m[SHELL OUTPUT]: /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/xcpretty-0.1.9/lib/xcpretty/parser.rb:350:in `===': invalid byte sequence in US-ASCII (ArgumentError)
[37mINFO [2015-04-24 10:19:48.99]: [0m[SHELL OUTPUT]: from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/xcpretty-0.1.9/lib/xcpretty/parser.rb:350:in `update_test_state'
[37mINFO [2015-04-24 10:19:48.99]: [0m[SHELL OUTPUT]: from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/xcpretty-0.1.9/lib/xcpretty/parser.rb:247:in `parse'
[37mINFO [2015-04-24 10:19:48.99]: [0m[SHELL OUTPUT]: from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/xcpretty-0.1.9/lib/xcpretty/formatters/formatter.rb:78:in `pretty_format'
[37mINFO [2015-04-24 10:19:48.99]: [0m[SHELL OUTPUT]: from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/xcpretty-0.1.9/lib/xcpretty/printer.rb:15:in `pretty_print'
[37mINFO [2015-04-24 10:19:48.99]: [0m[SHELL OUTPUT]: from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/xcpretty-0.1.9/bin/xcpretty:80:in `block in <top (required)>'
[37mINFO [2015-04-24 10:19:48.99]: [0m[SHELL OUTPUT]: from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/xcpretty-0.1.9/bin/xcpretty:79:in `each_line'
[37mINFO [2015-04-24 10:19:48.99]: [0m[SHELL OUTPUT]: from /Users/ribot/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/xcpretty-0.1.9/bin/xcpretty:79:in `<top (required)>'
[37mINFO [2015-04-24 10:19:48.99]: [0m[SHELL OUTPUT]: from /Users/ribot/.rbenv/versions/2.1.2/bin/xcpretty:23:in `load'
[37mINFO [2015-04-24 10:19:48.99]: [0m[SHELL OUTPUT]: from /Users/ribot/.rbenv/versions/2.1.2/bin/xcpretty:23:in `<main>'
[37mINFO [2015-04-24 10:20:45.70]: [0m[33mVariable Dump:[0m
[37mINFO [2015-04-24 10:20:45.70]: [0m{:DEFAULT_PLATFORM=>:ios, :ENVIRONMENT=>nil, :PLATFORM_NAME=>:ios, :LANE_NAME=>"ios dev", :GIT_NOTES_LOCATION=>"build/git_notes.txt", :CERT_FILE_PATH=>"/tmp/cert/<snip>.cer", :CERT_CERTIFICATE_ID=>"<snip>", :SIGH_PROFILE_PATH=>"/Users/ribot/.jenkins/jobs/<snip>-ios-nightly/workspace/build/profile.mobileprovision", :SIGH_UDID=>"45f742bf-9078-4112-a56b-f0cad54fb785"}
Any ideas what could be causing this?
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 20 (7 by maintainers)
I had the same error message, my locale was not UTF-8, I tried this from https://stackoverflow.com/questions/7165108/in-osx-lion-lang-is-not-set-to-utf8-how-fix and solved the issue:
change en_US.UTF-8 to whatever country you are, just check first if available via ‘locale -a’
close the session, reopen it
Brew doctor clears the error message
Just ran into this issue when running fastlane from a Jenkins build. Setting
LC_ALL=en_US.UTF-8
in the Jenkins configuration resolved the issue.I added
into
fastlane_core.rb
. Since this problem occurs only when shelling out commands, this should be called in time before executing any external commands. What do you think @milch?