Closed Bug 1745599 Opened 4 years ago Closed 4 years ago

91.4.0 Thunderbird not checking for mail on startup due to session.json

Categories

(Thunderbird :: Preferences, defect)

Thunderbird 91
x86_64
Windows 10
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1735531

People

(Reporter: gsain, Unassigned)

References

Details

(Keywords: dupeme, Whiteboard: [support])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0

Steps to reproduce:

Just noticed Thunderbird 91.4.0 not checking mail on starting. Same behavior in trouble shooting mode ( only have 2 extensions birdiesync and manually sort folders) which I disabled. No change. Uninstalled, then reinstalled and restore profile etc. from Macrium file and folder backup. Checked to make sure on-line. Check default account set to my roadrunner email. Tried turning off and then back on check email at startup for my 3 accounts - roadrunner pop, mindspring pop, google imap - then restarting. Had to set get mail timers to 1 minute - that works to get initial mail.

Actual results:

Does not get email on startup as set for each account .... waits for timer to first get mail ... reduced timer to 1 minute or have to hit Get Messages to get initial mail

Expected results:

Should retrieve new mail for each account on thunderbird startup.

OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64
Summary: 91.4.0 Thunderbird not checking for mail on startup → 91.4.0 Thunderbird not checking for mail on startup 64 bit version, 32 bit working

I am running 64 bit version. Just checked my wife's which is 32 bit 91.4.0 and it is properly getting mail at startup

Keywords: dupeme
Summary: 91.4.0 Thunderbird not checking for mail on startup 64 bit version, 32 bit working → 91.4.0 Thunderbird not checking for mail on startup
Whiteboard: [support]

Did some experimenting backing off to 91.0 and 2 subsequent versions prior to 91.4.0. The bug is still there. Since all use the same profile and accounts, I assume the bug of failing to check mail is embedded now in either the account settings or profile somewhere. The behavior definitely did not start until 91.4.0.

I'm also seeing this problem in 32 bit 91.4.1.

I have multiple email accounts and no download on startup is attempted for any of the accounts. Even after the default polling time no download is attempted. Initiating a manual 'Get All New Messages' downloads emails as expected and also restarts the subsequent polling of messages.

OS is Windows 10.

Well, got it working again to check mail on startup for 91.5. 64 bit. But now problems on my wife's TB 91.5 32 bit below match Gary P's - not checking on start-up or timed interval. Houston, you have a problem.
Not sure exactly what fixed it on the TB 91.5 64 bit home pc. Was doing general searches on TB startup problems and checking prior failures to get mail on startup instances and looking for housekeeping things that were not too invasive before considering clean install, new profile, etc.
I checked that the default account setting was not Local Folders by viewing presf.js bug 1584861
Verified that check the proper servers box was selected for each account. Default account set correctly - changed to another and back with clear cache's in between and restarted TB in between..
Looked at other TB startup problems https://support.mozilla.org/en-US/questions/1139817 I did not have the oldparentlock but cleaned the other files. I went into trouble shooting mode with all extensions off - same problem (Trouble shooting mode did reset my customizations although I had unchecked that box).
I deleted an old profile that was not in use.
Also I cleared TB cache and restarted TB multiple times as I did various changes and rebooted Windows after clearing the cache the last time.

I have 3 add ons - birdie sync, google calendar, and manually sort profiles - which I had used around the time the problem started. I currently have manually sort profiles disabled and now it is checking for email on startup. So, has to be the add-on manually sort folders ?
Wrong, I re-enabled manually sort folders and restarted Thunderbird and it still checked for email on startup. Say what .....
I restarted thunderbird multiple times, cleared cache multiple times along the way. So some combination reset something and it started working on my 64 bit version.

So I told my wife that she did not have to to hit the check email on startup on the home pc and she shared that her work TB 91.5 32 bit is now not checking email on startup nor timed. She only has the birdie sync extension installed, no manually sort folders. Recreating the list of things I had done on the home pc to see if I can get hers checking mail again. Urgh ....
My guess is that disabling manually sort, then clearing cache, then restarting might have fixed it. There was something I deleted that caused my menu bar to reset to default selections, so had to customize again.

So none of the TB account settings on either system were changed. The only true change was some regression introduced in the 91.xxx code.
Both systems are not set to update automatically. My wife thinks hers started the other day with the 91.5 32bit update

OK, I got my wife's 32 bit 91.5 checking mail on startup and timed both working again.
Step 1 - With TB closed, I searched for parent.lock and found it in the profile folder for TB. That file is supposed to deleted when TB is closed, I believe. So in the profile folder I deleted per link below:
old parent.lock - did not find this file
session.json - deleted
xulstore.json - deleted
parent.lock - deleted
Step 2Then I edited profile.ini and deleted the line Default=1 per
"re :'profiles.ini' file
It has 'Default=1' at the bottom. ( my wife's system only has 1 profile)
This line is usually created when there are additional profile names and they are usually written after the 'Default=1'.
As you do not have any other profile names and everything has now been cleared in Windows cache files, edit the 'profiles.ini' file, removing that last 'Default=1' line.
Save the file."
Step 3 - Then I ran Disk Cleanup on my C drive to delete temporary files and
Step 4 -ran Windows 10 Storage Sense which found more temp stuff to delete.
Step 5- Rebooted.
Step 6 - Started 91.5 32 bit and it checked mail and does timed checks now.

These actions were in https://support.mozilla.org/en-US/questions/1139817 related to Thunderbird will not start .... or apparently now does not necessarily start or close correctly.

I had separately before this tried switching default account, checked and uncheck get mail on startup and frequency, changed timers,clearing TB cache, disabling single addon with no effect and rebooting windows. My wife's system has 2 pops accounts and separate folders for each. The home system has 2 pops accounts with the shared inbox, etc. and an imap account with it's own folders. Both systems are Windows 10 2021 H2 with all current patches.
The only thing I had to fix on her TB like mine were the toolbar customizations were lost.

Since updating from 91.4.1 to 91.5.0 my emails still didn't download on startup, however did download automatically after the default polling time. I followed gsain's steps and closed down Thunderbird and deleted session.json, xulstore.json and parent.lock. On restarting Thunderbird my emails downloaded straight away, which was good news. I've compared the recreated working session.json, xulstore.json and parent.lock files with the non-working versions and found the cause (at least for me) of why my emails weren't downloading on startup.

Are you saying that that bit of XML was not in the new sessions.json, or there was some difference in the details.

Apologies, but when I attached the file my comment was submitted before I had finished! Here's the rest of the message:

I found that removing the following lines from session.json allowed the emails to be downloaded at startup:

          {
            "mode": "message",
            "state": {},
            "ext": {}
          }

The lines appear to be related to a non-existant email message tab. Here's a shortened copy of my non-working session.json file:

Please ignore the cut and paste error reference to "... a shortened copy ..." in my previous comment.

Also I have this problem starting from 91.5.0 and then also in 91.5.1 (win7 x64, TB 91.5.1 x64).
Resolved removing the empty lines mode/state/ext from session.json as specified by Gary P two messages up. Thank you!

But I think that this is a bug that have to be resolved by programmers, because not everyone read the messages here and have the clue to edit json files.

Agree - whilst people might be able to edit or delete session.json, the error should not occur in the first place.

I have the same problem starting with 91.5.0 and still existing in 91.5.1. I do not have the 3 objects in the session.json. Removing it anyway also did not fix it.
I am on Linux, so the problem is not Windows specific. After downgrading to 91.4.1 I have the same problem there.
What is confusing me is the object "folderURI": "mailbox://nobody@Local%20Folders/Inbox" in the session.json. Shouldn't that be somehow the default mail account? Setting another e-mail account as default does not change anything in that file.

For those who have not yet tried Gary's workaround, or the workaround did not work, does your problem reproduce with version 91.3.2? http://ftp.mozilla.org/pub/thunderbird/releases/91.3.2/win64/en-US/

Thomas, what do you make of comment 6 + comment 8?

did you remove?

old parent.lock - did not find this file
session.json - deleted
xulstore.json - deleted
parent.lock - deleted

I removed all 3 files to get mine checking mail at startup and then timed. I did not have the oldparent.lock file. Apparently from the earlier bug the these files are recreated on restarting thunderbird after doing the deletes. I understand what was found earlier in the session.json, but parent lock is supposed to delete when TB closes. I suspect that the difference in the session.json might be just a symptom of the broader problem.

"These actions were in https://support.mozilla.org/en-US/questions/1139817 related to Thunderbird will not start .... or apparently now does not necessarily start or close correctly."

So, I also suspect since it did not show up on my wife's system for weeks after mine, there is some action by the user or condition set that gets things sideways. Since I deleted the files the other day on both my system and my wife's, 64 bit and 32 bit, both have worked perfectly.

My cursory understanding is that the .json files are created as repositories / result of some action or process. Just searching on what these generally are, the xulstore.json appears to store toobar stuff, etc., which would explain why after deleting it I had to customize my toolbar again. Would not seem logically to be a likely cause of the issue.

Searching on parent.lock you find The '''parent. lock''' is used for example in Firefox when it is running to let Firefox "know" the Profile was in use when the PC shutdown and Firefox didn't get shutdown properly. ... lock''' file as Firefox will "see" that the Profile is "in use" and won't launch that Profile as a result of that "flag" which is a 0kb "LOCK" file. I think that explains why in the earlier bug TB would not start at all, but the condition of it not deleting at close of TB would seem to indicate an error condition in shutdown of TB, but unlike the earlier bugs TB will still start, just not check mail properly. I assume session.json is doing basically what is described here https://simonsmith.io/speeding-things-up-with-sessionstorage.

My IT knowledge is dated, old mainframe guy, but looking at the issue as something related to workflow, given this appears to be a condition TB is in when it closes that causes some variation in session.json and then parent lock to exist after close, and that so few people are reporting it or noticing it. I do not think it is simply starting TB and reading emails. So then there is replying to emails, which in simple form probably works fine. There is a variation on replies though and that is Drafts. TB has a timer that saves an open reply as a Draft. Usually I clean up Drafts replies before I close TB. But occasionally I will create a new email with or without putting the recipient in, maybe just a Subject and Body text to start with. That's a less frequent instance for me, a time or two a month ?? Then there are emails I compose, that auto save as Drafts, that I then discard and close. Then there is Calendar, e.g. taking a message and converting it to a Calendar entry. You have Forwarding. So logically from a workflow perspective, there is a relatively small set of actions a user typically takes that causes the issue or change of state in the system, but it is not an everyday pattern. Since it happens on both 64 bit and 32 bit versions, has to be some common logic that is impacted. I am going to do some simple combinations to see if I can get it to fail again. I think it took me a day or 2 to realize it was not checking at startup, because it was still doing the timed checks, e.g. started TB, walked away, came back and timed checks had worked.

Oops, stepped on someone else's update while pondering mine.

See Also: → 1735531

(In reply to Wayne Mery (:wsmwk) from comment #13)

For those who have not yet tried Gary's workaround, or the workaround did not work, does your problem reproduce with version 91.3.2? http://ftp.mozilla.org/pub/thunderbird/releases/91.3.2/win64/en-US/

Unfortunately this does not solve the issue for me. Did the downgrade on Linux. Earlier versions I could not test due to dependency issues.

See Also: → 1752842

For those of you seeing this problem and using gmx accounts, please see bug 1752842 comment 4. I'm duplicating this to bug 1752842 because it contains logs we can look at. If you are not using gmx accounts, please file new bug with logs, thanks.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE

So on my original bug report unlike 1752842 my email was not checking on startup for both my 2 pop accounts and my gmail imap account. So is this really a dupe. I have not had any issues since removing the old session.json file and the parent.lock file and letting them get replaced.

Also I did not do any changes to the mail server info as suggested in 1752842.

Deleting c:\Users\trei\AppData\Roaming\Thunderbird\Profiles\j5akdx98.default\session.json solved my issue!

:gsain: you're right, this is different, I'm duplicating this to bug 1735531 instead, will send a fix there.

Summary: 91.4.0 Thunderbird not checking for mail on startup → 91.4.0 Thunderbird not checking for mail on startup due to session.json
See Also: 1735531
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: