alexbelgium / hassio-addons

My homeassistant addons
MIT License
1.36k stars 193 forks source link

🐛 [Firefly iii] config.yaml does not seem to be working #1383

Closed MiroVerleysen closed 2 weeks ago

MiroVerleysen commented 1 month ago

Description

As I forgot my password and I have not set up Email correctly i wanted to turn on MAIL_MAILER but it does not seem to have any effect. I turned it on by adding this to the config.yaml file: "MAIL_MAILER: log". As described in these issues: https://github.com/firefly-iii/firefly-iii/issues/4039 https://github.com/firefly-iii/firefly-iii/issues/4127

But I don't get the mailer logs, obviously I restarted the add-on after my changes.

Reproduction steps

Used config.yaml

#============================#
# ALEXBELGIUM'S ENV INJECTOR #
#============================#
#
# All env variables set in this file will be enabled in the app
# This allows enabling more options that normally available in the addon options
# This file must be filled according to the yaml format.
# If the format is invalid, the addon will note an error.
# To validate your yaml, you can use the free online tool http://www.yamllint.com/

# EXAMPLE of the format (you need to remove the # for it to become active)
# TZ: Europe/Paris
APP_LOG_LEVEL: debug
MAIL_DRIVER: log
MAIL_MAILER: log
MAIL_LOG_CHANNEL: stack

Addon Logs

.

Architecture

amd64

OS

HAos

MiroVerleysen commented 1 month ago

I just checked the .env file of the container, the file looks like this. are these single quotation marks allowed in there?

APP_KEY='blabla'
CONFIG_LOCATION='/config/addons_config/fireflyiii/config.yaml'
DB_CONNECTION='sqlite_internal'
Updates='weekly'
silent='false'
APP_LOG_LEVEL='debug'
MAIL_DRIVER='log'
MAIL_MAILER='log'
MAIL_LOG_CHANNEL='stack'
MAIL_HOST='smtp.gmail.com'
MAIL_PORT='587'
MAIL_FROM='emailaddr@gmail.com'
MAIL_USERNAME='emailaddr@gmail.com'
MAIL_PASSWORD='blabla'
MAIL_ENCRYPTION='tls'
alexbelgium commented 1 month ago

Hi, according to this it should : https://stackoverflow.com/questions/71538752/when-are-quotes-needed-in-env-file

However perhaps Firefly doesn't read it... Sorry i'm off for some time so i can't really check for the moment

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

alexbelgium commented 1 month ago

Actually the real passing of the env variables should be when they are added at the start of the /etc/cont-init.d/99-run.sh file... Then they should be passed to the /usr/local/bin/entrypoint.sh file... Which works as the database connects so I wonder if there is not an interfering variable lost somewhere...

alexbelgium commented 1 month ago

I see "MAIL_LOG_CHANNEL: stack" what does it means? In docker containers the stdout output is normally used as /proc/1/fd/1 to send it to the addon logs, I wonder if your logs are not stuck somewhere in the add-on...

alexbelgium commented 1 month ago

And if you use Gmail are you using an app key? As default username and password will likely not work if you have 2fa enabled

MiroVerleysen commented 1 month ago

I noticed an error saying app_url was missing, so what I did is rebuilding the container using portainer with this env variable along with the mail log vars after which it was working. I will double check whether it is working via the config.yaml file instead of the portainer method I used.

Thank you for your investigation. I'll keep you updated, for now my issue is solved, got a new password.

alexbelgium commented 1 month ago

That's the most important! Glad it worked for you

FabriceMethou commented 3 weeks ago

Hey Guy, I got the same issue and I'm stuck at the app-url part any guidance ?

alexbelgium commented 3 weeks ago

Hi Fabrice have you tried specifying the app_url in the config.yaml?

github-actions[bot] commented 2 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.