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

log error UnicodeDecodeError #2103

Open
Anto79-ops opened this issue Sep 28, 2024 · 5 comments
Open

log error UnicodeDecodeError #2103

Anto79-ops opened this issue Sep 28, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Anto79-ops
Copy link

Anto79-ops commented Sep 28, 2024

What happened?

Hello,

Seeing this in AD addon on Home Assistant OS (ver: 0.16.6 and 0.16.7 ) logs on HAOS.

thanks

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

2024-09-18 10:43:05.065189 INFO MQTT: Unable to decode MQTT message
2024-09-18 10:43:05.065910 ERROR MQTT: Unable to decode MQTT message, with Traceback: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/appdaemon/plugins/mqtt/mqttplugin.py", line 271, in mqtt_on_message
    payload = payload.decode()
              ^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

2024-09-18 10:47:01.173652 INFO MQTT: Unable to decode MQTT message
2024-09-18 10:47:01.174345 ERROR MQTT: Unable to decode MQTT message, with Traceback: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/appdaemon/plugins/mqtt/mqttplugin.py", line 271, in mqtt_on_message
    payload = payload.decode()
              ^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

2024-09-18 10:50:53.357415 INFO MQTT: Unable to decode MQTT message
2024-09-18 10:50:53.358181 ERROR MQTT: Unable to decode MQTT message, with Traceback: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/appdaemon/plugins/mqtt/mqttplugin.py", line 271, in mqtt_on_message
    payload = payload.decode()
              ^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

2024-09-18 10:54:47.955705 INFO MQTT: Unable to decode MQTT message
2024-09-18 10:54:47.956193 ERROR MQTT: Unable to decode MQTT message, with Traceback: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/appdaemon/plugins/mqtt/mqttplugin.py", line 271, in mqtt_on_message
    payload = payload.decode()
              ^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

2024-09-18 10:55:04.333653 INFO MQTT: Unable to decode MQTT message
2024-09-18 10:55:04.334190 ERROR MQTT: Unable to decode MQTT message, with Traceback: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/appdaemon/plugins/mqtt/mqttplugin.py", line 271, in mqtt_on_message
    payload = payload.decode()
              ^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

2024-09-18 11:00:23.826721 INFO MQTT: Unable to decode MQTT message
2024-09-18 11:00:23.827232 ERROR MQTT: Unable to decode MQTT message, with Traceback: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/appdaemon/plugins/mqtt/mqttplugin.py", line 271, in mqtt_on_message
    payload = payload.decode()
              ^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

2024-09-18 11:01:04.448018 INFO MQTT: Unable to decode MQTT message
2024-09-18 11:01:04.448690 ERROR MQTT: Unable to decode MQTT message, with Traceback: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/appdaemon/plugins/mqtt/mqttplugin.py", line 271, in mqtt_on_message
    payload = payload.decode()
              ^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

2024-09-18 11:05:19.438034 INFO MQTT: Unable to decode MQTT message
2024-09-18 11:05:19.438766 ERROR MQTT: Unable to decode MQTT message, with Traceback: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/appdaemon/plugins/mqtt/mqttplugin.py", line 271, in mqtt_on_message
    payload = payload.decode()
              ^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

2024-09-18 11:09:17.908246 INFO MQTT: Unable to decode MQTT message
2024-09-18 11:09:17.908974 ERROR MQTT: Unable to decode MQTT message, with Traceback: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/appdaemon/plugins/mqtt/mqttplugin.py", line 271, in mqtt_on_message
    payload = payload.decode()
              ^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

More information here hassio-addons/addon-appdaemon#350

Version

0.16.7

Installation type

Home Assistant add-on

Relevant log output

No response

Relevant code in the app or config file that caused the issue

No response

Anything else?

No response

@anandv85
Copy link

I'm also seeing the similar issue. This is continuously logging once every 10 seconds. Please let me know if anyone need more information to debug this issue. Thanks!

2024-09-28 20:16:31.285018 INFO AppDaemon: New client Admin Client connected
2024-09-28 20:16:52.383142 INFO MQTT: Unable to decode MQTT message
2024-09-28 20:16:52.384120 ERROR MQTT: Unable to decode MQTT message, with Traceback: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/appdaemon/plugins/mqtt/mqttplugin.py", line 271, in mqtt_on_message
    payload = payload.decode()
              ^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

2024-09-28 20:16:52.469429 INFO MQTT: Unable to decode MQTT message
2024-09-28 20:16:52.469850 ERROR MQTT: Unable to decode MQTT message, with Traceback: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/appdaemon/plugins/mqtt/mqttplugin.py", line 271, in mqtt_on_message
    payload = payload.decode()
              ^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

2024-09-28 20:17:11.707325 INFO AppDaemon: Client disconnection from Admin Client
2024-09-28 20:17:22.250166 INFO MQTT: Unable to decode MQTT message
2024-09-28 20:17:22.251115 ERROR MQTT: Unable to decode MQTT message, with Traceback: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/appdaemon/plugins/mqtt/mqttplugin.py", line 271, in mqtt_on_message
    payload = payload.decode()
              ^^^^^^^^^^^^^^^^

image

@hacscred
Copy link

From what I understand, AppDaemon addons are not supported.

So, reproduce standalone and then report it here.

@Anto79-ops
Copy link
Author

Hi @hacscred

sorry, im not sure I quite understand (probably because im just a user of AD). I'm currently using AD as an Addon in Home Assistant, and its a supported addon.

Not sure how I can use it as a standalone, you mean in docker for example?

thanks

@hacscred
Copy link

It's my understanding that Home Assistant creates a particular run-time environment, which complicates matters.

Unless the specific installation instructions are followed from the documentation by the user, I think it's a waste of time for the developers of AD.

They might feel different, but I seen to recall other issues fir which that was the case.

You aren't even saying which version of AD you are using underneath the Home Assistant configuration.

A useful bug report would generate a valid MQTT message and it would call a particular logger or it would just call the logger with a valid input. I haven't seen you prove that logging is supposed to work for the value you provided by referencing the documentation. As such all you have right now is a claim that something is wrong.

You might argue that programs should never exit (which you didn't) and you would be right, but I think that level of engineering is not done in this project not in many other Python projects.

@Anto79-ops
Copy link
Author

still happening in my logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants