Unset EMAIL environment variable breaks preferences window

Bug #1983060 reported by James Haefner
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Email-reminder
Fix Released
High
François Marier
email-reminder (Debian)
Fix Released
High
François Marier
email-reminder (Ubuntu)
Fix Released
Undecided
François Marier

Bug Description

[Impact]

email-reminder is unusable for new users who have the EMAIL environment variable unset because the user's email address must be set in preferences before any reminders will be sent out.

This is a severe regression from upstream's 0.7.8 and is fixed in 0.8.1-4.

The fix is trivial (checking for whether or not the envvar is set before using it): https://salsa.debian.org/debian/email-reminder/-/commit/421ecf6df3e1ddde5cb3aa2c804f687765ea250e

Since there are no other changes in version 0.8.1-4, the simplest fix would be to **sync from Debian unstable**. I have attached a debdiff showing the differences between them.

[Test plan]

1. Delete any existing ~/.email-reminders.
2. Run `unset EMAIL`.
3. Run `email-reminder-editor`.
4. In the menu, open "Edit | Preferences...".
5. (notice that nothing happens and the preferences window never shows up)

[Where problems could occur]

The only regression that this could cause is to prevent the preferences dialog from opening for more users than just the ones that have EMAIL unset.

[Original report]

Upgraded to Ubuntu MATE 22.04 and email-reminder 0.8.1.3. Out of the box and invoked in the Accessories menu item, email-reminder loads but gives the error on exit: "You will not receive an email because your email address is not set." (or similar words). Attempts to load preferences window fail (no window appears.)

Ran "email-reminder-editor" from a terminal, attempted to invoke the preferences window, and received an error message from Python3 to the terminal that suggested that the environment variable "EMAIL" was not set. I exported EMAIL=myemailaddress, reran email-reminder, and the preferences window appeared with my email shown, and email alerts now working as expected.

So, it appears that "EMAIL" must be set at least once in order for email-reminder to add the user name and email address to $HOME/.email-reminders.

Cheers, and thanks for a useful program.

Revision history for this message
James Haefner (jwhuhwj) wrote :

I'm guessing you fixed this in 0.8.2, but I can't be sure.
--J. Haefner

Revision history for this message
François Marier (fmarier) wrote :

> I'm guessing you fixed this in 0.8.2, but I can't be sure.

The release announcement for 0.8.2 was a typo, it was actually 0.8.1, so you're running the latest version.

Revision history for this message
François Marier (fmarier) wrote :

> received an error message from Python3 to the terminal that suggested that the environment variable "EMAIL" was not set.

Ah, I can reproduce this. The case I fixed was:

  export EMAIL=
  email-reminder-editor

and that still works fine in 0.8.1.

What you ran into is:

  unset EMAIL
  email-reminder-editor

and that shows the error that you described.

summary: - email-reminder preferences won't load
+ Unset EMAIL environment variable breaks preferences window
Changed in email-reminder:
importance: Undecided → High
assignee: nobody → François Marier (fmarier)
status: New → Confirmed
milestone: none → 0.8.2
Changed in email-reminder:
status: Confirmed → Fix Committed
Revision history for this message
James Haefner (jwhuhwj) wrote : Re: [Bug 1983060] Re: Unset EMAIL environment variable breaks preferences window

Cool! Thanks. -jh

On 7/28/22 13:27, François Marier wrote:
> ** Changed in: email-reminder
> Status: Confirmed => Fix Committed
>

Changed in email-reminder (Ubuntu):
status: New → Confirmed
Changed in email-reminder (Debian):
importance: Undecided → High
assignee: nobody → François Marier (fmarier)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package email-reminder - 0.8.1-4

---------------
email-reminder (0.8.1-4) unstable; urgency=medium

  * Fix preferences when EMAIL envvar is unset (LP: #1983060).

 -- Francois Marier <email address hidden> Thu, 28 Jul 2022 21:32:59 -0700

Changed in email-reminder (Ubuntu):
status: Confirmed → Fix Released
Changed in email-reminder (Ubuntu):
assignee: nobody → François Marier (fmarier)
Changed in email-reminder (Debian):
status: New → Fix Released
Revision history for this message
François Marier (fmarier) wrote :

Debdiff showing the differences between the version in Jammy (0.8.1-3) and the version in Debian unstable (0.8.1-4).

Not meant to be uploaded to Jammy directly, just meant to show the result of syncing from Debian.

description: updated
Changed in email-reminder:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.