mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 08:25:54 +02:00
[GH-ISSUE #1042] [Bug]: Unable to despatch print jobs due to task_id bounding #736
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#736
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 @EdwardChamberlain on GitHub (Apr 19, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/1042
Originally assigned to: @maziggy on GitHub.
Component
Bambuddy
Bug Description
Background dispatch could report success even when the printer did not actually start. The MQTT project_file response returned result: success, but on my P1S the printer stayed IDLE, later reported FAILED, and never moved into PREPARE or RUNNING.
Root causes found:
Required fix:
Evidence:
Failing P1S command used 13-digit IDs like 1776636009678.
Printer then reported task_id: 2147483647, gcode_state: FAILED, empty gcode_file, and did not move.
After changing IDs to signed-31-bit range and using the concrete 3MF bed type, the P1S dispatch started correctly.
Expected Behavior
Print despatches and print starts.
Steps to Reproduce
Click print,
upload file,
despatch "successful"
not print begins
Printer Model
P1S
Bambuddy Version
v0.2.4b1[dev branch]
SpoolBuddy Version
No response
Printer Firmware Version
01.10.00.00
Installation Method
Manual (git clone)
Operating System
macOS
Relevant Logs / Support Package
bambuddy-support-20260419-231950.zip
Screenshots
No response
Additional Context
No response
Checklist
@EdwardChamberlain commented on GitHub (Apr 19, 2026):
github.com/maziggy/bambuddy@5303673582/backend/app/services/bambu_mqtt.py (L3023-L3024)Should probably be:
@maziggy commented on GitHub (Apr 20, 2026):
Good catch — your analysis is exactly right, and the mod-by-INT32_MAX fix is landing on dev as-is (with or 1 guarding the zero edge case, as you wrote). Regression test asserts all three IDs < 2**31 so this can't regress silently.
On your other three points:
For now the int32 fix alone should get your P1S dispatching reliably on the next daily build — please confirm when you've tested it. Thanks again for the detailed repro with the exact IDs.
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!
@EdwardChamberlain commented on GitHub (Apr 25, 2026):
Confirm working.
There are still cases that the P1S fails to begin such as when the printer is in a serious error state (SD card failed seems to do it). This is fine, but the UI reports despatch success which is slightly misleading as it is still using the transmission as success criteria. As mentioned here:
This seems to differ from the queue behaviour which looks to have a watchdog style check to confirm despatch.
Do you want me to raise a separate issue for this as it looks like there isnt one for this.
@EdwardChamberlain commented on GitHub (Apr 25, 2026):
Actually looks like this is not fixed. Still seeing issues with background despatch and queues. Not sure if this is the timestamping or something else but same symptoms - no job starts. This is present in both latest release and dev branch.
bambuddy-support-20260425-180219.zip
@maziggy commented on GitHub (Apr 26, 2026):
Thanks for the new support pack. I want to split this into the two things that have been getting tangled together, because the new logs actually confirm one of them:
1. The int32 fix is working — verified by your own logs.
The two
project_filedispatches in the new pack are:18:00:15.351(queue path) →task_id: 116743928218:02:03.592(background path) →task_id: 1167547522Both well below 2^31-1 (2147483647), and both match 'int(time.time() * 1000) % 2_147_483_647` exactly for the timestamps
shown. The original 13-digit / clamped-to-INT32-max symptom does not appear anywhere in this log. So the root cause #1042 was opened for is demonstrably gone.
2. What's still failing is the second item from your original list,
not the int32 piece.
Printer 3 (P1S) is sitting in
gcode_state: FAILEDfrom the very first MQTT message in the log, with HMS0300_400C("The task was canceled"). Both dispatches succeed at the MQTT level — the printer accepts them — but it never leaves the prior FAILED/cancelled state. The watchdog you asked about does fire on the background-dispatch attempt:So
_verify_print_responseis detecting the non-transition correctly (this is the work from #887 / #936 / #967 / #1078). What it doesn't do yet is propagate that signal back to the queue item / archive / WebSocket — it's fire-and-forget, only warns and reconnects MQTT. The UI therefore keeps the optimistic "Print started successfully" message thatprint_schedulerlogs immediately after the publish. That's exactly the residual you flagged in your follow-up comment last week:I'll track this remaining piece (wire the watchdog's "did not respond" outcome back to the queue/archive/UI as a real failure, not just a log warning) as its own issue — the same one I owed you. The
bed_type: "auto"cleanup is still also outstanding and gets its own issue.Leaving #1042 closed since the int32 root cause is fixed; the residual is genuinely a different bug class (success-reporting vs. ID generation), so having it tracked separately keeps the history readable. Will link both follow-ups back here once filed.
@maziggy commented on GitHub (Apr 26, 2026):
https://github.com/maziggy/bambuddy/issues/1042
https://github.com/maziggy/bambuddy/issues/1135