Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

US-ASCII (ArgumentError) #9

Closed
woutergoossens opened this issue Nov 16, 2014 · 12 comments
Closed

US-ASCII (ArgumentError) #9

woutergoossens opened this issue Nov 16, 2014 · 12 comments

Comments

@woutergoossens
Copy link

Hi,

Do I need to open the simulator before I run "snapshot" or will snapshot open the simulator itself?

I have an error when I run it

/Library/Ruby/Gems/2.0.0/gems/snapshot-0.2.4/lib/snapshot/snapshot_file.rb:86:in `split': invalid byte sequence in US-ASCII (ArgumentError)

I am trying with the Example project and I have the same issue. I tried with opening the simulator but without success..

Wouter

@KrauseFx
Copy link
Collaborator

Hi,

It doesn't matter if your simulator is running. Can you run instruments -s on your mac? Do you have the Xcode command line tools installed?

@woutergoossens
Copy link
Author

HI,

I get this result when I run instruments -s

Wouter’s MacBook Pro (2) [9F4857F6-36F0-5763-A413-B776FDA7418E]
Resizable iPad (8.1 Simulator) [2AB4CF6A-3185-4B1A-8118-71163CDEA7D4]
Resizable iPhone (8.1 Simulator) [225294A3-9F5D-4F5F-82FB-A67162F13D76]
iPad 2 (8.1 Simulator) [0EDD63D2-CED7-4547-A5E5-05090A1BEDD1]
iPad Air (8.1 Simulator) [DEB4B845-C9E9-43A7-B96B-F05D73BF2BC3]
iPad Retina (8.1 Simulator) [E4369167-9346-40F0-8B9F-090F0AD2B1D2]
iPhone 4s (8.1 Simulator) [5DFCE9DC-0E69-480E-8140-485171A5E08B]
iPhone 5 (8.1 Simulator) [1C88C81B-DA70-4EAF-A369-A072AC50AC9C]
iPhone 5s (8.1 Simulator) [550D234F-F559-49B2-AD6D-1CF516710261]
iPhone 6 (8.1 Simulator) [0335272A-0CB8-4E18-8386-4235432357DB]
iPhone 6 Plus (8.1 Simulator) [38B86F54-5783-404C-8C13-042B89E9554A]
Known Templates:
"Activity Monitor"
"Allocations"
"Automation"
"Blank"
"Cocoa Layout"
"Core Animation"
"Core Data"
"Counters"
"Dispatch"
"Energy Diagnostics"
"File Activity"
"GPU Driver"
"Leaks"
"Multicore"
"Network"
"OpenGL ES Analysis"
"Sudden Termination"
"System Trace"
"System Usage"
"Time Profiler"
"UI Recorder"
"Zombies"

And I have xcode command line tools installed..
"xcode-select: error: command line tools are already installed, use "Software Update" to install updates"

What could be wrong?

Wouter

@KrauseFx
Copy link
Collaborator

It seems to be related to your Ruby version and system settings.

Could you try running:

sudo gem uninstall snapshot
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
sudo gem uninstall snapshot

@woutergoossens
Copy link
Author

Thanks. working!

(small remark, last line should be install instead of uninstall).

@KrauseFx
Copy link
Collaborator

Oh, sorry about that last line.
I'm glad it works 👍

@martnst
Copy link

martnst commented Nov 28, 2014

FYI: Helped me as well

@KrauseFx KrauseFx reopened this Nov 28, 2014
@KrauseFx
Copy link
Collaborator

Okay, then I need to find a solution to avoid this problem.

@KrauseFx KrauseFx changed the title Starting snapshot US-ASCII (ArgumentError) Nov 28, 2014
@KrauseFx
Copy link
Collaborator

I've seen shenzhen seems to be fighting with the same problems.

https://github.com/nomad/shenzhen

For best results, set your environment localization to UTF-8, with $ export LC_ALL="en_US.UTF-8". Otherwise, Shenzhen may return unexpectedly with the error "invalid byte sequence in US-ASCII".

@KrauseFx
Copy link
Collaborator

Did you use sudo to run snapshot? Maybe sudo is causing the problem.

@netbe
Copy link

netbe commented Oct 13, 2015

Got same issue:

snapshot --snapfile ./scripts/Snapshot/Snapfile
�[37m[15:23:00]: �[0m#############################################################
�[37m[15:23:00]: �[0m# xctool is recommended to build the apps
�[37m[15:23:00]: �[0m# Install it using 'brew install xctool'
�[37m[15:23:00]: �[0m# Falling back to xcodebuild instead 
�[37m[15:23:00]: �[0m#############################################################
/Library/Ruby/Gems/2.0.0/gems/snapshot-0.10.1/lib/snapshot/simulators.rb:23:in `split': invalid byte sequence in US-ASCII (ArgumentError)
    from /Library/Ruby/Gems/2.0.0/gems/snapshot-0.10.1/lib/snapshot/simulators.rb:23:in `available_devices'
    from /Library/Ruby/Gems/2.0.0/gems/snapshot-0.10.1/lib/snapshot/dependency_checker.rb:23:in `check_simulators'
    from /Library/Ruby/Gems/2.0.0/gems/snapshot-0.10.1/bin/snapshot:38:in `block (3 levels) in run'
    from /Library/Ruby/Gems/2.0.0/gems/snapshot-0.10.1/bin/snapshot:37:in `chdir'
    from /Library/Ruby/Gems/2.0.0/gems/snapshot-0.10.1/bin/snapshot:37:in `block (2 levels) in run'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/runner.rb:68:in `run!'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
    from /Library/Ruby/Gems/2.0.0/gems/snapshot-0.10.1/bin/snapshot:85:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/snapshot-0.10.1/bin/snapshot:91:in `<top (required)>'
    from /usr/bin/snapshot:23:in `load'
    from /usr/bin/snapshot:23:in `<main>'

I've try to uninstall and reinstall as suggested with sudo on yosemite, but did not work

@netbe
Copy link

netbe commented Oct 13, 2015

ok it wsa on a jenkins build slave and putting the two:

LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8

in the "[EnvInject] - Injecting as environment variables the properties" of the job solved it.

@fastlanebot
Copy link

This issue was migrated to fastlane/fastlane#2741. Please post all further comments there.

fastlane is now a mono repo, you can read more about the change in our blog post. All tools are now available in the fastlane main repo 🚀

@fastlane-old fastlane-old locked and limited conversation to collaborators Mar 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants