Closed Bug 1257235 Opened 8 years ago Closed 3 years ago

Sending message succeeds but error "Your message has been sent and saved, but there was an error while running message filters on it." appears randomely.

Categories

(Thunderbird :: Untriaged, defect)

45 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: richard.leger, Unassigned)

References

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
Build ID: 20160210153822

Steps to reproduce:

Send a message via Imap account in Thunderbird 38.6


Actual results:

Message was sent but following error appeared "Your message has been sent and saved, but there was an error while running message filters on it." appears randomely.
Message does not appears immediately in Sent items.



Expected results:

Message shall be sent without error.
OS: Unspecified → Windows 7
Hardware: Unspecified → x86_64
Similar bug reported at bug 1221020

Does this happen with Thunderbird started in safe mode?
 https://support.mozilla.org/en-US/kb/safe-mode

Do you have filter rules defined for "After sending"?
Flags: needinfo?(richard.leger)
As indicated, this issue happens randomely so I cannot test it in safe mode.

Though following your suggestion I doubled check and it appears that one of my filter was set to apply after sendind somehow (honestly I don't recall having set that option on Filter, other filter do not have this option enabled). I have now disabled this option in the filter. Though in theory activating option shall not cause issue in the first place ;-)

For info if that might be relevant I have just updated to Thunderbird 45.x, also I do connect very otfen to various VPN connections... not that it might be relevant directly but just thought to mention it as itbseems to me it is more likely to appears in this configuration, I am wondering if some cached network info by Thunderbird may not be properly updated real time and causing issue as well...

The error msg saying a filter could not be run on it does not always appear either all the time (very rarely indeed)...

Hope that help.
Thanks fir help.
Arrgh!!!

Had again the issue just now. Open my computer from sleep, access Thunderbird, could read msg and access new email. Then I send message but it hangs when trying to save to Sent folder (on the server). Same with draft message, it keeps saying "Saving draft message..." but action never completes...

In the status bar the progress bar keep running with message of action indicated...(e.g copying message to sent folder) but nothing happens. 

- Putting Thunderbird offline/online has no effect! Should this stop the running on going processes?
- Disconnecting/reconnecting to network has no effect... 

Thunderbird keep hanging in the process with no possibility to cancel request or retry... I keep access to my calendar on the same server but seems to loose access to the ability to get new message and load message content from server meaning the issue seems only to affect the IMAP connection. I can send message but copy msg to server keep failing...

If I close the messages, in the draft message case, a prompt appears saying that Thunderbird process has not completed, do you really want to Quit... (sorry don't have the exact message...), if I press Quit button msg remain on screen but all button options are grey out... I can only close the message again without prompt this time msg lost, loosing the content... 

In the case of sent message, you can cancel saving message as well by pressing close button (top right corner of windows) and then click Cancel when prompted but message remain opened with grey out option with no other possibility but to close the message again.

What is annoying is that there does not seems to be a way to stop the process and retry it nor identify what is going wrong... the only way to come back to normal is to restart the application... :-(

In any case, the messages are lost... despite having been sent, the draft msg cannot be recovered.

The error console only show few errors related to the calendar not the mail connection.

Can no longer receive new messages, so might definitely be due to a stall IMAP connection in Thunderbird or javascript process hanged which stop further interaction with Thunderbird, other email client keep working fine so not a server error...
Here is a screenshot of the steps...

As you can see, this time there were no message indicating that applying Filter on msg failed:
- Which is most of the case I encounter.
- Which was expected as all rules have this option disabled (not to apply on Sent msg).

IMAP connection seems "stall" and I cannot seems to be able to re-establish it (it does not look like Thunderbird is reaching the server and trying to authenticate) without restarting the full application...

For info, if relevant, I only download header of msg on my client, and clicking on different message in Inbox I can see only the content of those I have accessed before the issue raise, other are no longer loadable from server... event after turning Thunderbird offline/online which should reset the connection in theory but that does not (network socket issue? not reset?) :-)

Hope that help.
This issue is so random, it make it very difficult to analyse as it cannot be reproduced at will.
Correction...

Last email I received in my Thunderbird Inbox are dated from yesterday. Today's message do not appear. So they haven't been received in Thunderbird.

That means after waking up computer from sleep, Thunderbird was already opened and could not establish connection to the IMAP server so issue might be linked to the fact that Thunderbird go to sleep while open and running and not being able to re-establish existing connection after wake-up, the existing connection before sleeping being no longer valid after wake up and not automatically reset/re-connected?

Though putting Thunderbird offline/online shall correct the issue as well as disconnecting/reconnecting from network... in theory that would be expected...

Restarting the application do reset the network socket in use by Thunderbird and the network IMAP connection...
Version: 38 Branch → 45 Branch
Here is another screenshot of error message appearing when trying to save draft msg and it fails...

- Clicking Wait, make Thunderbird keep processing, while msg remain open in grey out status... only possibility being to close it with X button top right corner... which make the prompt re-appear... 
- Clicking Quit, either has no consequences or simply close the message and it is lost. No longer available anywhere.
Following the issue, I restarted Thunderbird that took about 2mn to fully close (process was still running in background) until if finally crashed with the following report submitted :-)
bp-a4262167-6176-41ad-bb6d-58e752160511	11/05/2016

Hopefully that may help identify the culprit :-)

After restart, I received new messages immediately.
Richard, when did this first start happening? 
And what version of Thunderbird - if you can estimate?

This is similar to my experience with Bug 1257058.
Perhaps failed return code checking.
See Also: → 1257058, 817392
I am not exactly sure to know at which version of TB this started to happen. The copy to sent folder process hanging has been happening to me for a while since June last year perhaps if I recall correctly... I have raised a bug because it kept happening randomly despite upgrading TB overtime. For sure it was happening in 38.x branch version and now in 45.x version. Though I seems to have only noticed the crash report in 45.0 version as I waited for process to clear itself after long delay following closing of application via UI, before I may have manually killed the process in task manager as restarting raised an alert saying TB was already running...so the crash report may have not been generated... Hope that help in any way...
I haven't directly encountered Bug 1257058.

Looking at past bugs that involve nsMsgCopy::DoCopy as indicated in crash report... I found the following...

Bug 317970 - hang when saving (auto-save) and sending and mail [@ nsMsgCopy::DoCopy]
Bug 263997 - nsMsgCopyService does not provide OnProgress notifications to the nsIMsgCopyServiceListener

If that can be of any relevance...
Flags: needinfo?(richard.leger)
Richard, do you see this with current version 52 or beta?
Flags: needinfo?(richard.leger)
I have noticed it once...I am on 52 beta but this time I managed to recover from it. I came back to main windows and click on various folders and loaded different messages. At first it failed seems like authentication issue (could it be linked to ssl validation perhaps?)... Then at some point it worked...so I came back to msg and retry process the send/copy to folder and completed successfully.
Flags: needinfo?(richard.leger)
I did not see message about the filter, it either say sending or saving copy to sent looking stuck in progress (full green bar if I recall correctly).
This issue has occurred again randomly in Thunderbird 58.0b3 (32-bit) on Win 10 (64bits) ver 1709 (OS Build 16299.192). The message send was of consequent size but below limit of the client/server system. Using IMAP/SMTP account.
Message was bigger than 10Mo octet and error raised after the message was sent but I don't recall if it was before of after saving the msg to sent folder (also on the server). It took long minutes to transfer the msg over ADSL connection ~1Mo upload speed. Just thought to add this info in case it may help somehow.
(In reply to Richard Leger from comment #14)
> This issue has occurred again randomly in Thunderbird 58.0b3 (32-bit) on Win
> 10 (64bits) ver 1709 (OS Build 16299.192). The message send was of
> consequent size but below limit of the client/server system. Using IMAP/SMTP
> account.

1. So this happens for both IMAP and SMTP accounts?

2. Is there any chance that a filter rule that is invoked "AFTER SENDING" is again enabled mysteryously?

TIA

PS: Developers ought to add more information to the error popup or into error console as to 
why/how the filtering failed.
(In reply to ISHIKAWA, Chiaki from comment #17)
> (In reply to Richard Leger from comment #14)
> > This issue has occurred again randomly in Thunderbird 58.0b3 (32-bit) on Win
> > 10 (64bits) ver 1709 (OS Build 16299.192). The message send was of
> > consequent size but below limit of the client/server system. Using IMAP/SMTP
> > account.
> 
> 1. So this happens for both IMAP and SMTP accounts?
> 
> 2. Is there any chance that a filter rule that is invoked "AFTER SENDING" is
> again enabled mysteryously?

Richard?


> PS: Developers ought to add more information to the error popup or into
> error console as to why/how the filtering failed.

Indeed, bug 697522 where you previously have commented
Flags: needinfo?(richard.leger)
(In reply to Wayne Mery (:wsmwk) from comment #18)
> (In reply to ISHIKAWA, Chiaki from comment #17)
> > (In reply to Richard Leger from comment #14)
> > > This issue has occurred again randomly in Thunderbird 58.0b3 (32-bit) on Win
> > > 10 (64bits) ver 1709 (OS Build 16299.192). The message send was of
> > > consequent size but below limit of the client/server system. Using IMAP/SMTP
> > > account.
> > 
> > 1. So this happens for both IMAP and SMTP accounts?
> > 

It happens only when sending msg... My account is receiving msg via IMAP and sending message via SMTP...

> > 2. Is there any chance that a filter rule that is invoked "AFTER SENDING" is
> > again enabled mysteryously?
> 

I have only two filters set in tools > message filters and both have options set as follow:

- Ticked "Manually Run"
- Ticked "Getting New Mail" [Filter after Junk Classification]
- UnTicked "Archiving"
- UnTicked "After Sending"

Hope that help.
Flags: needinfo?(richard.leger)

I just started getting this last week.
MacOSX Catalina 10.15.1
Thunderbird 60.9.1

Sending email via Gmail or Linux + Postfix.
No message filters defined.

Error:
Your message has been sent and saved, but there was an error while running message filters on it.

(In reply to stephendwilliams from comment #20)

No message filters defined.

Error:
Your message has been sent and saved, but there was an error while running message filters on it.

I think we have a serious problem... W
e may have other Mac users reporting the same if this is a bug in the source code.

But reporter, have you upgraded TB lately (automatic upgrade, etc.) just in case?
If so, can you try to re-install the TB binary [without re-creating the account. I believe you can do that without much difficulty.]?
I see that my TB version under Windows10 is already 71.0. You may be better off with the latest version unless you have some backward compatibility issue with addons, etc.

Anyway just to be sure, I want to find out your installation of TB is in a sane mode.

The error I quote above, if it is a real bug in the code, seems so serious and I think we would have been swamped by the bug already ?!.
The filtering code in question should be common across all the platform (including Windows and Linux both of which I use at the office and at home and I have not seen a problem so far.)

... OH WAIT, I HAVE DEFINED hundred of filters to sort out mailing list. In your case, you have NO FILTER set at all... Hmm. There may be an oversight with regression tests in this particular configuration (!?). But again it is hard to believe that |make mozmill| test suite is not checking the simplistic setting.

That version is current for the release channel on MacOSX and is up to date. I can try uninstalling and installing again but of course that shouldn't make a difference.

(In reply to stephendwilliams from comment #22)

That version is current for the release channel on MacOSX and is up to date. I can try uninstalling and installing again but of course that shouldn't make a difference.

Re: the version issue.
I see. I only use Windows10 and linux these days. So, I was not aware of that.

Right, reinstalling should not change the situation if the first installation worked completely. That's why I sad "just in case". :-)

Seriously, I would monitor the bugzilla for similar mac user posts. If it is a systematic bug, we would see more similar posts.

By any chance, do you have any particular preference setting that may make your configuration stand up among the equals, so to speak?
(Still then, it happened suddenly. That point is what I need to think about.
Sorry, I will be tied up with a long week of tech exhibition/seminar next week and may not be able to thrown in any insight until the week after... Maybe adding additional user-friendly comment when a filter error occurs might be an approach to figure out what is going on.

There is already logging function for filtering and that might also give you a clue where the code thinks it is failing.

See https://bugzilla.mozilla.org/show_bug.cgi?id=697522#c14 for how to do it.
set MOZ_LOG=Filters:5
seems the way to do it.

It might be a good idea to post the log messages once you are able to capture some log messages from the above.

FYI,

Hope that help.
Happy hacking in trying to find the root cause...
Error Console and Log files are your new best friends :-)

(In reply to Richard Leger from comment #24)

FYI,

  • I haven't seen this issue recently on TB beta channel version on Windows 10...

=>WFM

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: