You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see the error below [1] from the console truncation code on master. In certain circumstances, the string coming back from net ssh seems to be ASCII-8BIT encoded (this happens when I am logging a string containing a left quotation mark ‘), and this causes appending the ellipsis to fail, I guess because it cannot be converted into ASCII-8BIT.
I added some logging like this to the truncate_to_console_width method:
Most of the strings coming back from the server give this debug: [#<Encoding:UTF-8>, #<Encoding:UTF-8>]
It is just the one containing the quotation mark which gives this debug: [#<Encoding:ASCII-8BIT>, #<Encoding:UTF-8>]
I'm not sure why net ssh is returning ASCII-8BIT in this case or what the right thing to do is. Changing from an ellipsis to 3 periods (...) fixes the problem, I guess because they can be converted to ASCII-8BIT. I'm not sure what is going on here, but I thought I'd make a note of it since it appears to be caused by Airbrussh truncation.
[1]
SSHKit::Runner::ExecuteError: Exception while executing as xxxx: incompatible character encodings: ASCII-8BIT and UTF-8
sshkit-c840d4f63f41/lib/sshkit/runners/parallel.rb:16:in `rescue in block (2 levels) in execute'
sshkit-c840d4f63f41/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Encoding::CompatibilityError: incompatible character encodings: ASCII-8BIT and UTF-8
airbrussh-6191c3937d5d/lib/airbrussh/console.rb:48:in `truncate_to_console_width'
airbrussh-6191c3937d5d/lib/airbrussh/console.rb:26:in `print_line'
airbrussh-6191c3937d5d/lib/airbrussh/console_formatter.rb:112:in `print_line'
airbrussh-6191c3937d5d/lib/airbrussh/console_formatter.rb:117:in `print_indented_line'
airbrussh-6191c3937d5d/lib/airbrussh/console_formatter.rb:42:in `block in log_command_data'
airbrussh-6191c3937d5d/lib/airbrussh/console_formatter.rb:41:in `each_line'
airbrussh-6191c3937d5d/lib/airbrussh/console_formatter.rb:41:in `log_command_data'
airbrussh-6191c3937d5d/lib/airbrussh/delegating_formatter.rb:25:in `public_send'
airbrussh-6191c3937d5d/lib/airbrussh/delegating_formatter.rb:25:in `block (3 levels) in <class:DelegatingFormatter>'
airbrussh-6191c3937d5d/lib/airbrussh/delegating_formatter.rb:25:in `map'
airbrussh-6191c3937d5d/lib/airbrussh/delegating_formatter.rb:25:in `block (2 levels) in <class:DelegatingFormatter>'
sshkit-c840d4f63f41/lib/sshkit/backends/netssh.rb:93:in `block (4 levels) in execute_command'
net-ssh-2.9.2/lib/net/ssh/connection/channel.rb:569:in `call'
The text was updated successfully, but these errors were encountered:
Thanks for the detailed report. I'll probably work on a solution later today. If you get to it first, add a comment here so that I know not to duplicate your efforts.
Ah that would be great if you have time - I won't have a chance to look at this for a few days. For the moment, I just disabled truncation, which is fine as a workaround.
I see the error below [1] from the console truncation code on master. In certain circumstances, the string coming back from net ssh seems to be ASCII-8BIT encoded (this happens when I am logging a string containing a left quotation mark
‘
), and this causes appending the ellipsis to fail, I guess because it cannot be converted into ASCII-8BIT.I added some logging like this to the
truncate_to_console_width
method:Most of the strings coming back from the server give this debug:
[#<Encoding:UTF-8>, #<Encoding:UTF-8>]
It is just the one containing the quotation mark which gives this debug:
[#<Encoding:ASCII-8BIT>, #<Encoding:UTF-8>]
I'm not sure why net ssh is returning ASCII-8BIT in this case or what the right thing to do is. Changing from an ellipsis to 3 periods (
...
) fixes the problem, I guess because they can be converted to ASCII-8BIT. I'm not sure what is going on here, but I thought I'd make a note of it since it appears to be caused by Airbrussh truncation.[1]
The text was updated successfully, but these errors were encountered: