Skip to content

SMTP_PASS UnicodeDecodeError after migration to v25.11.29 #1337

@lucazade

Description

@lucazade

Bug Description

After migrating from v25.10.1 to v25.11.29, the SMTP plugin fails with a UnicodeDecodeError when trying to send notifications, even after re-saving settings as instructed.

Environment

  • Version: v25.11.29
  • Migration from: v25.10.1
  • Plugin: SMTP Email Publisher

Error Log

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa7 in position 0: invalid start byte

Full traceback:

12:50:24 [Send API] Updating notification_* files in  /tmp/api/
12:50:24 [Notification] Udating API files
12:50:24 [Plugin utils] ---------------------------------------------
12:50:24 [Plugin utils]  display_name :  Email publisher (SMTP)
12:50:24 [Plugins] Executing: python3 /app/front/plugins/_publisher_email/email_smtp.py
12:50:24 [plugin_helper] reading config file
12:50:24 [SMTP](publisher) In script
12:50:24 [Database] Opening DB
12:50:24 [SMTP] SMTP_SERVER:  smtp.gmail.com
12:50:24 [SMTP] SMTP_PORT:  587
12:50:24 [SMTP] SMTP_SKIP_LOGIN:  False
12:50:24 [SMTP] SMTP_SKIP_TLS:  False
12:50:24 [SMTP] SMTP_FORCE_SSL:  False
Traceback (most recent call last):
  File "/app/front/plugins/_publisher_email/email_smtp.py", line 243, in <module>
    sys.exit(main())
             ^^^^^^
  File "/app/front/plugins/_publisher_email/email_smtp.py", line 78, in main
    result = send(notification["HTML"], notification["Text"])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/front/plugins/_publisher_email/email_smtp.py", line 158, in send
    send_email(msg, smtp_timeout)
  File "/app/front/plugins/_publisher_email/email_smtp.py", line 213, in send_email
    smtp_connection.login(get_setting_value('SMTP_USER'), get_setting_value('SMTP_PASS'))
                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/server/helper.py", line 254, in get_setting_value
    value = setting_value_to_python_type(set_type, set_value)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/server/helper.py", line 298, in setting_value_to_python_type
    value = reverseTransformers(str(set_value), transformers)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/server/helper.py", line 405, in reverseTransformers
    return reverse_transformers(val, transformers)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/server/helper.py", line 396, in reverse_transformers
    value = base64.b64decode(value).decode("utf-8")
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa7 in position 0: invalid start byte

12:50:24 [Plugins] ⚠ ERROR - enable LOG_LEVEL=debug and check logs
12:50:24 [Plugins] No output received from the plugin "SMTP"

Steps to Reproduce

  1. Migrate from v25.10.1 to v25.11.29 following official migration guide
  2. Have SMTP notifications configured in v25.10.1 (working before migration)
  3. Re-save settings as instructed in release notes
  4. Trigger a notification (e.g., new device detection)
  5. Check logs - SMTP plugin fails with UnicodeDecodeError

(The same issue occurs also using dev image and db from scratch)

Expected Behavior

SMTP notifications should work after migration and re-saving settings.

Actual Behavior

SMTP plugin crashes with encoding error when trying to decode SMTP_PASS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't workingnext release/in dev image 🚀This is coming in the next release or was already released if the issue is Closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions