RealRaven2000 / quickFilters

Thunderbird Add-on: quickFilters
http://quickfilters.quickfolders.org/
Other
49 stars 11 forks source link

copy move menu broken with quickfilters #33

Closed farmatito closed 3 years ago

farmatito commented 3 years ago

Hi, I'm using quickfilters 5.0pre56 on Debian/Devuan 10 and I am experiencing an issue: with quickfilters enabled at least the right click context menu actions copy move move again to ... are not working at all. Drag and drop to the same folders work. Delete is working instead. Disabling quickfilters in the extensions page restores the correct behaviour. Tell me if you need more or different infos.

Best regards, farmatito

P.S.: same happens with thunderbird 78.4.0 on Windows 10

RealRaven2000 commented 3 years ago

Ok, good catch! I am overwriting the global functions MsgMoveMessage() and MsgCopyMessage() in order to wrap them with additional functionality. For URI detection, I used an deprecated interface Ci.nsIRDFService which isn't available anymore - you would have seen an error in the error console stating this.

Please try this quick fix version: quickFilters-wx-5.0pre69.zip

Note - since the previous version did not tidy up the aforementioned functions correctly you must restart after installing it for the first time!

farmatito commented 3 years ago

Hi, tested quickFilters-wx-5.0pre69.zip. Seems to work in Linux Debian/Devuan but is still broken on Windows10.

Ciao, farmatito

RealRaven2000 commented 3 years ago

Hi, tested quickFilters-wx-5.0pre69.zip. Seems to work in Linux Debian/Devuan but is still broken on Windows10.

Ciao, farmatito

Make sure you restart. I tested in Windows 7, no issue there.

farmatito commented 3 years ago

Restart Windows or Thunderbird? I did restart Thunderbird. After more testing on Win10 2004 64bit It does work sometimes (rarely) but most of the times not. I could not detect any kind of pattern as it seems rather erratic behaviour. There must still be something wrong. Sometimes "copy/move again" works, you try again with another entry in the list and it doesn't. Sometimes "copy/move" works, you retry and nothing. Ciao, farmatito

RealRaven2000 commented 3 years ago

Restart Windows or Thunderbird? I did restart Thunderbird. After more testing on Win10 2004 64bit It does work sometimes (rarely) but most of the times not. I could not detect any kind of pattern as it seems rather erratic behaviour. There must still be something wrong.

please check the JavaScript error console (Ctr+Shift+J) for those cases,. you can copy the error log with the right-click menu. Always reset before each test so we can have a full log.

farmatito commented 3 years ago

NAS 2020-10-31 15 02 System Events.zip NAS 2020-10-31 16 02 System Events.zip

There is nothing in the logs. It happens erratically. The only thing I see is that when it starts to refuse to copy or move a email message is that when you click on it in the list it is not showed in the box below the list. At this point tinkering with the app (changing email account, changing folder, double clicking a message to open it in a separate tab) somehow resets the program state and it start working again. The log still is empty. Attached you will find some messages that more often than others trigger the bug. Hope this helps.

farmatito commented 3 years ago

Some steps to reproduce: open thunderbird create an empty folder in one account drag and drop some messages into it change to the folder directly right click with the mouse one of the messages and choose move or copy nothing is shown in the message box below the list from this point "copy/move" and "move again" stop to work with all messages in the directory now exit the folder and change to some other folder of an account go back to test folder select a message with a left mouse click message is shown in the message box below the list mow "copy/move" "move again" works

Ciao, Tito

P.S.: the same steps are also reproducible in linux

RealRaven2000 commented 3 years ago

NAS 2020-10-31 15 02 System Events.zip NAS 2020-10-31 16 02 System Events.zip

These do not look like Thunderbird logs. You need to open the Thunderbird menu - Tools / Developer Tools / Error Console.

For additional messages during message moving / copying with quickFilters enabled, you can do 2 additional things 1) enable quickFilters debug mode from the bottom right of the Advanced tab: image 2) you can enable additional detail during debug mode by right-clicking the debug checkbox, then setting

extensions.quickfilters.debug.msgMove = true image

This will give additional detail. By the way instead of pasting the log into an email and then archiving that, why not use a plain text file?

Typical expected output (I know it's a lot):

quickFilters {MSGMOVE} 15:25:47.580  [19708 ms]   
 quickFilters.executeMoveMessage == quickFilters.MsgMove_Wrapper :false
quickFilters {MSGMOVE} 15:25:47.580  [0 ms]   
Executing wrapped MsgMoveMessage
quickFilters {MSGMOVE} 15:25:47.580  [0 ms]   
 setTimeout(..) for final move / copy call
quickFilters {MSGMOVE} 15:25:47.601  [21 ms]   
Executing original MoveMessage [[
quickFilters {MSGMOVE} 15:25:47.602  [1 ms]   
After original Move/CopyMessage.]]
quickFilters {MSGMOVE} 15:25:47.605  [3 ms]   
OnItemAdded() [xpconnect wrapped nsIMsgDBHdr]
quickFilters {MSGMOVE} 15:25:47.612  [7 ms]   
DeleteOrMoveMsgCompleted(Inbox)
Assistant is off
quickFilters {MSGMOVE} 15:25:47.612  [0 ms]   
Source folder (Inbox) is local inbox = false
quickFilters {MSGMOVE} 15:25:47.612  [0 ms]   
List of LocalMoved = 0 items.
... possibly there will be more DeleteOrMoveMsgCompleted events below...
farmatito commented 3 years ago

These do not look like Thunderbird logs. You need to open the Thunderbird menu - Tools / Developer Tools / Error Console.

They were just some email messages that at first I thought were triggering the issue, but they are not. You could reproduce the issue with the steps defined above. If you could try them with quickfilters debug on it could eventually show that this is rather a thunderbird 78.4.* bug or change in behaviour (that I never noticed before). In the JavaScript error console there was nothing at all.

Ciao, Tito

StuporDaveOsborne commented 3 years ago

Some steps to reproduce: open thunderbird create an empty folder in one account drag and drop some messages into it change to the folder directly right click with the mouse one of the messages and choose move or copy nothing is shown in the message box below the list from this point "copy/move" and "move again" stop to work with all messages in the directory now exit the folder and change to some other folder of an account go back to test folder select a message with a left mouse click message is shown in the message box below the list mow "copy/move" "move again" works

Ciao, Tito

P.S.: the same steps are also reproducible in linux

I was unable to reproduce this on 5Pre69, Win7x64, TB 78.4.0 x32bit. I have numerous accounts and was able to direct mails to folders under both "copy to" and "move to." Please note I did not use QF to create any filters during this test, I only tested the ability to copy/move messages while QF enabled.

farmatito commented 3 years ago

Hi, I'm still able to reproduce this consistently in debian. If I disable quickfilters everything work as expected, if I enable it the strange behaviour is there. I have some quickfilters setup. The steps to reproduce are mostly the same as above:

With quickfilters enabled:

1) open a folder containing some mails from the folder list 2) without selecting any mail with the mouse pointer, just go to a message for exampe the last 3) right click it to open the context menu 4) select "Move" or "Move again" and click the menu 5) nothing happens, message still there

With quickfilters disabled:

1) open a folder containing some mails from the folder list 2) without selecting any mail with the mouse pointer, just go to a message for exampe the last 3) right click it to open the context menu 4) select "Move" or "Move again" and click the menu 5) message gone

I cannot retest it know on windows but I am pretty sure that it works the same there.

Ciao, Tito

RealRaven2000 commented 3 years ago

It still works for me (with prerelease 69) so I need a bit more. can you enable debug mode in quickFilters and also enable the switch msgMove:

This should give us more output in the JavaScript console when you click on the "Move mail" button.

The JavaScript console is in tools / developer tools / error console

farmatito commented 3 years ago

console-export-2020-11-5_20-52-11.txt

Here is the log of multiple tries to move files.

jensmuehle commented 3 years ago

I have the same problem. My usual "Right click on message" -> "Move To" -> "Recent" or "Favorites" or going through the folder structure of one my e-mail account and then selecting a target filter doesn't do anything anymore.

I get error messages like this in the Error console:

NS_ERROR_NOT_AVAILABLE: 2 ActivityManager.jsm:127 getActivity resource://gre/modules/ActivityManager.jsm:127 removeActivity resource://gre/modules/ActivityManager.jsm:80 onFolderRemovedFromQ resource:///modules/activity/autosync.jsm:244 _timerCallback resource:///modules/AppIdleManager.jsm:30

quickFilters {MSGMOVE} 13:20:9.45 [37411 ms]
quickFilters.executeMoveMessage == quickFilters.MsgMove_Wrapper :false

MsgMove_Wrapper() Components.classes['@mozilla.org/rdf/rdf-service;1'] is undefined quickFilters.js:1149

NS_ERROR_NOT_AVAILABLE: 3 ActivityManager.jsm:127 getActivity resource://gre/modules/ActivityManager.jsm:127 removeActivity resource://gre/modules/ActivityManager.jsm:80 onFolderRemovedFromQ resource:///modules/activity/autosync.jsm:244 _timerCallback resource:///modules/AppIdleManager.jsm:30

RealRaven2000 commented 3 years ago

I have the same problem. My usual "Right click on message" -> "Move To" -> "Recent" or "Favorites" or going through the folder structure of one my e-mail account and then selecting a target filter doesn't do anything anymore.

I get error messages like this in the Error console:

Have you tried quickFilters-wx-5.0pre69.zip above? I had removed dependency on the rdf-service in that version.

Or better the latest version, here: https://github.com/RealRaven2000/quickFilters/releases/tag/5.0pre71

jensmuehle commented 3 years ago

Thanks a lot. That is actually working.

You are the owner developer of TB extensions I use who went through the trouble of converting them to the new system TB is using.

I was about to give up on TB because it broke all the extension I am using. I just got one of your licenses (and I also have one for the smart templates).

Thanks again,

Jens

From: Realraven2000 notifications@github.com To: Realraven2000/quickfilters quickFilters@noreply.github.com CC: Jens Mühle jmuhle@ucsd.edu, Comment comment@noreply.github.com Sent: Thursday, 11/19/2020, 02:42 02:42 PST -0800 Subject: Re: [RealRaven2000/quickFilters] copy move menu broken with quickfilters (#33)

I have the same problem. My usual "Right click on message" ->
"Move To" -> "Recent" or "Favorites" or going through the folder
structure of one my e-mail account and then selecting a target
filter doesn't do anything anymore.

I get error messages like this in the Error console:

Have you tried quickFilters-wx-5.0pre69.zip above? I had removed dependency on the rdf-service in that version.

Or better the latest version, here: https://github.com/RealRaven2000/quickFilters/releases/tag/5.0pre71 https://urldefense.com/v3/__https://github.com/RealRaven2000/quickFilters/releases/tag/5.0pre71__;!!Mih3wA!UOobk30i5LYWopCIXkJJYHqBDwVv_HrXHDiINea2lN5Ah8nNNgT-8jh6mNLckeY$

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/RealRaven2000/quickFilters/issues/33*issuecomment-730286369__;Iw!!Mih3wA!UOobk30i5LYWopCIXkJJYHqBDwVv_HrXHDiINea2lN5Ah8nNNgT-8jh60Eefg1g$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ACHIQ5ZCJDLWGEKEV2VRXEDSQTZBLANCNFSM4TF43MNA__;!!Mih3wA!UOobk30i5LYWopCIXkJJYHqBDwVv_HrXHDiINea2lN5Ah8nNNgT-8jh67dq2mGg$.

jensmuehle commented 3 years ago

There is a minor issue. When making a filter your addon suggest a name based on the target filter. It used to use something like >> in this suggested name, now I see this funny black diamond with a question mark. Not a big issue. Note, that I usually add the filter criteria to the name as the basic extension only allows to search in there.

Best Regards,

Jens

From: Jens.muehle@gmail.com jens.muehle@gmail.com To: Realraven2000/quickfilters reply@reply.github.com, Realraven2000 notifications@github.com, Realraven2000/quickfilters quickFilters@noreply.github.com CC: Comment comment@noreply.github.com Sent: Thursday, 11/19/2020, 11:43 11:43 PST -0800 Subject: Re: [RealRaven2000/quickFilters] copy move menu broken with quickfilters (#33)

Thanks a lot. That is actually working.

You are the owner developer of TB extensions I use who went through the trouble of converting them to the new system TB is using.

I was about to give up on TB because it broke all the extension I am using. I just got one of your licenses (and I also have one for the smart templates).

Thanks again,

Jens

From: Realraven2000 notifications@github.com To: Realraven2000/quickfilters quickFilters@noreply.github.com CC: Jens Mühle jmuhle@ucsd.edu, Comment comment@noreply.github.com Sent: Thursday, 11/19/2020, 02:42 02:42 PST -0800 Subject: Re: [RealRaven2000/quickFilters] copy move menu broken with quickfilters (#33)

I have the same problem. My usual "Right click on message" ->
"Move To" -> "Recent" or "Favorites" or going through the folder
structure of one my e-mail account and then selecting a target
filter doesn't do anything anymore.

I get error messages like this in the Error console:

Have you tried quickFilters-wx-5.0pre69.zip above? I had removed dependency on the rdf-service in that version.

Or better the latest version, here: https://github.com/RealRaven2000/quickFilters/releases/tag/5.0pre71 https://urldefense.com/v3/__https://github.com/RealRaven2000/quickFilters/releases/tag/5.0pre71__;!!Mih3wA!UOobk30i5LYWopCIXkJJYHqBDwVv_HrXHDiINea2lN5Ah8nNNgT-8jh6mNLckeY$

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/RealRaven2000/quickFilters/issues/33*issuecomment-730286369__;Iw!!Mih3wA!UOobk30i5LYWopCIXkJJYHqBDwVv_HrXHDiINea2lN5Ah8nNNgT-8jh60Eefg1g$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ACHIQ5ZCJDLWGEKEV2VRXEDSQTZBLANCNFSM4TF43MNA__;!!Mih3wA!UOobk30i5LYWopCIXkJJYHqBDwVv_HrXHDiINea2lN5Ah8nNNgT-8jh67dq2mGg$.

RealRaven2000 commented 3 years ago

There is a minor issue. When making a filter your addon suggest a name based on the target filter. It used to use something like >> in this suggested name, now I see this funny black diamond with a question mark. Not a big issue. Note, that I usually add the filter criteria to the name as the basic extension only allows to search in there. Best Regards, Jens

probably an encoding issue in the default prefs, you can set the delimiter character manually here:

image

jensmuehle commented 3 years ago

Wonderful. That did the trick.

Thanks,

Jens

From: Realraven2000 notifications@github.com To: Realraven2000/quickfilters quickFilters@noreply.github.com CC: Jens Mühle jmuhle@ucsd.edu, Comment comment@noreply.github.com Sent: Thursday, 11/19/2020, 12:44 12:44 PST -0800 Subject: Re: [RealRaven2000/quickFilters] copy move menu broken with quickfilters (#33)

There is a minor issue. When making a filter your addon suggest a
name based on the target filter. It used to use something like >>
in this suggested name, now I see this funny black diamond with a
question mark. Not a big issue. Note, that I usually add the
filter criteria to the name as the basic extension only allows to
search in there. Best Regards, Jens

probably an encoding issue in the default prefs, you can set the delimiter character manually here:

  • right-click the filter assistant to show preferen ces
  • open New Filter Properties
  • Under Naming rules, enter your favorite delimiter:

image https://urldefense.com/v3/__https://user-images.githubusercontent.com/6314674/99721969-df592b00-2aa7-11eb-82c8-4cd941968147.png__;!!Mih3wA!UVjMrMi2vXdL1molum8_eicYEkh8DfkFL0629QYQ_3JHRD81V7IBr8nxCoRrIp0$

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/RealRaven2000/quickFilters/issues/33*issuecomment-730626520__;Iw!!Mih3wA!UVjMrMi2vXdL1molum8_eicYEkh8DfkFL0629QYQ_3JHRD81V7IBr8nxUm2B4Ew$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ACHIQ5YFEXT3NOA76AGLYYTSQV7TDANCNFSM4TF43MNA__;!!Mih3wA!UVjMrMi2vXdL1molum8_eicYEkh8DfkFL0629QYQ_3JHRD81V7IBr8nxi6uJ5g8$.

RealRaven2000 commented 3 years ago

I just released 5.0 officially which should close this issue