Closed opoudjis closed 3 years ago
Oddly, this is specific to isodoc; metanorma-standoc has run on Windows GHA without incident.
Hmm never saw this before: Encoding::UndefinedConversionError: "\x8B" from ASCII-8BIT to UTF-8
#### https://github.com/metanorma/isodoc/runs/1851155177?check_suite_focus=true
```bash
--- ERROR REPORT TEMPLATE -------------------------------------------------------
# Error Report
## Questions
Please fill out answers to these questions, it'll help us figure out
why things are going wrong.
- **What did you do?**
I ran the command `C:/hostedtoolcache/windows/Ruby/3.0.0/x64/bin/bundle install --jobs 4`
- **What did you expect to happen?**
I expected Bundler to...
- **What happened instead?**
Instead, what happened was...
- **Have you tried any solutions posted on similar issues in our issue tracker, stack overflow, or google?**
I tried...
- **Have you read our issues document, https://github.com/rubygems/rubygems/blob/master/bundler/doc/contributing/ISSUES.md?**
...
## Backtrace
Encoding::UndefinedConversionError: "\x8B" from ASCII-8BIT to UTF-8
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/compact_index_client/updater.rb:57:in write' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/compact_index_client/updater.rb:57:in <<'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/compact_index_client/updater.rb:57:in block (3 levels) in update' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/compact_index_client/updater.rb:57:in open'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/compact_index_client/updater.rb:57:in open' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/compact_index_client/updater.rb:57:in block (2 levels) in update'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/shared_helpers.rb:103:in filesystem_access' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/compact_index_client/updater.rb:53:in block in update'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/vendor/tmpdir/lib/tmpdir.rb:96:in mktmpdir' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/compact_index_client/updater.rb:29:in update'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/compact_index_client.rb:98:in update' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/compact_index_client.rb:85:in update_and_parse_checksums!'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/fetcher/compact_index.rb:75:in available?' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/fetcher/compact_index.rb:16:in call'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/fetcher/compact_index.rb:16:in block in compact_index_request' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/fetcher.rb:161:in use_api'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/source/rubygems.rb:386:in block in api_fetchers' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/source/rubygems.rb:386:in select'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/source/rubygems.rb:386:in api_fetchers' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/source/rubygems.rb:391:in block in remote_specs'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/index.rb:9:in build' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/source/rubygems.rb:390:in remote_specs'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/source/rubygems.rb:88:in specs' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/lazy_specification.rb:72:in materialize'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/spec_set.rb:85:in block in materialize' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/spec_set.rb:82:in map!'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/spec_set.rb:82:in materialize' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/definition.rb:174:in specs'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/definition.rb:162:in resolve_remotely!' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/installer.rb:289:in resolve_if_needed'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/installer.rb:83:in block in run' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/process_lock.rb:12:in block in lock'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/process_lock.rb:9:in open' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/process_lock.rb:9:in lock'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/installer.rb:72:in run' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/installer.rb:24:in install'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/cli/install.rb:64:in run' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/cli.rb:259:in block in install'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/settings.rb:115:in temporary' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/cli.rb:258:in install'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/cli.rb:30:in dispatch'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/lib/bundler/cli.rb:24:in start'
C:/hostedtoolcache/windows/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-2.2.8/exe/bundle:49:in block in
Let me try rerun
It looks like a temporal issue, probably shell encoding wasn't set to UTF-8, and file cannot be written by bundler https://github.com/rubygems/rubygems/blob/master/bundler/lib/bundler/compact_index_client/updater.rb#L57
https://github.com/rubygems/rubygems/issues/4360 - reported
The issue is just gone after the re-run.
As far as I see there is no way to set encoding explicitly in the shell which run bundle install
https://github.com/actions/toolkit/blob/master/packages/exec/src/interfaces.ts
Let's see what bundler maintainer will answer
https://github.com/metanorma/isodoc/runs/1950500825?check_suite_focus=true
I assume the issue is persisting
@opoudjis unfortunately, I downgraded the bundler version in https://github.com/metanorma/isodoc/pull/263 as was suggested in https://github.com/rubygems/rubygems/issues/4360#issuecomment-775075740
Let's observe will it works or not, strange that this doesn't happen on other repos (correct me if I'm wrong)
https://github.com/metanorma/isodoc/runs/1851155075?check_suite_focus=true