Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't start every time #190

Open
ptkid2 opened this issue Sep 23, 2022 · 16 comments
Open

Doesn't start every time #190

ptkid2 opened this issue Sep 23, 2022 · 16 comments

Comments

@ptkid2
Copy link

ptkid2 commented Sep 23, 2022

Thunderbird 102.3.0 (64-bit) When I start Thunderbird, Manually Sort Folders does not always start. In particular, I have a specific custom folder set to open to when I start Thunderbird. This will work a few times, then will not. If I disable then enable the add-on and restart Thunderbird it will work again a few times then stop working. Other functions of the add-on seem to work.

@itagagaki
Copy link
Collaborator

First open the error console with Ctrl+Shift+J.
Next, disable Manually sort folders in the Add-on Manager and enable it again.
You should see the following output in the error console.

image

Please let us know how the console outputs when you have faced some issues at startup operation.

@itagagaki
Copy link
Collaborator

If you do not find anything wrong with the console output, please replace MSF with the one attached here and try the same.
There are no functional changes, but I have added console output in case of errors.

tbsortfolders.zip

@Alt68er
Copy link

Alt68er commented Oct 3, 2022

I can confirm exactly this behavior on my latest TB under Windows 11 21H2 latest update, but sometimes it works fine without de- and re-activating MSF but only by restarting TB...
This behavior is happening with the original MSF as well as with the one offered here in the previous comment.

@itagagaki
Copy link
Collaborator

Thanks for the report. For those of you who can occasionally see this behavior, please replace MSF for the above and check the logs with Ctrl+Shift+J when the issue occurs.

@itagagaki
Copy link
Collaborator

I may have found the cause. Are you perhaps displaying a favorite folders view or something else in addition to the all folders view in the folders pane?

@itagagaki
Copy link
Collaborator

I have reported it at Bugzilla as it may be a Thunderbird bug.
https://bugzilla.mozilla.org/show_bug.cgi?id=1798133

@ptkid2
Copy link
Author

ptkid2 commented Oct 31, 2022 via email

@itagagaki
Copy link
Collaborator

I have resolved the Thunderbird issue that I believe is related to this phenomenon and have submitted a patch. The patch is currently waiting on review. Let's wait for good news.

@Alt68er
Copy link

Alt68er commented Nov 16, 2022

Hi, even the latest version 2.2.4 has the same behavior: sometimes it works fine one or even several times, and then suddenly it stops working and mest be disabled/enabled to get working again...
I'm running TB 102.4.2 on Win11 22H2,

@itagagaki
Copy link
Collaborator

The behavior may be due to a bug in Thunderbird.
I reported the bug to Bugzilla.
https://bugzilla.mozilla.org/show_bug.cgi?id=1798133

I then created a patch to fix the bug and submitted it to the Mozilla Thunderbird team.
https://phabricator.services.mozilla.com/D161396

Maybe they will review it soon. And hopefully, they will merge this patch into the Thunderbird release in the near future.

Next time you feel that MSF is not starting when Thunderbird starts, try Ctrl+Shift+J to open the error console.
Usually, you will find lines beginning with tbsortfolders as follows.
(last "startup folder:" will only appear if the startup folder is set to a specific folder.)

1668609399115 tbsortfolders.folderPane DEBUG Init
1668609399115 tbsortfolders.folderPane DEBUG Accounts: account15,account3,account2,...
1668609399115 tbsortfolders.folderPane DEBUG Add observer
1668609399120 tbsortfolders.folderPane DEBUG startup folder: mailbox://nobody@Local%20Folders/Inbox

If there are any error messages around the above lines, or if the situation is different from the example above, please report them.

@ptkid2
Copy link
Author

ptkid2 commented Nov 16, 2022 via email

@Ryusennin
Copy link

I'm having the same issue with the startup folder (mine is local inbox). Sometimes it will work, sometimes it won't like today.

1670487415638 tbsortfolders.folderPane DEBUG Init
1670487415638 tbsortfolders.folderPane DEBUG Accounts: account4,etc...
1670487415638 tbsortfolders.folderPane DEBUG Add observer
1670487415638 tbsortfolders.folderPane DEBUG startup folder: mailbox://nobody@Local%20Folders/Inbox
1670487415638 tbsortfolders.folderPane DEBUG mailbox://nobody@Local%20Folders/Inbox not found

@itagagaki
Copy link
Collaborator

itagagaki commented Dec 8, 2022

@Ryusennin Thanks for the report.
If Thunderbird bug 1798133 is the cause, the log should show "selectFolder failed".
I have submitted a patch to fix the Thunderbird bug. If it is accepted, the problem should be fixed in a future version of Thunderbird.
However, your log shows "mailbox://nobody@Local%20Folders/Inbox not found", so the cause is different.
It is odd because that folder should exist...

Hypothetically, it is possible that the add-on is being started before Thunderbird has fully prepared the folder database.
I will investigate.

@itagagaki
Copy link
Collaborator

MSF 2.2.6 is now available.
The startup process has been improved. This may solve your issue. However, the fix for the Thunderbird bug has not been released yet, so that may not solve your issue yet. If you still have problems, please take another look at the error console.

@Ryusennin
Copy link

Fumihiko-san, thank you for the update. I have made a dozen of tests (exit/relaunch) and it seems the plugin now behaves as intended. For exemple I select the Junk folder, and after exiting/relaunching Thunderbird it automatically goes back to my default folder which is Inbox. All good!

I will continue monitoring the situation for the next few days, but so far it seems to be fixed.

@itagagaki
Copy link
Collaborator

I have found two causes for this issue.
One is a bug in Thunderbird.
They have incorporated a fix for it into branch 110.
The other is a problem with the timing of the start of this add-on.
I have incorporated a workaround for it into 2.2.6.
@Ryusennin reported that this improved the situation. Thank you.
But I will keep this issue open until Thunderbird 110 is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants