[GH-ISSUE #374] [Bug]: Prints Starting without user input #236

Closed
opened 2026-05-06 12:27:29 +02:00 by BreizhHardware · 18 comments

Originally created by @hollycroftlabs on GitHub (Feb 14, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/374

Originally assigned to: @maziggy on GitHub.

Bug Description

I have a small test setup - 1 printer - 1 file. I submitted a print from the file menu yesterday that finished successfully. The archive reflects this successful print.

Since then that file has been sent to the printer twice without any input from me and the queue in the front end is empty.

Expected Behavior

No repeat prints without user input

Steps to Reproduce

N/A

Printer Model

P1S

Bambuddy Version

0.1.9

Printer Firmware Version

01.09.01.00

Installation Method

Docker

Operating System

Linux (Ubuntu/Debian)

Relevant Logs / Support Package

Unable to download support package - download never completes (is this another bug?)

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
Originally created by @hollycroftlabs on GitHub (Feb 14, 2026). Original GitHub issue: https://github.com/maziggy/bambuddy/issues/374 Originally assigned to: @maziggy on GitHub. ### Bug Description I have a small test setup - 1 printer - 1 file. I submitted a print from the file menu yesterday that finished successfully. The archive reflects this successful print. Since then that file has been sent to the printer twice without any input from me and the queue in the front end is empty. ### Expected Behavior No repeat prints without user input ### Steps to Reproduce N/A ### Printer Model P1S ### Bambuddy Version 0.1.9 ### Printer Firmware Version 01.09.01.00 ### Installation Method Docker ### Operating System Linux (Ubuntu/Debian) ### Relevant Logs / Support Package ```shell Unable to download support package - download never completes (is this another bug?) ``` ### 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
BreizhHardware 2026-05-06 12:27:29 +02:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@maziggy commented on GitHub (Feb 14, 2026):

As already agreed on Discord, please ttry to reproduce the issue and send us a support package.

<!-- gh-comment-id:3901794387 --> @maziggy commented on GitHub (Feb 14, 2026): As already agreed on Discord, please ttry to reproduce the issue and send us a support package.
Author
Owner

@hollycroftlabs commented on GitHub (Feb 14, 2026):

Ok, i printed something this afternoon, i started debug mode and then it started a print on its own at 17:48. I have the logs (attached)

bambuddy-support-20260214-211416.zip

<!-- gh-comment-id:3902544219 --> @hollycroftlabs commented on GitHub (Feb 14, 2026): Ok, i printed something this afternoon, i started debug mode and then it started a print on its own at 17:48. I have the logs (attached) [bambuddy-support-20260214-211416.zip](https://github.com/user-attachments/files/25318550/bambuddy-support-20260214-211416.zip)
Author
Owner

@maziggy commented on GitHub (Feb 15, 2026):

The log only covers 20:58-21:14?!

<!-- gh-comment-id:3904107170 --> @maziggy commented on GitHub (Feb 15, 2026): The log only covers 20:58-21:14?!
Author
Owner

@maziggy commented on GitHub (Feb 15, 2026):

The log rotated. Can you please check if the rotated logfiles still have the time range around 17:48?

<!-- gh-comment-id:3904182743 --> @maziggy commented on GitHub (Feb 15, 2026): The log rotated. Can you please check if the rotated logfiles still have the time range around 17:48?
Author
Owner

@hollycroftlabs commented on GitHub (Feb 15, 2026):

Doesn't appear so, it was 4/5 hours between the successful completion of the last print before it start printing again. Im printing again today so will try and catch it.

How often does the log rotate?

<!-- gh-comment-id:3904274852 --> @hollycroftlabs commented on GitHub (Feb 15, 2026): Doesn't appear so, it was 4/5 hours between the successful completion of the last print before it start printing again. Im printing again today so will try and catch it. How often does the log rotate?
Author
Owner

@maziggy commented on GitHub (Feb 15, 2026):

Depends on the number of logs created ;)

<!-- gh-comment-id:3904299138 --> @maziggy commented on GitHub (Feb 15, 2026): Depends on the number of logs created ;)
Author
Owner

@DIYofThings commented on GitHub (Feb 15, 2026):

I am also hitting this issue on my P1S (China version, LAN mode, Bambuddy 0.1.9).

I found a very specific behavior regarding how to stop it:

  • The ghost print starts automatically every time I power cycle (Off/On) the printer, even if the previous job was already finished or canceled.
  • I tried clearing the /cache/ folder on the SD card, but it did not help. The printer still starts the job again on the next boot.
  • The only way I could stop the ghost print loop was to manually delete the source file (.3mf / .gcode) from the root of the SD card.

It seems the printer "clings" to the file in the root directory until it's physically removed. Hope this helps the investigation!

<!-- gh-comment-id:3904721993 --> @DIYofThings commented on GitHub (Feb 15, 2026): I am also hitting this issue on my P1S (China version, LAN mode, Bambuddy 0.1.9). I found a very specific behavior regarding how to stop it: - The ghost print starts automatically every time I power cycle (Off/On) the printer, even if the previous job was already finished or canceled. - I tried clearing the /cache/ folder on the SD card, but it did not help. The printer still starts the job again on the next boot. - The only way I could stop the ghost print loop was to manually delete the source file (.3mf / .gcode) from the root of the SD card. It seems the printer "clings" to the file in the root directory until it's physically removed. Hope this helps the investigation!
Author
Owner

@maziggy commented on GitHub (Feb 15, 2026):

This is very helpful! Thanks!!!

<!-- gh-comment-id:3904743675 --> @maziggy commented on GitHub (Feb 15, 2026): This is very helpful! Thanks!!!
Author
Owner

@maziggy commented on GitHub (Feb 16, 2026):

Seems only to happen with some printer models. JUst tested with H2D and X1C and coudn't reproduce. Anyway....we need to delete the file from printer after print has finished.

Let me see....

<!-- gh-comment-id:3906813848 --> @maziggy commented on GitHub (Feb 16, 2026): Seems only to happen with some printer models. JUst tested with H2D and X1C and coudn't reproduce. Anyway....we need to delete the file from printer after print has finished. Let me see....
Author
Owner

@maziggy commented on GitHub (Feb 16, 2026):

@DIYofThings can you please check again with branch 0.2.0b and let me know how it goes?

<!-- gh-comment-id:3906819501 --> @maziggy commented on GitHub (Feb 16, 2026): @DIYofThings can you please check again with branch 0.2.0b and let me know how it goes?
Author
Owner

@DIYofThings commented on GitHub (Feb 16, 2026):

Hi @maziggy,

Thanks for the v0.2.0b update! I’ve been testing the new ghost print cleanup logic and found a small bug that affects users who have auto_archive disabled.

The Issue: In main.py, the on_print_complete function returns early if no archive record is found. Since the cleanup logic is currently placed after this check, it never executes for users who have archiving turned off.

Suggested Fix: Moving the cleanup block to the very beginning of on_print_complete (before the early return) ensures it runs regardless of the archiving setting.

I also found that adding a small retry loop (3 attempts with a 2s delay) and checking for both .3mf and .gcode extensions improves reliability significantly, as the printer sometimes still "locks" the file system for a few seconds after the job ends.

I've verified this "robust" approach locally on my P1S and it successfully eliminates the ghost prints even with archiving disabled.

Thanks again for the great work!

<!-- gh-comment-id:3909405691 --> @DIYofThings commented on GitHub (Feb 16, 2026): Hi @maziggy, Thanks for the v0.2.0b update! I’ve been testing the new ghost print cleanup logic and found a small bug that affects users who have auto_archive disabled. The Issue: In main.py, the on_print_complete function returns early if no archive record is found. Since the cleanup logic is currently placed after this check, it never executes for users who have archiving turned off. Suggested Fix: Moving the cleanup block to the very beginning of on_print_complete (before the early return) ensures it runs regardless of the archiving setting. I also found that adding a small retry loop (3 attempts with a 2s delay) and checking for both .3mf and .gcode extensions improves reliability significantly, as the printer sometimes still "locks" the file system for a few seconds after the job ends. I've verified this "robust" approach locally on my P1S and it successfully eliminates the ghost prints even with archiving disabled. Thanks again for the great work!
Author
Owner

@maziggy commented on GitHub (Feb 17, 2026):

Very good catch! Applied patch to branch 0.0.2b as you suggested. Thanks!

<!-- gh-comment-id:3912533594 --> @maziggy commented on GitHub (Feb 17, 2026): Very good catch! Applied patch to branch 0.0.2b as you suggested. Thanks!
Author
Owner

@kainpl commented on GitHub (Mar 30, 2026):

I found an alternative solution for the ghost print issue. Instead of deleting the 3MF file from the SD card root after a print, move it to /cache/ using FTP RENAME. The printer's firmware doesn't scan /cache/ for auto-start on boot, but the file remains accessible in the printer's "History" screen.
Through testing I also discovered that the ghost print problem isn't purely about the file being present on SD - there's a firmware state component. Even if you delete the file immediately after print completion, a manual reboot will still trigger a ghost print attempt (the printer tries to start the now-missing file and fails). This appears to be tied to the printer's internal MQTT state which persists until all post-print tasks complete (likely nozzle cooldown).
Once enough time passes after completion, the state clears and reboot no longer triggers a ghost print.

So the reliable approach is: after print completion, move the 3MF from / to /cache/ via FTP RENAME. This way even an immediate reboot won't cause a ghost print - the firmware's internal state may still reference the file, but since the root directory is empty, there's nothing to auto-start. And the file safely sits in /cache/ accessible from History if needed.

<!-- gh-comment-id:4157190803 --> @kainpl commented on GitHub (Mar 30, 2026): I found an alternative solution for the ghost print issue. Instead of deleting the 3MF file from the SD card root after a print, move it to /cache/ using FTP RENAME. The printer's firmware doesn't scan /cache/ for auto-start on boot, but the file remains accessible in the printer's "History" screen. Through testing I also discovered that the ghost print problem isn't purely about the file being present on SD - there's a firmware state component. Even if you delete the file immediately after print completion, a manual reboot will still trigger a ghost print attempt (the printer tries to start the now-missing file and fails). This appears to be tied to the printer's internal MQTT state which persists until all post-print tasks complete (likely nozzle cooldown). Once enough time passes after completion, the state clears and reboot no longer triggers a ghost print. So the reliable approach is: after print completion, move the 3MF from / to /cache/ via FTP RENAME. This way even an immediate reboot won't cause a ghost print - the firmware's internal state may still reference the file, but since the root directory is empty, there's nothing to auto-start. And the file safely sits in /cache/ accessible from History if needed.
Author
Owner

@maziggy commented on GitHub (Mar 31, 2026):

From the firmware perspective, what's the difference between deleteing the file, or moving it to another location? If the firmware still references the file and tries to print it after power cycle, I think it doesn't matter if you deleted it, or moved it away.

Or did i miss something?

<!-- gh-comment-id:4160487855 --> @maziggy commented on GitHub (Mar 31, 2026): From the firmware perspective, what's the difference between deleteing the file, or moving it to another location? If the firmware still references the file and tries to print it after power cycle, I think it doesn't matter if you deleted it, or moved it away. Or did i miss something?
Author
Owner

@kainpl commented on GitHub (Mar 31, 2026):

As I mentioned above - even if the file is deleted immediately after print completion, a manual reboot will still trigger a ghost print attempt (the printer tries to start the now-missing file and fails). This appears to be tied to the printer's internal MQTT state, which persists until all post-print tasks complete (likely nozzle cooldown). So from that perspective alone - yes, you're right, deleting vs. moving makes no difference.

However, you're overlooking the farm use case. Sometimes we need to restart a print directly from the printer itself, rather than having to pick up the finished print, walk to the office/another room, and re-launch the job from there. So while the logic is sound, it creates a practical inconvenience for farm operators.

<!-- gh-comment-id:4161615863 --> @kainpl commented on GitHub (Mar 31, 2026): As I mentioned above - even if the file is deleted immediately after print completion, a manual reboot will still trigger a ghost print attempt (the printer tries to start the now-missing file and fails). This appears to be tied to the printer's internal MQTT state, which persists until all post-print tasks complete (likely nozzle cooldown). So from that perspective alone - yes, you're right, deleting vs. moving makes no difference. However, you're overlooking the farm use case. Sometimes we need to restart a print directly from the printer itself, rather than having to pick up the finished print, walk to the office/another room, and re-launch the job from there. So while the logic is sound, it creates a practical inconvenience for farm operators.
Author
Owner

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

The /cache/ move is a clever workaround, but not all printer models have a /cache/ folder, and reworking the file cleanup logic to handle model-specific directory support adds complexity we'd rather avoid. The ghost print issue itself is resolved, so I'll keep this closed. If there's demand for a "keep file on printer for reprints" feature down the line, we can revisit it as a separate request.

<!-- gh-comment-id:4168076770 --> @maziggy commented on GitHub (Apr 1, 2026): The /cache/ move is a clever workaround, but not all printer models have a /cache/ folder, and reworking the file cleanup logic to handle model-specific directory support adds complexity we'd rather avoid. The ghost print issue itself is resolved, so I'll keep this closed. If there's demand for a "keep file on printer for reprints" feature down the line, we can revisit it as a separate request.
Author
Owner

@froust-company commented on GitHub (May 2, 2026):

i have this isse even though i deleted all of the cache folder, every time i start the printer it still tries to start this print but because file is not there it gives me SD card data damaged error. it's A1 and last bambuddy version

<!-- gh-comment-id:4362969687 --> @froust-company commented on GitHub (May 2, 2026): i have this isse even though i deleted all of the cache folder, every time i start the printer it still tries to start this print but because file is not there it gives me SD card data damaged error. it's A1 and last bambuddy version
Author
Owner

@maziggy commented on GitHub (May 2, 2026):

i have this isse even though i deleted all of the cache folder, every time i start the printer it still tries to start this print but because file is not there it gives me SD card data damaged error. it's A1 and last bambuddy version

Please open a new issue and attach a support package.

<!-- gh-comment-id:4363106888 --> @maziggy commented on GitHub (May 2, 2026): > i have this isse even though i deleted all of the cache folder, every time i start the printer it still tries to start this print but because file is not there it gives me SD card data damaged error. it's A1 and last bambuddy version Please open a new issue and attach a support package.
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#236
No description provided.