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

❌ (closable) Crash on : invalid byte sequence in US-ASCII #65

Open
kriom opened this issue Nov 24, 2024 · 1 comment
Open

❌ (closable) Crash on : invalid byte sequence in US-ASCII #65

kriom opened this issue Nov 24, 2024 · 1 comment

Comments

@kriom
Copy link

kriom commented Nov 24, 2024

Hi,

First, thank for you great gem,

Lately I've had test runs crash with this error :

#<Thread:0x00007796efaa1678 /usr/local/bundle/bundler/gems/turbo_tests-aeae4ff0f18f/lib/turbo_tests/runner.rb:189 run> terminated with exception (report_on_exception is true):
/usr/local/bundle/bundler/gems/turbo_tests-aeae4ff0f18f/lib/turbo_tests/runner.rb:191:in `split': invalid byte sequence in US-ASCII (ArgumentError)

              result = line.split(env["RSPEC_FORMATTER_OUTPUT_ID"])
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	from /usr/local/bundle/bundler/gems/turbo_tests-aeae4ff0f18f/lib/turbo_tests/runner.rb:191:in `block (2 levels) in start_subprocess'
	from /usr/local/bundle/bundler/gems/turbo_tests-aeae4ff0f18f/lib/turbo_tests/runner.rb:190:in `each_line'
	from /usr/local/bundle/bundler/gems/turbo_tests-aeae4ff0f18f/lib/turbo_tests/runner.rb:190:in `block in start_subprocess'
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

It seems that turbo tests does not support my rspec output when it contains non US-ASCII caractères like "é" or "è"

How can we fix it ?
Does this have anything to do with the local LC_ALL (en_US.UTF-8) displayed in the error output?

I'm going to continue looking into this problem, but if anyone knows what to do, I'd be happy to help.

Thanks !

@kriom
Copy link
Author

kriom commented Nov 25, 2024

❌ Hi ! ❌

This issue can be closed !
I resolved my issue and it has nothing to see with turbo_tests.

To resolve it I had fix my locale in my Dockerfile

FROM ruby:3.3.6-bullseye as base
# ...
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
# ...
RUN apt-get update && apt-get install -y locales
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen en_US.UTF-8

@kriom kriom changed the title Crash on : invalid byte sequence in US-ASCII ❌ Crash on : invalid byte sequence in US-ASCII Nov 25, 2024
@kriom kriom changed the title ❌ Crash on : invalid byte sequence in US-ASCII ❌ (closable) Crash on : invalid byte sequence in US-ASCII Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant