protz/Manually-Sort-Folders

Use Custom Startup Folder Does Not Work With All Thunderbird 100 and 101 Candidates

Closed this issue · 15 comments

The "Use a custom (startup) folder" under "Extra settings" does not function with all current 100 and 101 candidates. All other functions appear to work fine.

With Thunderbird 102 being released June 28th, it would be nice to see this issue fixed.

Thank you.

I set out to reproduce this issue. I was indeed able to reproduce it some times at the beginning.
But as I repeated the test, for some reason, it stopped reproducing. Now all functions are working fine.
I have not changed anything in the add-on code.

Now that I can no longer reproduce it, I am not able to address this issue.
Further information is required.

I, on the other hand, could not get the startup folder function to work, no matter what I tried. I am going to assume your testing was on Windows.

I am using Manually Sort Folders v2.1.2 on official Mozilla Thunderbird v91.9.1 on Linux Mint Cinnamon v20.3. No other extensions/add-ons are installed. Everything works correctly on Thunderbird v91.9.1 but not on any of the v100-101 candidates, so far.

Could you give me the process you used to get it working correctly and I will try it under Linux.

Okay. I can reproduce it again with TB 101.0b4. Not sure why.
I'll investigate it.

Apparently, sometimes it reproduces and sometimes it does not. When it starts to reproduce, it reproduces for a while, but when it stops reproducing, it doesn't reproduce again for a while. It is very difficult to resolve this issue.

I am using TB 101.0b4 Windows 64-bit (ja) for testing.

But I found one thing.
First, open the error console window by pressing Ctrl+Shift+J.
Then exit TB and launch it again, leaving that error console window.
If you do that, doesn't it reflect the startup folder setting?

This is troubling. When I use the debug console to investigate, the issue does not reproduce.
This makes it very difficult to investigate.

Sorry for the delay in responding. I wanted to do some testing for myself.

I have done as you instructed and the results (screenshots) are attached. Sorry about the "ghosting" on the second image. The second one had six more of the stuff in pink/red that were identical so I didn't include them to save image space. I'm not sure what I'm looking for but you will.

I have created a work-around for myself that works with TB v91.9.1 and TB candidates v100.0b1 through v100.0b4. With Manually Sort Folders v2.1.2 uninstalled, I've written a script that edits TB's session.json with the wanted startup folder after TB shuts down. The next time TB is started the correct startup folder is used. Works 100% of the time. I realize this is just temporary, but it works.

The other thing I have noticed with all the candidates:

If you copy an email into each of the folders in your selected account and shut down TB; the next time you start TB none of those emails show until you actually select the folders. This does not happen with TB v91.9.1 (and probably previous versions). This might have something to do with the issue at hand.

Thunderbird Log 1

Thunderbird Log 2

Thank you for the report.

The console image you showed me is a bit odd.
If you restart the TB with the console open, you should see the same DEBUG log again as the first time,
as shown in the figure below.

image
image

The fact that this is not seen on your end means that MSF is not running at the second startup. Perhaps there is no Manually soft folders item in the menu either.

And the pink error is very concerning, but it appears that the error is internal to the TB. In other words, the TB itself does not seem to be starting up correctly. However, it is not uncommon for errors to occur within the TB, so I am not sure if this is serious or not.

If you copy an email into each of the folders in your selected account and shut down TB; the next time you start TB none of those emails show until you actually select the folders.

I was a little unclear on this. The list of emails in a folder are showed in the right side pane when we select the folder, right?
Is there any way to know the contents of a folder before selecting it?

I apologize for an oversight on my part. There was information way down on the second log capture. I have done the log capture again and attached them. The second capture still had those lengthy errors so I just cropped the pertinent information. The differences in our logging may have to do with differing operating systems. We'll see what happens when the final TB v102 is released.

As for the "disappearing emails"; I had communication with several people and this is a known issue and will be fixed in the next candidate. I have confirmed this by installing the 102.0b1 candidate and the issue is gone, although they've introduced another (unrelated) one.

I have done the "logging" with 102.0b1 and the results are still the same as attached. MSF is in the Tools menu but still does not work. My temporary script solution works as expected.

I will keep testing as the 102 candidates are released. They definitely still have issues so this one might fix itself.

Since you don't see this in Windows, maybe make the extension/add-on "Windows Only". Save you a lot of headache.

Thunderbird Log 1a
Thunderbird Log 2a

Okay, I have found a problem on 102.0b2.
I expected TB calls global method mailTabType.modes.folder.restoreTab() at the startup but didn't.
I have reported this issue on Bugzilla.
https://bugzilla.mozilla.org/show_bug.cgi?id=1772656

Now let's wait for a response.

Sounds good! I hope the TB developers will resolve the issue so MSF will function correctly.

I wish I knew more coding so I could be of help.

Please try the attached beta version if you can.
Countermeasures have been taken on the MSF side to address changes in TB startup behavior.

tbsortfolders.zip

Rename .zip to .xpi to install.

Tested your beta on TB 102.0b3 and everything works as it should. I tried everything to break it, with no luck.

Congratulation, you did an excellent job!

They definitely still have some work cut out for them - TB 102.0b3 still has a few noticeable bugs.

Your beta version works fine with TB 102.0b4. Not tested on Windows or Mac.

Beta version works fine with TB 102.0b5, TB 102.0b6 and TB 102.0b7 (Linux). Not tested on Windows or Mac.

A new version 2.2.0 has been available on ATN.
@TeslaMagic You have helped to make this add-on robust. Thank you.