-
Notifications
You must be signed in to change notification settings - Fork 41
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
Device names with apostrophes cause invalid byte sequence in US-ASCII (ArgumentError) #74
Comments
I'm aware this is because the default external encoding is US-ASCII, but It would be nice if that didn't matter or was maybe mentioned somewhere. |
@coquifrogs Thanks for reporting. Grrr. I can't decide how and where to solve this problem.
|
My first thought is that it seems like the gem is at fault - it's trying to parse a non-ascii string of bytes as if it were ascii. |
Hi @coquifrogs, can you paste the output of the
If your locale is set to ASCII you are going to have trouble with software like ruby parsing standard input that is encoded as UTF-8. Without digging too deeply, it looks like ruby uses the system's locale to identify the character encoding of stdin/stdout. |
I don't think it is reasonable for run-loop to try to support any encoding other than the default ruby and MacOS encoding. We would have to clean every string we read from stdout and stderr. At this point, we don't have the resources to do so. I think you already know the workarounds, but I will mention them in case someone else bumps into this issue.
I am on thin ice here; I do not have a firm understand of how encodings and locales interact on MacOS.
If you write some documentation, I will try to figure out some place to put it. |
It may not be the default for OS X. I can't confirm that, but other people have posted on Stackoverflow about it on Lion even. Since OS X by default names your machine with that UTF-8 apostrophe it is a likely error. The workarounds given should be fine, but the error that occurs is not helpful in figuring out the problem. Here's the output of running locale on my machine: jcannon@jcannon-mbp: ~
|
At long last, I have reproduced and I now understand the error of my ways. Working on a fix. @michaelkirk @svevang @TobiasRoikjer The problem is that |
OS X 10.10 Xcode 6.1
Note the apostrophe is UTF-8.
Error stack trace is:
invalid byte sequence in US-ASCII (ArgumentError)
/Library/Ruby/Gems/2.0.0/gems/run_loop-1.1.0/lib/run_loop/xctools.rb:152:in
split' /Library/Ruby/Gems/2.0.0/gems/run_loop-1.1.0/lib/run_loop/xctools.rb:152:in
block (2 levels) in instruments'/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:217:in
popen_run' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:99:in
popen3'/Library/Ruby/Gems/2.0.0/gems/run_loop-1.1.0/lib/run_loop/xctools.rb:150:in
block in instruments' /Library/Ruby/Gems/2.0.0/gems/run_loop-1.1.0/lib/run_loop/xctools.rb:155:in
call'/Library/Ruby/Gems/2.0.0/gems/run_loop-1.1.0/lib/run_loop/xctools.rb:155:in
instruments' /Library/Ruby/Gems/2.0.0/gems/run_loop-1.1.0/lib/run_loop/sim_control.rb:863:in
sim_details'/Library/Ruby/Gems/2.0.0/gems/run_loop-1.1.0/lib/run_loop/sim_control.rb:290:in
enable_accessibility_on_sims' /Library/Ruby/Gems/2.0.0/gems/run_loop-1.1.0/lib/run_loop/core.rb:95:in
run_with_options'/Library/Ruby/Gems/2.0.0/gems/run_loop-1.1.0/lib/run_loop/core.rb:690:in
run' /Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.11.4/lib/calabash-cucumber/launcher.rb:732:in
block in new_run_loop'/Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.11.4/lib/calabash-cucumber/launcher.rb:730:in
times' /Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.11.4/lib/calabash-cucumber/launcher.rb:730:in
new_run_loop'/Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.11.4/lib/calabash-cucumber/launcher.rb:605:in `relaunch'
The text was updated successfully, but these errors were encountered: