thunderbird-android icon indicating copy to clipboard operation
thunderbird-android copied to clipboard

Annoying notification in status bar keeps reappearing multiple times a day: IllegalStateException: No outbox_state entry for message with id 1218

Open Nowaker opened this issue 1 year ago • 1 comments

Checklist

  • [X] I have used the search function to see if someone else has already submitted the same bug report.
  • [X] I will describe the problem with as much detail as possible.

App version

6.804

Where did you get the app from?

Google Play

Android version

14

Device model

OnePlus 12

Steps to reproduce

Unknown. Installed app. Added 5 accounts. After a week of use, I keep getting spammed by this error message in status bar notifications. Several times a day, or even more.

Expected behavior

No error like this.

Actual behavior

Error.

Screenshot_2024-08-04-18-10-04-96_3822ac0e29cfec8970059bb21d01f05e~2

Logs

I will provide logs if I hear that there is willingness to look at this issue. So far, two others tickets about this issue have been closed with no resolution. Please let me know and I'll get the logs in.

Nowaker avatar Aug 04 '24 23:08 Nowaker

I have the same problem on android 13, thunderbird v 10.0 via fdroid

marzagheddon avatar May 22 '25 16:05 marzagheddon

After updating to the latest beta (13.0b2) these notifications started appearing on my device too!

Screenshot_2025-09-18-14-34-54-62_c3a231c25ed346e59462e84656a70e50.jpg

I get multiple of these every hour, it's quite annoying.

JonathanBout avatar Sep 18 '25 12:09 JonathanBout

I can confirm this bug. On both my device and the wife's after the update to 13.0b2

We both have a Gmail account and an IMAP (Stalwart) account connected

ryanleesipes avatar Sep 20 '25 04:09 ryanleesipes

Hi @coreycb, I come from #9821. Thanks for pointing out the duplication.

I wonder if we already have existing workarounds for this? Like, if I upgrade Thunderbird to some future version, is it going to be automatically fixed? Would exporting and re-adding all accounts work? Or, do I have to clear data and manually re-add all accounts? Thanks!

CSharperMantle avatar Sep 22 '25 13:09 CSharperMantle

Hi @coreycb, I come from #9821. Thanks for pointing out the duplication.

I wonder if we already have existing workarounds for this? Like, if I upgrade Thunderbird to some future version, is it going to be automatically fixed? Would exporting and re-adding all accounts work? Or, do I have to clear data and manually re-add all accounts? Thanks!

Hi @CSharperMantle,

For now, we still don't have any workaround in place, and we are trying to understand the root cause of this issue to provide a proper solution.

I have a few questions that might help give us a direction on where to look, if you don't mind answering:

  1. Can you still send emails with the account that is presenting the issue?
  2. Do you see an Outbox folder present in the drawer? If not, do you see any folder called "Outbox" within the "Manage folders" screen that isn't with the Outbox icon?
  3. When you click into the notification, does it open the "Outbox" folder? What do you see there?
  4. Are you missing any messages you may have sent through the app that are not present in the Email provider you use?

rafaeltonholo avatar Sep 22 '25 14:09 rafaeltonholo

I've deleted the app data to workaround the bug, so sorry I can't reproduce these actively and precisely. So I'll answers these questions to the best of my experience in the previous several days.

Can you still send emails with the account that is presenting the issue?

I didn't try to send mails when the bug was in sight.

Do you see an Outbox folder present in the drawer? If not, do you see any folder called "Outbox" within the "Manage folders" screen that isn't with the Outbox icon?

No, there were no Outboxes for two of my accounts. This number is somehow the same as the number of exception notifications. "Manage folders" didn't show any Outboxes in these accounts.

When you click into the notification, does it open the "Outbox" folder? What do you see there?

Clicking the notification led me to a specific folder in a specific account. I only vaguely remember it, but it was definitely not Outbox.

Are you missing any messages you may have sent through the app that are not present in the Email provider you use?

Same as Q1, I didn't send any mails in those days. Sorry.

CSharperMantle avatar Sep 22 '25 23:09 CSharperMantle

I'm having the same issue, and may be able to answer more of the questions. I haven't deleted the app data, though I did notice that the settings for which folders to use for drafts, sent, spam, trash, etc. were all jumbled, and reset them myself to their correct folders.

I did try to send an email a few days ago, and it sent through just fine. I believe it was after I reset the sent folder to the proper folder, and it did save a copy of it to the sent folder. It may have also kept a copy of it in another folder, though it's possible that that might have been before I correctly reset the drafts folder setting. I'm not entirely sure what the "outbox" icon is, but when I click on the notification, it brings me to the inbox folder. I'm also not entire certain if the inbox folder should be something else, so it's possible that the inbox folder has the outbox icon. Notably, when I'm in the inbox folder, the "three dots" menu has "Send messages" as an option inside of it, so that does lend some credence to thunderbird being confused that the inbox folder is set as the outbox. The account is an imap account, and thus, does not actually have an "outbox" folder on the server. I don't believe I'm missing any messages, though I do have my email server configured with a bunch of email filter rules which direct new emails to various folders, and since the outbox_state error message started showing, thunderbird no longer retrieves new messages for any of those folders.

I hope this helps.

ikirudennis avatar Sep 23 '25 00:09 ikirudennis

Thank you both, @CSharperMantle and @ikirudennis. The information you provided has been very helpful and confirms my hypothesis about what is happening.

My impression is that, somehow, the Outbox folder was deleted and the app, instead of creating a new one, assigned Inbox as the new Outbox. The following statements help me to have that conclusion:

No, there were no Outboxes for two of my accounts.

... but when I click on the notification, it brings me to the inbox folder.

Notably, when I'm in the inbox folder, the "three dots" menu has "Send messages" as an option inside of it...

So, the new Outbox folder is now the Inbox. As a result, when attempting to check for any pending messages to send, it fails to retrieve the outbox_state, as it misinterprets regular messages as pending ones.

Moreover, I believe the query we use to check for pending messages needs to be revised to ensure that we are fetching the correct data.

What bugs me is that we haven't modified the Outbox logic in the newer migrations, so the deletion may be happening through a database trigger or another method. I still need to determine why the app is automatically deleting the Outbox folder and assigning a new one.

One last question: @CSharperMantle, @ikirudennis, would you be able to share with us what is the email server you are using to your account that has presented the problem? That would help to understand which migration was executed when you updated to the latest version.

rafaeltonholo avatar Sep 23 '25 11:09 rafaeltonholo

would you be able to share with us what is the email server you are using to your account that has presented the problem?

  • {imap, smtp}.qq.com
  • {imap, smtp}.126.com

Somehow my self-hosted server and enterprise server hosted on 126 didn't cause issues.

CSharperMantle avatar Sep 23 '25 11:09 CSharperMantle

would you be able to share with us what is the email server you are using to your account that has presented the problem?

* `{imap, smtp}.qq.com`

* `{imap, smtp}.126.com`

Somehow my self-hosted server and enterprise server hosted on 126 didn't cause issues.

Not sure if I got your last statement... Both accounts have presented the issue or only the account on qq.com has? The idea of sharing the email host is to:

  1. Understand if the email provider enforces IMAP prefix. That would mean the MigrationTo90 was executed and could potentially triggered the issue somehow
  2. I would try to create and account in the email provider, if possible, so I could try to reproduce the issue with one of my devices. That would be of extreme value to help fully understanding the issue.

Another way to find if the email provider you use enforces the IMAP Prefix is by checking the logs of the application and verifying the output of the NAMESPACE command. For example:

No prefix:

12:46:47.650 RealImapConnection      net.thunderbird.android.beta         I  pathPrefix is unset and server has NAMESPACE capability
12:46:47.858 RealImapConnection      net.thunderbird.android.beta         D  Got path '' and separator '/'

With prefix:

12:45:56.216 RealImapConnection      net.thunderbird.android.beta         I  pathPrefix is unset and server has NAMESPACE capability
12:45:56.225 RealImapConnection      net.thunderbird.android.beta         D  Got path 'INBOX.' and separator '.'

rafaeltonholo avatar Sep 23 '25 12:09 rafaeltonholo

Both accounts have presented the issue or only the account on qq.com has?

Both qq.com and 126.com had this issue.

The last statement was meant to provide context for that my other accounts didn't have this problem.

CSharperMantle avatar Sep 23 '25 12:09 CSharperMantle

For me, the email server is imap.mail.yahoo.com.

ikirudennis avatar Sep 23 '25 13:09 ikirudennis

BTW, my email server was imap.gmail.com when this happened to me.

Nowaker avatar Sep 23 '25 13:09 Nowaker

We have a fix available on our beta internal testing track on the play store. If anyone is interested in helping test please email me at [email protected] and I'll provide you access.

coreycb avatar Sep 30 '25 02:09 coreycb

13.0b4 is rolling out at 30% of users now on the play store. If you're able to test, please let us know how it goes.

coreycb avatar Oct 01 '25 17:10 coreycb

13.0b4 is rolling out at 30% of users now on the play store. If you're able to test, please let us know how it goes.

I updated just now and the notifications immediately cleared for all the affected accounts and have not returned when syncing so it seems as though the fix does what was intended. Happy to test further if there is anything specific that needs to be checked.

DunningtonAudio avatar Oct 01 '25 19:10 DunningtonAudio

13.0b4 is rolling out at 30% of users now on the play store. If you're able to test, please let us know how it goes.

I updated just now and the notifications immediately cleared for all the affected accounts and have not returned when syncing so it seems as though the fix does what was intended. Happy to test further if there is anything specific that needs to be checked.

That's great to hear! Here are a few things you can test for us:

  • Check if the Outbox folder appears in the Drawer list and confirm that you can access it.
  • Check if your Inbox folder is not behaving as the Outbox. To verify this, tap on the three dots icon in the upper-right corner of the app bar in the Inbox. It should not have a "Send messages" option.
  • Test if you can successfully send a message.

Thank you for your help!

rafaeltonholo avatar Oct 02 '25 12:10 rafaeltonholo

13.0b4 is rolling out at 100% now - please let us know if there are any issues.

coreycb avatar Oct 02 '25 17:10 coreycb

That's great to hear! Here are a few things you can test for us:

  • Check if the Outbox folder appears in the Drawer list and confirm that you can access it.
  • Check if your Inbox folder is not behaving as the Outbox. To verify this, tap on the three dots icon in the upper-right corner of the app bar in the Inbox. It should not have a "Send messages" option.
  • Test if you can successfully send a message.

These are all fixed for me now. Thank you! 🙌🏻

nchevsky avatar Oct 03 '25 06:10 nchevsky

I can also confirm. Its fixed, thanks!

ataraxus avatar Oct 03 '25 07:10 ataraxus

It's fixed for me too!

JonathanBout avatar Oct 03 '25 08:10 JonathanBout