[GH-ISSUE #697] [Bug]: Chicken-and-egg: Cannot enable Advanced Authentication without sending test email, cannot send test email without enabling Advanced Authentication #465

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

Originally created by @luckygreen on GitHub (Mar 14, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/697

Originally assigned to: @shrunbr on GitHub.

Bug Description

SMTP authentication fails with "Username and Password are required when
authentication is enabled" despite both fields being populated in the UI
and confirmed present in the database. Additionally, the Advanced
Authentication enable flow has a circular dependency: clicking "Enable"
requires a test email to be sent first, but the "Send Test Email" button
is grayed out and non-interactive until auth is enabled.

Expected Behavior

SMTP test email sends successfully when username and password are
configured. The "Send Test Email" button should be functional
independently of auth state, so SMTP can be verified before enabling
Advanced Authentication.

Steps to Reproduce

  1. Fresh install, Advanced Authentication never enabled
  2. Navigate to Settings → Authentication
  3. Observe SMTP fields are grayed out — inject settings directly into
    SQLite as workaround:
    smtp_host, smtp_port, smtp_security (ssl), smtp_auth_enabled (true),
    smtp_username, smtp_password, smtp_from_email, smtp_from_name
  4. Restart Bambuddy — SMTP fields now show populated values in UI
  5. Click "Enable" on Advanced Authentication card
  6. Attempt to send test email → error: "Username and Password are
    required when authentication is enabled"
  7. Username and password are visibly populated in the UI and confirmed
    present in the database

Printer Model

X1 Carbon

Bambuddy Version

v0.2.2b4

Printer Firmware Version

01.11.02.00

Installation Method

Manual (git clone)

Operating System

Linux (Ubuntu/Debian)

Relevant Logs / Support Package

Unable to comply, since your form is broken:
Negative, dragging or pasting files does not work (Chrome/Win11)

Negative, pasting the file contents also does not work:

Field can not be longer than 65536 characters

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 @luckygreen on GitHub (Mar 14, 2026). Original GitHub issue: https://github.com/maziggy/bambuddy/issues/697 Originally assigned to: @shrunbr on GitHub. ### Bug Description SMTP authentication fails with "Username and Password are required when authentication is enabled" despite both fields being populated in the UI and confirmed present in the database. Additionally, the Advanced Authentication enable flow has a circular dependency: clicking "Enable" requires a test email to be sent first, but the "Send Test Email" button is grayed out and non-interactive until auth is enabled. ### Expected Behavior SMTP test email sends successfully when username and password are configured. The "Send Test Email" button should be functional independently of auth state, so SMTP can be verified before enabling Advanced Authentication. ### Steps to Reproduce 1. Fresh install, Advanced Authentication never enabled 2. Navigate to Settings → Authentication 3. Observe SMTP fields are grayed out — inject settings directly into SQLite as workaround: smtp_host, smtp_port, smtp_security (ssl), smtp_auth_enabled (true), smtp_username, smtp_password, smtp_from_email, smtp_from_name 4. Restart Bambuddy — SMTP fields now show populated values in UI 5. Click "Enable" on Advanced Authentication card 6. Attempt to send test email → error: "Username and Password are required when authentication is enabled" 7. Username and password are visibly populated in the UI and confirmed present in the database ### Printer Model X1 Carbon ### Bambuddy Version v0.2.2b4 ### Printer Firmware Version 01.11.02.00 ### Installation Method Manual (git clone) ### Operating System Linux (Ubuntu/Debian) ### Relevant Logs / Support Package ```shell Unable to comply, since your form is broken: Negative, dragging or pasting files does not work (Chrome/Win11) Negative, pasting the file contents also does not work: Field can not be longer than 65536 characters ``` ### 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-06 12:29:49 +02:00
Author
Owner

@shrunbr commented on GitHub (Mar 14, 2026):

This can be assigned to me, I am in the process of fixing this.

<!-- gh-comment-id:4059285951 --> @shrunbr commented on GitHub (Mar 14, 2026): This can be assigned to me, I am in the process of fixing this.
Author
Owner

@luckygreen commented on GitHub (Mar 14, 2026):

I manually injected the SMTP parameters, including username and password, into the DB. The GUI now displays the correct SMTP user name, a masked password, as well as the rest of the SMTP settings. However, sending a test email still fails with an error message that a user ID and password are required. What did I fail to inject into the DB?

<!-- gh-comment-id:4060495621 --> @luckygreen commented on GitHub (Mar 14, 2026): I manually injected the SMTP parameters, including username and password, into the DB. The GUI now displays the correct SMTP user name, a masked password, as well as the rest of the SMTP settings. However, sending a test email still fails with an error message that a user ID and password are required. What did I fail to inject into the DB?
Author
Owner

@shrunbr commented on GitHub (Mar 14, 2026):

I manually injected the SMTP parameters, including username and password, into the DB. The GUI now displays the correct SMTP user name, a masked password, as well as the rest of the SMTP settings. However, sending a test email still fails with an error message that a user ID and password are required. What did I fail to inject into the DB?

I've noticed this as well, it does not fetch SMTP settings from the database upon testing. It's using what is there in the frontend. I've seen this in web apps before so it's not entirely uncommon. I'll leave this functionality up to @maziggy.

@maziggy - Do you want users to be able to test SMTP without needing to re-enter SMTP credentials?

<!-- gh-comment-id:4060951837 --> @shrunbr commented on GitHub (Mar 14, 2026): > I manually injected the SMTP parameters, including username and password, into the DB. The GUI now displays the correct SMTP user name, a masked password, as well as the rest of the SMTP settings. However, sending a test email still fails with an error message that a user ID and password are required. What did I fail to inject into the DB? I've noticed this as well, it does not fetch SMTP settings from the database upon testing. It's using what is there in the frontend. I've seen this in web apps before so it's not entirely uncommon. I'll leave this functionality up to @maziggy. @maziggy - Do you want users to be able to test SMTP without needing to re-enter SMTP credentials?
Author
Owner

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

Yup, why not?

<!-- gh-comment-id:4060989974 --> @maziggy commented on GitHub (Mar 14, 2026): Yup, why not?
Author
Owner

@cadtoolbox commented on GitHub (Mar 14, 2026):

If I remember correctly, that was by design to check your SMTP settings before saving. It may need a re-review.

<!-- gh-comment-id:4061152199 --> @cadtoolbox commented on GitHub (Mar 14, 2026): If I remember correctly, that was by design to check your SMTP settings before saving. It may need a re-review.
Author
Owner

@shrunbr commented on GitHub (Mar 14, 2026):

Not sure why we can't have it both ways. I'll play around with this later tonight.

<!-- gh-comment-id:4061305188 --> @shrunbr commented on GitHub (Mar 14, 2026): Not sure why we can't have it both ways. I'll play around with this later tonight.
Author
Owner

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

https://github.com/maziggy/bambuddy/pull/710

<!-- gh-comment-id:4062539255 --> @maziggy commented on GitHub (Mar 15, 2026): https://github.com/maziggy/bambuddy/pull/710
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#465
No description provided.