mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 08:25:54 +02:00
[GH-ISSUE #1134] [Bug]: background-dispatch watchdog only logs on non-transition; queue/UI still see "started successfully" #814
Labels
No labels
A1
automated
automated
bug
bug
Closed due to inactivity
contrib
dependencies
dependencies
duplicate
enhancement
feedback
hold
invalid
Notes
P1S
pull-request
security
ThumbsUp
user-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bambuddy-maziggy-1#814
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @maziggy on GitHub (Apr 26, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/1134
Originally assigned to: @maziggy on GitHub.
Component
Bambuddy
Bug Description
When a print is sent via the background-dispatch path and the printer
never transitions out of its prior state (because of a half-broken MQTT
session, lingering FAILED/HMS state, no SD card, etc.), Bambuddy logs the
publish as
Print started successfully, marks the archive as printing,and never rolls that back. The watchdog
_verify_print_response(
backend/app/services/background_dispatch.py:897) does detect thenon-transition — it logs a WARNING and force-reconnects the MQTT session
— but it is fire-and-forget and never touches the queue/archive/WS layer.
The queue path already handles this correctly:
_watchdog_print_startin
backend/app/services/print_scheduler.py:1955reverts the queue itemto
pendingafter timeout (#967, #1078) and force-reconnects MQTT. Thebackground path needs the same treatment, or a shared implementation.
Evidence from the new support pack on #1042 (P1S sitting in
gcode_state: FAILED+ HMS0300_400C"task was canceled"):18:02:03.591 PRINT COMMAND: printer=3, ... caller=background_dispatch.py:539:_process_job
18:02:03.592 Sending print command: ... task_id: 1167547522
(UI/archive marked successful)
18:02:18.596 WARNING [background_dispatch] Printer (3) did not respond
to print command within 15s (state still FINISH)
18:02:18.597 WARNING [bambu_mqtt] Forcing MQTT reconnect: ...
(no state change to UI/archive)
Expected Behavior
When
_verify_print_responsetimes out:state) so the UI doesn't show a successful dispatch.
printer_status/archive_updatedWebSocket update so thefrontend reflects it without polling.
force_reconnect_stale_sessionrecovery.Two related observations while we're in there:
subtask_idadvancing pastpre_subtask_idas a definitive "command landed" signal (see #1078 —H2D can sit at FINISH for ~50 s after accepting
project_file)._verify_print_responsedoesn't use this and could false-warn on slowH2D transitions; should mirror the queue logic.
fixes only land in one place.
Steps to Reproduce
0300_400C).the printer card, etc.).
transitions; only a backend WARNING is logged 15 s later.
Printer Model
None
Bambuddy Version
all
SpoolBuddy Version
No response
Printer Firmware Version
No response
Installation Method
Manual (git clone)
Operating System
Linux (Ubuntu/Debian)
Relevant Logs / Support Package
Follow-up to #1042 — the int32 task_id fix landed in
0.2.3.2is verifiedworking in the most recent support pack on that thread; this issue
captures the second item from the original report ("Don't treat
project_file result=success as dispatch success").
Code references:
backend/app/services/background_dispatch.py:897—_verify_print_responsebackend/app/services/print_scheduler.py:1955—_watchdog_print_start(model to copy)backend/app/services/print_scheduler.py:1844— clearer of theawaiting_plate_clearflag during retry, also relevant to UI syncScreenshots
No response
Additional Context
No response
Checklist
@maziggy commented on GitHub (Apr 26, 2026):
Available/Fixed in branch dev and available with the next release or daily build.
If you find Bambuddy useful, please consider giving it a ⭐ on GitHub — it helps others discover the project!