[GH-ISSUE #549] [Bug]: Printer Status unknown #357

Closed
opened 2026-05-06 12:28:35 +02:00 by BreizhHardware · 2 comments

Originally created by @RealMerlin on GitHub (Feb 28, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/549

Originally assigned to: @maziggy on GitHub.

Bug Description

A1 Mini Status is suddenly showing "unknown", temperatures are 0°C and no AMS is showing.

Expected Behavior

Showing Status Idle, real temperatures and AMS.

Steps to Reproduce

Click on "reconnect" at A1 Mini

Printer Model

A1 Mini

Bambuddy Version

v0.2.1

Printer Firmware Version

01.07.02.00

Installation Method

Manual (git clone)

Operating System

Linux (Ubuntu/Debian)

Relevant Logs / Support Package

Screenshots

Image

Additional Context

Printer was already added and worked the last weeks normal.
I tried to re add the Printer and Downgraded to 0.2.1b2/0.2.1b (docker container)
Lastly I reinstalled native on Ubuntu from git (0.2.1).

I tried to investigate a little bit.
An Exception is Throwing at ./backend/app/services/bambu_mqtt.py", line 445
payload = json.loads(msg.payload.decode())
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbe in position 2368: invalid start byte

So I tried:
payload = json.loads(msg.payload.decode('utf-8', errors='ignore'))

The Printer is now showing normal, as expected. But i think this could not be the end solution 😄

Checklist

  • I have searched existing issues to ensure this bug hasn't already been reported
  • I am using the latest version of Bambuddy
  • My printer is set to LAN Only mode
  • My printer has Developer Mode enabled
Originally created by @RealMerlin on GitHub (Feb 28, 2026). Original GitHub issue: https://github.com/maziggy/bambuddy/issues/549 Originally assigned to: @maziggy on GitHub. ### Bug Description A1 Mini Status is suddenly showing "unknown", temperatures are 0°C and no AMS is showing. ### Expected Behavior Showing Status Idle, real temperatures and AMS. ### Steps to Reproduce Click on "reconnect" at A1 Mini ### Printer Model A1 Mini ### Bambuddy Version v0.2.1 ### Printer Firmware Version 01.07.02.00 ### Installation Method Manual (git clone) ### Operating System Linux (Ubuntu/Debian) ### Relevant Logs / Support Package ```shell ``` ### Screenshots <img width="484" height="559" alt="Image" src="https://github.com/user-attachments/assets/98de486e-e5f6-495e-b20e-b4ae8ad6077a" /> ### Additional Context Printer was already added and worked the last weeks normal. I tried to re add the Printer and Downgraded to 0.2.1b2/0.2.1b (docker container) Lastly I reinstalled native on Ubuntu from git (0.2.1). I tried to investigate a little bit. An Exception is Throwing at ./backend/app/services/bambu_mqtt.py", line 445 payload = json.loads(msg.payload.decode()) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbe in position 2368: invalid start byte So I tried: payload = json.loads(msg.payload.decode('utf-8', errors='ignore')) The Printer is now showing normal, as expected. But i think this could not be the end solution 😄 ### Checklist - [x] I have searched existing issues to ensure this bug hasn't already been reported - [x] I am using the latest version of Bambuddy - [x] My printer is set to LAN Only mode - [x] My printer has Developer Mode enabled
BreizhHardware 2026-05-06 12:28:35 +02:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@RealMerlin commented on GitHub (Feb 28, 2026):

Support Package: bambuddy-support-20260228-074248.zip

<!-- gh-comment-id:3976722748 --> @RealMerlin commented on GitHub (Feb 28, 2026): Support Package: [bambuddy-support-20260228-074248.zip](https://github.com/user-attachments/files/25620177/bambuddy-support-20260228-074248.zip)
Author
Owner

@maziggy commented on GitHub (Feb 28, 2026):

Thanks for the detailed report and investigation — that UnicodeDecodeError was spot-on.

The MQTT message handler used strict UTF-8 decoding and only caught json.JSONDecodeError, not UnicodeDecodeError. When your A1 Mini sent a payload with a non-UTF-8 byte (0xBE at position 2368), the entire message was silently dropped — which is why status showed "unknown", temps were 0°C, and AMS disappeared.

This isn't a regression in 0.2.1 — the bug has been there since day one, but it only triggers when a printer sends non-standard bytes in its MQTT payload. That's why it's a one-off rather than affecting all A1 users. It was likely caused by something specific in your printer's state (a filament profile name, gcode filename, or print job metadata with unusual characters).

Fixed in branch 0.2.2b1 — we now catch the decode error and fall back to errors="replace", which keeps the JSON parseable while marking problem bytes. Your errors='ignore' workaround was the right instinct, though replace is safer since ignore can shift byte positions.

<!-- gh-comment-id:3976736614 --> @maziggy commented on GitHub (Feb 28, 2026): Thanks for the detailed report and investigation — that UnicodeDecodeError was spot-on. The MQTT message handler used strict UTF-8 decoding and only caught json.JSONDecodeError, not UnicodeDecodeError. When your A1 Mini sent a payload with a non-UTF-8 byte (0xBE at position 2368), the entire message was silently dropped — which is why status showed "unknown", temps were 0°C, and AMS disappeared. This isn't a regression in 0.2.1 — the bug has been there since day one, but it only triggers when a printer sends non-standard bytes in its MQTT payload. That's why it's a one-off rather than affecting all A1 users. It was likely caused by something specific in your printer's state (a filament profile name, gcode filename, or print job metadata with unusual characters). Fixed in branch 0.2.2b1 — we now catch the decode error and fall back to errors="replace", which keeps the JSON parseable while marking problem bytes. Your errors='ignore' workaround was the right instinct, though replace is safer since ignore can shift byte positions.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy#357
No description provided.