Hello when I try to build or run my iOS app on a emulator device on Mac m1 I have this issue with fastlane on Xcode.
31mWARNING: fastlane requires your locale to be set to UTF-8. To learn more go to https://docs.fastlane.tools/getting-started/ios/setup/#set-up-environment-variables[0m
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/pathname.rb:43:in `match?': [31m[!] invalid byte sequence in US-ASCII[0m (ArgumentError)
When I go to the pathname.rb:43 I see this code but I don’t what is wrong
def chop_basename(path) # :nodoc:
base = File.basename(path)
if /A#{SEPARATOR_PAT}?z/o.match?(base)
return nil
else
return path[0, path.rindex(base)], base
end
end
I have my terminal locale like this
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
How you can see all is in "en_US.UTF-8" but the Xcode show the same build error
2
Answers
The best way to solve this problem is install fastlane with brew. When I try to install other fastlane versions with ruby, any of a version presents the same problem or another problem. But the only thing that you can do is uninstall fastlane ruby installation. and install with brew. This is the commands that I implement.
This is the version that I have:
I encounter same issue when running
fastlane
in Terminal embedded in Android Studio.I fixed this by adding the following three variables into the shell environment:
I use
zsh
, so the config file will be placed at ~/.zshrc by default.Depends on what shell you used and the path of config file may be different.