Problems with reminders / Notifications

Hi there,

i like vikunja a lot, but setting this up, was quite q ride for me :slight_smile: so again i am having trouble

last task was to get email sending running, this is working now when i use vikunja testmail me@mail.domain via console, email is using TLS on port 587

i have set this up on an unraid server using docker, you can see the docker environments inside this screenshot

current task is to get the email notifications / reminders to work, i have set the timezone for the instance via the variable, seems to work, when setting reminders at 16 oclock via the UI the database is setting it to 15, so total normal GMT+1 behaviour

also the users in the database use the same timezone, checked this via the users table
the user were missing the email several times, so i set them again via the database

but i am not receiving any reminders, checking the docker logs, after setting the debug flagt, i can see he is not “seeing” any reminders to do.

e[36m2022-02-21T18:13:00.005260597+01:00: DEBUG :arrow_forward: models/getTasksWithRemindersInTheNextMinute 583e[0m [Task Reminder Cron] Looking for reminders between 2022-02-21 18:13:00 +0100 CET and 2022-02-21 18:14:00 +0100 CET to send…
e[36m2022-02-21T18:13:00.005700856+01:00: DEBUG :arrow_forward: models/getTasksWithRemindersInTheNextMinute 585e[0m [Task Reminder Cron] Found 0 reminders#

i received an email once, but just once, this was before i tried to fix the instance url for the email, and i dont know what is causing the reminder email to fail.

based on the database there are active reminders to sent, while the logs say “nope”, i tried to set them in 3 variantes e.g. 15 and 16 and 17 oclock while my clock was displaying 16 oclock, just to check any time shifts. this did not help

i tried to also to use the unstable version but i did not receive an email as well.

what can cause this issue? and how can i resolve it?

many thanks in advance

What version are you on? (From the “about” menu in the settings)

Did you enable reminders per mail for your user in the user settings?

This thread might contain useful information: Help with caldav, email reminders and task attachments - #15 by Tiritibambix

Frontend-Version: 0.18.2

API-Version: v0.18.1

yes emailr eminder is active for global and user, double checked in database in user table
i have already read this thread and 2 others i found, it did solve my issue with email sending but not with recieving emails as reminders :frowning:

as said logs are displaying nothing to sent, 0 reminders,

I think you’re hitting the timezone problem where the time zone the server is in is different from the one you’re currently in.

That will be fixed in the next release, the current unstable version already has the fix. It will check if the time zone matches and only sends the reminder if it does.
If you don’t mind experimenting a bit, you could try upgrading to unstable. Be aware that while that will probably fix the reminder issue, it might have other bugs and downgrading back to a stable version can have unexpected results (make a backup)

i already did the upgrade and it did not seem to work for me

server is using timezone GMT+1 as well as the docker container Gmt+1/germany/berlin
same for the user settings

but i will try the update again^, calling back in 10min

i changed the tag from latest to unstable, docker was downloading the image

version is now
Frontend-Version: 0.18.1+1173-6d6220627c
API-Version: v0.18.1+177-8bf2254f4b

after update my test user was missing his email address in database, i did not even login so far, i dont know why this happened?

mail test seems to try but failed because of missing email address
i have readded the email in the database and the test mail came in
so the version seemed to work, i dont know why tthis was not working on the first try, i had tested this already dueto the thread you had posted.

any idea why the email was removed from the account? this just happened after the switch from latest to unstable

Do the reminders now work as expected?

This really sounds like it should not happening. Was the email field the only one that disappeared?

yes that was the case, i have seen this at least twice so far
at first i thought i had changed it in my user preference by accident
but using the unstable version it seems not to be the case

i have to say i have injected the user into the database using a username at first install
once vinkunja asked me to verify the email but i have never received the email, as email functionality was not working at this point,

is there a way to trigger this again or could this be the issue? i can see user status in the database is 0, but i didnt find the meaning between null 0 and 1, null was at start.

If the status is 0 or null in the db that means the user is active. Currently there’s no way to re-trigger the activation email.

You can change the status manually through the cli: CLI | Vikunja

You mean you inserted the user directly in the db instead of using the register route or the cli? That’s interesting that worked at all.

jeah, the docker template was not 100% documented for unraid, and i did find instantly how to enable the register user, so i checked the database and saw a user table, added a user, not knowing what the fields are for, and added the password based on the hasing algo which i found in github <.< jeah hotneedle i know.

i will keep an eye on if the user email address is deleted again

i used the ./vikunja user update 1 -e
after using this command the avatar provider was blanked (not nulled), was default before… supposed to? or do i have to update the provider in the same call? it looks like this is unexpected

also used ./vikunja user change-status 1 -e but i did not receive an activation email

email notification seems to work fine now

i received the expected “good morning here are your overdues tasks” email

double checked the settings page in the unstable version
when updating in …/user/settings/general my email address gets kicked out of the database

I wasn’t able to reproduce this with latest unstable. What were the exact steps you took? Can you always reproduce it?

yes this is repdroducable and happens everytime

steps are very simple

  • open vikunja
  • login to vikunja if not already logged in
    • i use email as login
    • username is set to email address
  • open “your name” on top right
  • click settings

these are my settings, this is unchanged

  • click save
  • thats it

afterwards the database field for email in users table for this user gets cleared

it does not matter which setting i select or change, on each save the field empty afterwards

for me it seems to update all fields of the user, nether the less which are changed, but there is no email field visible :smiley: ?

That’s really wired, even with the steps you provided I can’t reproduce it. Could you enable database logs (config options here, set the database level to debug) and send me the output?

i used VIKUNJA_LOG_DATABASE set to on, hope this is correct, expected this to be true/false
redone the steps, i dont see any specific output in the logs related to the database log, what shall i look out for ?
is VIKUNJA_LOG_DATABASE = on correct?

Quoting from the docs:

Possible values are stdout, stderr, file or off to disable database logging.

So you should set it to stdout or file, depending on where you configured the rest of the docs to go. If you didn’t configure anything for the other logs, set it do stdout.

And set the databaselevel to debug!

okay so added the other value as well, debug level for database is on, stdout set

redone the steps and this is the result for the DB udpate for my user

2022-02-24T02:57:36.911740298+01:00: INFO :arrow_forward: [DATABASE] 1ade[0m [SQL] UPDATE users SET name = ?, username = ?, email = ?, avatar_provider = ?, avatar_file_id = ?, email_reminders_enabled = ?, discoverable_by_name = ?, discoverable_by_email = ?, overdue_tasks_reminders_enabled = ?, default_list_id = ?, week_start = ?, language = ?, timezone = ?, updated = ? WHERE id=? [MyName MyUsername default 4 true true true true 15 1 de-DE Europe/Berlin 2022-02-24 01:57:36 1] - 12.722317ms

i may be wrong, but is there a missing value between username and avatar_provider?
counting the values and ? differs, i have anonymized the username and email but did not remove a value.

i ran another test, i change the username inside the database, the username was a valid email address
so i have done the steps again to save the usersettings, and now its getting interessting. the username was overwritten with the email address, while the email address field was cleared.

it looks like there is a parameter missing or falsy assigned?

It looks like it, yes. That’s probably where it is removing the email. I just don’t understand why it is happening.