Extended-Thunder / send-later

Schedule messages to be sent at a specific time.
Mozilla Public License 2.0
122 stars 17 forks source link

Intermittent problem: Attempting toschedule sending at exactly midnight (24:00, olaternatively 00:00) sets effective time of sending to 00:01 #684

Closed piotrwie closed 7 months ago

piotrwie commented 7 months ago

Prerequisites

Describe the bug

Intention:

I'm trying to schedule sending at exactly midnight (24:00/00:00).

I'm reporting that for some time I've observed behaviour described in "How to reproduce" paths with actual result field.

After playing with the plugin again during writing this bug report (to obtain screenshot), the situation self-resolved. So the problem is at most intermittent, not persistent.

I've pasted piece of thunderbird console output presenting attempt to perform the first delayed-send, with success (everything was ok for this send). I had troubles later on, attempting to send second delayed email.

I'm attaching a screenshot presenting another rather bizzarre situation, where my windows time says it's 22:48, i'm attempting to send 'in 11 minutes' (which is 'hinted' byt UI to get performed at 22:59), but the button says it will be 00:00. I'm guessing a 'padding/rounding/seconds cutoff' might be calculated differently for different UI elements.

How to reproduce

Steps: 1a. in the popup i'm trying to set 00:00 as time to send, date is set to next day. alternative: 1b. I'm attempting to set time 24:00 the previous day of delayed send

Expected behavior

I'm expecting the 'send' button says that email would have been send exactly at 00:00 in proper day.

Instead, the button was presenting a 'hint' (button label) that the email will have been send at exactly 00:01.

Additional context

Environment: pl-PL locale, fresh Thunderbird (115.7.0 (64 bits)), Just installed send-later plugin, it is a second attempt to use the plugin to send emails.

Operating System

Windows

Operating System Version

11

Thunderbird version

115.7.0, 64bit

Send Later start-up string

Wyślij później version 10.3.6 on Thunderbird 115.7.0 (20240119095007) [win x86-64] UI locale pl, Date Locale pl-PL static.js:146:28 mboxImportModule -3 importMboxModule-3.js:49:9 mboximportExport -3 mboxImportExport-3.js:35:9 Opened new window Object { id: 60, focused: true, top: -7, left: -7, width: 1550, height: 830, incognito: false, type: "messageCompose", state: "maximized", alwaysOnTop: false, … } static.js:146:28 Received keycode cmd_sendButton static.js:146:28 Opened new window Object { id: 72, focused: true, top: -7, left: -7, width: 1550, height: 830, incognito: false, type: "messageCompose", state: "maximized", alwaysOnTop: false, … } static.js:146:28 Received keycode cmd_sendLater static.js:146:28 Opening popup static.js:146:28 mailnews.smtp: NetworkTimeoutError: a Network error occurred SmtpClient.jsm:453:17 WebExtensions: INFO [SL3U]: Received call to dummy CompleteGenericSendMessage 1 sl3u.js:77 Scheduling send later: 9 with options Object { sendAt: Date Thu Feb 29 2024 23:02:00 GMT+0100 (czas środkowoeuropejski standardowy), recurSpec: "none", args: undefined, cancelOnReply: undefined, first: true } static.js:146:28 sendRemoveListener on closed conduit sendlater3@kamens.us.137438953948 ConduitsChild.sys.mjs:108 Promise rejected after context unloaded: Actor 'Conduits' destroyed before query 'RuntimeMessage' was resolved

please mind, that screen below doesn't directly correlate to the log above, it just presents the 'bizzarre situation' which I had described as additional hint above. send_later_time_calculation_problem

jikamens commented 7 months ago

The text in the button takes into account when Send Later will next check for scheduled messages. This will be more obvious if you've told it to check less frequently than once every minute, but even if it's checking every minute you will see behavior like this.

If you want more precise behavior you can configure it to check every fractional number of minutes. For example, 0.25 minutes would mean every 15 seconds.

Make sure you configure our Drafts folder to synchronize locally if you do this, or there could be a significant performance impact (you should do this in any case if you have a lot of Drafts).

The add-on is behaving as designed, so closing this as not a bug.

piotrwie commented 7 months ago

Thanks, I get it. one part of UI depends on some reasonable precalculation, and second on actual period of performing internal scans. That explains the behaviour. Thanks! This is really a cosmetics, anyway :) Good luck with extension :)