mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 08:25:54 +02:00
[GH-ISSUE #774] [Bug]: Duplicate archive entry when Bambuddy restarts during active print #514
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#514
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 @leisegang on GitHub (Mar 20, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/774
Originally assigned to: @maziggy on GitHub.
Bug Description
I have this problem when i start at 19. mars 2026, 22:14 and it finishes at 20. mars 2026, 03:19. it is stored as 2 prints in the archive. It also adds double filament and so on.

This is making the stats wrong. and gives wrong data.
Expected Behavior
i expected it to not duplicate.
Steps to Reproduce
start a print before midnight
Finish after midnight
Printer Model
H2D
Bambuddy Version
0.2.2
Printer Firmware Version
01.03.00.00
Installation Method
Docker
Operating System
Docker
Relevant Logs / Support Package
bambuddy-support-20260320-164133.zip
Screenshots
No response
Additional Context
No response
Checklist
@maziggy commented on GitHub (Mar 21, 2026):
I checked the logs and the root cause is a server restart during the print, not a midnight boundary issue:
2026-03-20 03:19:13 — Bambuddy starting (server restart)
2026-03-20 03:19:17 — PRINT START detected (duplicate — reconnect sees RUNNING state as new print)
2026-03-20 03:19:17 — Original archive 204 marked as cancelled (age 5h > 4h stale threshold)
2026-03-20 03:19:17 — New duplicate archive created
2026-03-20 03:37:02 — PRINT COMPLETE updates the duplicate archive
The print started at 22:14 on Mar 19, and when Bambuddy restarted at 03:19 on Mar 20 (5 hours later), it reconnected to the printer, saw gcode_state: RUNNING, and treated it as a brand new print — creating a duplicate archive entry.
In general, restarting Bambuddy during an active print can cause tracking issues like this. We're looking into making the restart recovery more robust, but for now I'd recommend avoiding restarts while prints are running.
You can safely delete the duplicate archive entry from the Archives page to fix your stats.