EditEmailSubject-MX icon indicating copy to clipboard operation
EditEmailSubject-MX copied to clipboard

Changing subject leads to two messages in inbox. Error « Message not found after rename »

Open mbrouillet opened this issue 1 year ago • 13 comments

Hello,

When I change the subject,

  • the new message appears in inbox immediately.
  • the dialog box stays greyed out for roughly 10 seconds.
  • the dialog box is un-greyed and a red cross appears temporarily over it.
  • I need to Cancel the dialog box and manually delete the original message.
  • In the TB console, I have the following error. Screenshot_20240412_114741

It happens both, whether I record temporary message to ESS or not.

Thunderbird 115.9.0 (64 bits) : 115.9.0+build1-0ubuntu0.22.04.1

Screenshot_20240412_123544

mbrouillet avatar Apr 12 '24 10:04 mbrouillet

In TB 128 the original message stays in the inbox and is not copied to EES folder. Error message now: Error: Warning processing folder: Support deprecated since Thunderbird 121 and removed in Manifest V3: messages.queryInfo.folder has been replaced by messages.queryInfo.folderId. 20 editemailsubject.mjs:144 checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:144

bege10 avatar Aug 24 '24 22:08 bege10

The error is not a fatal error, it is just a deprecation notice. The function still works and should not be the cause for what you are observing:

image

Unless you have manually set extensions.webextensions.warnings-as-errors to true:

image

The error then stops the execution. What you are observing is different from what the OP is observing.

@mbrouillet : Your email server is currently incompatible with EES. I put safeguards in place to identify these cases and prevent data loss. I have no idea why your server rejects subject renames. I assume this is a google account?

jobisoft avatar Aug 25 '24 08:08 jobisoft

Closing as duplicate of https://github.com/cleidigh/EditEmailSubject-MX/issues/81

jobisoft avatar Aug 25 '24 08:08 jobisoft

@bege10 : I will update the used methods to use the new non-deprecated syntax in v7.5. You could give it a try now already: https://github.com/cleidigh/EditEmailSubject-MX/issues/86#issuecomment-2308740748

jobisoft avatar Aug 25 '24 09:08 jobisoft

@jobisoft

@bege10 : I will update the used methods to use the new non-deprecated syntax in v7.5. You could give it a try now already: #86 (comment)

Now the behavior is inconsistent. First attempt: Works correct Second attempt: Throbber takes long, then red X and editing window returns. After clicking cancel the message is edited but no copy in EES-Temp Third attempt: Throbber takes long, then red X and editing window returns. After clicking cancel nothing has changed and no copy in EES-Temp. But after returning to source folder the message has changed. (Well, it is there twice because I clicked OK before I clicked cancel.) Fourth attempt: Throbber takes long, editing window returns without red X but one can see that the message is edited, again no copy in EES-Temp

Edit: In the meantime I had hibernated the computer and tried it again after an hour (TB still open) and it worked correct several times. I closed TB and started it again. Another type of bug happened: Throbber takes long, then red X and editing window returns. After clicking cancel nothing has changed and no copy in EES-Temp. But after returning to source folder the edited and the original message were there.

bege10 avatar Aug 25 '24 10:08 bege10

This is very confusing, I added debug log statements: EES_7.6.zip

You should now see something like this on the console:

image

What do you see on the console?

jobisoft avatar Aug 26 '24 08:08 jobisoft

@jobisoft

  • I updated the add-on and edited 2 messages. That worked correct and the output on the console was as in your example.
  • I restarted TB and tried again to edit messages.
  • Editing the first message took about three times longer than before restarting but ended up OK.
  • The second and following messages took even longer, red X and the editing window returned. After canceling, both the edited and the original message were in the source folder.
21:43:38.501 New message 
…

[editemailsubject.mjs:113:11](moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs)
21:43:38.507 Importing modified message into tempFolder [editemailsubject.mjs:130:11](moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs)
21:43:38.536 Created [7 -> 8] [editemailsubject.mjs:141:11](moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs)
21:43:38.536 Move imported message into source folder [editemailsubject.mjs:144:11](moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs)
21:43:48.844 Failed to move message into source folder [editemailsubject.mjs:177:13](moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs)
21:43:48.848
Error: Message not found after rename
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:168
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    checkFolder moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:170
    newMovedMsgHeader moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:174
    updateMessage moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs:148
    okAndInput moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/popup/editemailsubjectPopup.js:83
    EventListener.handleEvent* moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/popup/editemailsubjectPopup.js:27
[editemailsubject.mjs:178:13](moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs)
21:43:48.852 No moved msg header found. [editemailsubject.mjs:182:13](moz-extension://24ccb446-1dc0-4daa-994b-298a83758830/content/scripts/editemailsubject.mjs)

bege10 avatar Aug 27 '24 19:08 bege10

What happens is that the extension does not see the modified message in the source folder, even though it is there.

The correct action in this case is then to not delete the original message in the source folder. Since the message was indeed copied, you have both. This is a measure to protect your data and not delete messages erroneously.

At the moment, I have no idea why your server is causing this.

jobisoft avatar Aug 27 '24 19:08 jobisoft

I used messages from three accounts - Freenet, GMX and T-Online. All show the same behavior. I also deactivated all add-ons except EES. 🤔

bege10 avatar Aug 27 '24 20:08 bege10

I will use you as beta tester :-)

jobisoft avatar Aug 27 '24 20:08 jobisoft

The problem did not happen for some time. Everything worked as expected. Thank you very much for your commitment.

bege10 avatar Sep 26 '24 19:09 bege10

I prepared some fixes to the IMAP handling code of the messages API. Once they landed, I can merge this and release a new version of EES.

jobisoft avatar Oct 11 '24 12:10 jobisoft

nvm

ptrooms avatar May 03 '25 21:05 ptrooms