question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Non UTF-8 boot log crashes decoder

See original GitHub issue

Describe the bug

Command Name az vm boot-diagnostics get-boot-log

Errors:

'utf-8' codec can't decode byte 0xff in position 20023: invalid start byte
Traceback (most recent call last):
python3.6/site-packages/knack/cli.py, ln 215, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 654, in execute
    raise ex
cli/core/commands/__init__.py, ln 718, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
...
storage/v2018_11_09/blob/baseblobservice.py, ln 2166, in get_blob_to_stream
    stream.write(blob.content)
cli/command_modules/vm/custom.py, ln 1438, in write
    content = str_or_bytes.decode('utf8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 20023: invalid start byte

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Deploy URN audiocodes:mediantsessionbordercontroller:mediantvirtualsbcazure:latest
  • az vm boot-diagnostics get-boot-log -n {} -g {}

Expected Behavior

Boot log to be downloaded.

Environment Summary

Linux-4.19.128-microsoft-standard-x86_64-with-debian-bullseye-sid
Python 3.6.10
Installer: DEB

azure-cli 2.13.0

Extensions:
azure-devops 0.18.0

Additional Context

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
qwordycommented, Jan 11, 2021

Yes. I also think it is a bug fix. The feature-request label has a long story. There is a similar issue https://github.com/Azure/azure-cli/issues/16454 recently. I will prioritize this issue since more than one person reported it.

1reaction
qwordycommented, Oct 22, 2020

The error indicates that it is not UTF-8 encoding. I will support more encodings to fix this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

git-p4 crashes on non UTF-8 output from p4 - kernel
Re: git-p4 crashes on non UTF-8 output from p4 2021-04-08 19:28 git-p4 ... codec can't > decode byte Ox93 in position 42: invalid...
Read more >
Bug #1385253 “aa-logprof crashes: UnicodeDecodeError: 'utf-8' co ...
aa-logprof crashes: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb3 in position 41: invalid start byte. Bug #1385253 reported by Ralf Spenneberg on ...
Read more >
How To Crash UTF-8 Encode [closed] - Stack Overflow
The UTF-8 encoder does not allow Unicode strings to use the the UTF-16 "surrogate" code points from U+D800 to U+DFFF:
Read more >
Why does the glusterfind pre crash with error "utf_8.py:16 ...
Why does the glusterfind pre crash with error "utf_8.py:16:decode:UnicodeDecodeError: 'utf8' codec can't decode",when the `--no-encode` is used?
Read more >
How to Remove Non UTF-8 Characters From a File - Baeldung
We can sometimes have a file that contains invalid characters or contains foreign language words that make our program crash with an ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found