1
0
Fork 0
mirror of https://github.com/maziggy/bambuddy.git synced 2026-05-09 08:25:54 +02:00

[GH-ISSUE #1032] [Bug]:Large .3mf files corrupted during archiving — "File is not a zip file" #725

Closed
opened 2026-05-07 00:13:12 +02:00 by BreizhHardware · 4 comments

Originally created by @saint-hh on GitHub (Apr 19, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/1032

Originally assigned to: @maziggy on GitHub.

Component

Bambuddy

Bug Description

Environment

  • BamBuddy Version: v0.2.3
  • Installation: Bare metal (no Docker)
  • Hardware: Raspberry Pi 4B
  • OS: Raspberry Pi OS (Python 3.11)
  • Slicer: Bambu Studio

Description

Sending to the virtual Bambuddy printer, small print jobs are archived correctly with thumbnails and metadata. Larger .3mf files are received via FTP without errors, but when BamBuddy tries to parse the archive, it fails with:

WARNING [backend.app.api.routes.archives] Failed to parse plates from archive 3: File is not a zip file

As a result, no thumbnail, no plate info, and no filament metadata is shown for the archive.

Actual Behavior

Archive appears in the list but without thumbnail, plate info, or filament data. Warning logged: File is not a zip file.

Diagnosis

Verified the archived file is not a valid ZIP:

python3 -c "import zipfile; print(zipfile.is_zipfile('/home/pi/bambuddy/data/archives/3/file.gcode.3mf'))"
# Returns: False

The original file in the FTP upload directory returns True, meaning the corruption happens during archiving, not during FTP transfer. This suggests a race condition where archiving begins before the FTP write is fully flushed/closed.

Additional Notes

  • Small files (tested successfully) work without issues
  • Issue is reproducible with files ~18 MB and likely affects any file above a certain size threshold
  • The FTP upload itself completes without errors

Expected Behavior

Archive is parsed correctly, thumbnail and metadata are displayed — same as with small files.

Steps to Reproduce

  1. Send a large print job (~18 MB .3mf) from Bambu Studio to the BamBuddy virtual printer
  2. FTP upload completes successfully
  3. Archive is created
  4. Open the archive in BamBuddy — thumbnail and metadata are missing

Printer Model

None

Bambuddy Version

0.2.3

SpoolBuddy Version

No response

Printer Firmware Version

No response

Installation Method

Manual (git clone)

Operating System

Linux (Ubuntu/Debian)

Relevant Logs / Support Package

INFO  FTP saved file: /home/pi/bambuddy/virtual_printer/uploads/1/3xCamera_Protection_Matrice_4T.gcode.3mf (18333696 bytes)
INFO  [VP Bambuddy] Received file: 3xLarge.gcode.3mf from 192.168.1.119
INFO  [VP Bambuddy] Archived: 3 - 3xLarge.gcode
WARNING Failed to parse plates from archive 3: File is not a zip file

Screenshots

No response

Additional Context

No response

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 @saint-hh on GitHub (Apr 19, 2026). Original GitHub issue: https://github.com/maziggy/bambuddy/issues/1032 Originally assigned to: @maziggy on GitHub. ### Component Bambuddy ### Bug Description ### Environment - **BamBuddy Version:** v0.2.3 - **Installation:** Bare metal (no Docker) - **Hardware:** Raspberry Pi 4B - **OS:** Raspberry Pi OS (Python 3.11) - **Slicer:** Bambu Studio ### Description Sending to the virtual Bambuddy printer, small print jobs are archived correctly with thumbnails and metadata. Larger `.3mf` files are received via FTP without errors, but when BamBuddy tries to parse the archive, it fails with: ``` WARNING [backend.app.api.routes.archives] Failed to parse plates from archive 3: File is not a zip file ``` As a result, no thumbnail, no plate info, and no filament metadata is shown for the archive. ### Actual Behavior Archive appears in the list but without thumbnail, plate info, or filament data. Warning logged: `File is not a zip file`. ### Diagnosis Verified the archived file is not a valid ZIP: ```bash python3 -c "import zipfile; print(zipfile.is_zipfile('/home/pi/bambuddy/data/archives/3/file.gcode.3mf'))" # Returns: False ``` The original file in the FTP upload directory returns `True`, meaning the corruption happens **during archiving**, not during FTP transfer. This suggests a race condition where archiving begins before the FTP write is fully flushed/closed. ### Additional Notes - Small files (tested successfully) work without issues - Issue is reproducible with files ~18 MB and likely affects any file above a certain size threshold - The FTP upload itself completes without errors ### Expected Behavior Archive is parsed correctly, thumbnail and metadata are displayed — same as with small files. ### Steps to Reproduce 1. Send a large print job (~18 MB .3mf) from Bambu Studio to the BamBuddy virtual printer 2. FTP upload completes successfully 3. Archive is created 4. Open the archive in BamBuddy — thumbnail and metadata are missing ### Printer Model None ### Bambuddy Version 0.2.3 ### SpoolBuddy Version _No response_ ### Printer Firmware Version _No response_ ### Installation Method Manual (git clone) ### Operating System Linux (Ubuntu/Debian) ### Relevant Logs / Support Package ``` INFO FTP saved file: /home/pi/bambuddy/virtual_printer/uploads/1/3xCamera_Protection_Matrice_4T.gcode.3mf (18333696 bytes) INFO [VP Bambuddy] Received file: 3xLarge.gcode.3mf from 192.168.1.119 INFO [VP Bambuddy] Archived: 3 - 3xLarge.gcode WARNING Failed to parse plates from archive 3: File is not a zip file ``` ### Screenshots _No response_ ### Additional Context _No response_ ### 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-07 00:13:12 +02:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@maziggy commented on GitHub (Apr 19, 2026):

Please upload a support package -> https://wiki.bambuddy.cool/features/system-info/?h=debug#enable-debug-logging

<!-- gh-comment-id:4275744584 --> @maziggy commented on GitHub (Apr 19, 2026): Please upload a support package -> https://wiki.bambuddy.cool/features/system-info/?h=debug#enable-debug-logging
Author
Owner

@saint-hh commented on GitHub (Apr 19, 2026):

Here you go:

bambuddy-support-20260419-125734.zip

Image
<!-- gh-comment-id:4275753206 --> @saint-hh commented on GitHub (Apr 19, 2026): Here you go: [bambuddy-support-20260419-125734.zip](https://github.com/user-attachments/files/26867941/bambuddy-support-20260419-125734.zip) <img width="810" height="563" alt="Image" src="https://github.com/user-attachments/assets/bc8091ae-54f3-4ed1-8868-0c99d724b494" />
Author
Owner

@maziggy commented on GitHub (Apr 19, 2026):

Available/Fixed in branch dev and available with the next release or daily build. Please let me know if it works for you now.


If you find Bambuddy useful, please consider giving it a on GitHub — it helps others discover the project!

<!-- gh-comment-id:4275819574 --> @maziggy commented on GitHub (Apr 19, 2026): Available/Fixed in branch dev and available with the next release or daily build. Please let me know if it works for you now. ----- If you find Bambuddy useful, please consider giving it a ⭐ on [GitHub](https://github.com/maziggy/bambuddy) — it helps others discover the project!
Author
Owner

@saint-hh commented on GitHub (Apr 20, 2026):

Fix confirmed with v0.2.3.1

Image
<!-- gh-comment-id:4282242626 --> @saint-hh commented on GitHub (Apr 20, 2026): Fix confirmed with v0.2.3.1 <img width="1320" height="2107" alt="Image" src="https://github.com/user-attachments/assets/1509497a-04aa-43c3-acb6-70d5a2dc4d00" />
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-maziggy-1#725
No description provided.