mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 05:35:30 +02:00
[GH-ISSUE #1212] [Bug]: Archive created successfully but fails to load on reprint/view #878
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
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#878
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 @abbasegbeyemi on GitHub (May 5, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/1212
Originally assigned to: @maziggy on GitHub.
Component
Bambuddy
Bug Description
When triggering a reprint or attempting to view the G-code of a completed print, Bambuddy reports that the archive cannot be found or may have been deleted — despite the archive appearing to have been created successfully at print completion.
Expected Behavior
The archive should be viewable/reprintable
Steps to Reproduce
{"detail": "not found"}Printer Model
H2C
Bambuddy Version
v0.2.4b2 (Daily)
SpoolBuddy Version
No response
Printer Firmware Version
No response
Installation Method
Docker
Operating System
Linux (Ubuntu/Debian)
Relevant Logs / Support Package
bambuddy-support-20260505-075651.zip
Screenshots
No response
Additional Context
No response
Checklist
@maziggy commented on GitHub (May 5, 2026):
Confirmed and fixed. This is a regression that's been silently destroying archive copies on every print completion since the daily build on Apr 29.
Root cause: a cover-thumbnail optimisation registered the live archive 3mf in a shared download cache so /cover could skip a
redundant FTP fetch mid-print. The cache cleanup that runs on on_print_complete then walked the cache and unlinked every path it knew about — which, post-optimisation, included your actual archive copy. The DB row was untouched, so the archive kept showing up in the list; only when you tried to act on it (Reprint / View G-code) did the missing file surface as a 404.
Your support log was the smoking gun: the print finished at 07:10:48, the cleanup ran, and at 07:15:13 your reprint returned 404 — exactly the window the bug fires in.
The fix lands in the next daily build (today). It gates the cleanup so it only touches files inside archive_dir/temp/ — archive copies under archive/<printer_id>/... and archive/unassigned/... are now left alone, as are library file bytes. A regression test pins the contract so this can't drift.
Bad news: the bytes that were already deleted on your install can't be recovered by this fix — they're gone from disk. Recovery options if you still want those specific archives:
Going forward, archives created on builds with this fix are safe. Apologies for the silent data loss — this one is on us.
Available/Fixed in branch dev and available with the next release or daily build. Please let me know if it works for you.
If you find Bambuddy useful, please consider giving it a ⭐ on GitHub — it helps others discover the project!