Closed Bug 1735544 Opened 10 months ago Closed 9 months ago

Addresses seem to disappear (stop displaying and autocompleting) from the address book every 3-4 days. restart helps

Categories

(Thunderbird :: Address Book, defect)

Thunderbird 91
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: csongor, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [datalossy])

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

Steps to reproduce:

I wanted to forward an email to someone. Started to type in the addressee's email address but the autocomplete did not work.

Actual results:

I needed to type in the whole address.

In order to check what went wrong, I opened the Address Book to see if her address was there but it wasn't. So, I quit TB and restarted it. I opened the Address Book again and the address was there. I also was able to use that email address in a mail forwarding, the auto-complete worked just fine.

It happens to me quite frequently, quit and restart always solves the issue but it is still quite annoying. How could I avoid it or what should I do next time to help fixing the bug?

Expected results:

The Address Book should not forget email addresses.

Please start Windows' safe mode with networking enabled

Does problem go away?

Flags: needinfo?(csongor)

Unfortunately, the problem appears unpredictably. Once every 3-4 days. I don't really want to run my windows in safe mode for so long, I'd like to work with it.

If I restart it in safe mode only after the problem came up, it also means restarting TB, which solves the issue in itself, even if I don't restart Windows. So, it wouldn't tell anything.

Flags: needinfo?(csongor)

It happens to me quite frequently, quit and restart always solves the issue but it is still quite annoying. How could I avoid it or what should I do next time to help fixing the bug?

The point of safe mode is to demonstrate that you can reproduce this issue in a controlled environment. If it doesn't reproduce AFTER starting in safe mode, that tells us something about the problem.

Flags: needinfo?(csongor)

I understand that but I cannot use my computer in safe mode for several days, until the bug comes up. Because it appears quite unpredictably, maybe I should use my computer in safe mode for an even longer time. Or maybe safe mode just delays the problem to occur, does not eliminate it completely. After how many days could we say reliably that "OK, in safe mode the bug does not occur"?

Instead of this, I hoped there is a more direct way of catching the bug. For example, I am willing to install a debug version of TB and use that one until it tells you where things go wrong.

Since I reported the bug, I saw the problem again with a different email address too. When it was the case, there were at least two email addresses that I could not find in the address book. I exported the address book when this happened, and a minute later, after I restarted TB, I exported the address book again.

By comparing the CSV outputs, I saw that only those two addresses are different.

In the wrong exported file, I can see two
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
lines while after restarting TB, that two lines showing the correct email address and the name in both rows.

One of the addresses is the following:
Libre Office felhasználói kérdések és,válaszok,Libre Office felhasználói kérdések és válaszok,,libreoffice@lev-lista.hu,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
while the other one is somebody's private address I don't want to publish here. That one has no non-ASCII characters at all.

The next time the bug occurs with one email address, I will

  • create the export
  • check whether the other address works
  • check several other email addresses, based on the CSV I created yesterday.

I will come back with the result. Stay tuned.

Flags: needinfo?(csongor)

Thanks. So it's not really frequent.

Do you have any addons installed?
Next time it happens, Check tools > developer > error console

Flags: needinfo?(csongor)
Summary: Addresses disappear from the address book (restart helps) → Addresses seem to disappear (stop displaying and autocompleting) from the address book every 3-4 days. restart helps
Whiteboard: [datalossy]

Do you have any addons installed?

Yes, Colored Folders (https://lab5.ch/colored-folders) is the only one but it has nothing to do with the address book.

Next time it happens, Check tools > developer > error console
Thanks, I will do that.

It is also a probably important fact that I upgraded TB to 91.2.0 just recently, probably from 78.0. Prior to that one, I didn't have such problems.

Flags: needinfo?(csongor)
Blocks: tb91found

Today I had the issue again. Last night it was still OK, I hibernated win10 and in the morning I turned the computer on again. TB was still running but the address book issue appeared.

I had many items in the error console from the past but there were only some from today. Here are they:

12:17:04.644 NotAllowedError: Could not remove the file at C:\Users\<my-user-name>\AppData\Local\Temp\nscopy-26.tmp
12:18:04.666 NotAllowedError: Could not remove the file at C:\Users\<my-user-name>\AppData\Local\Temp\nscopy-27.tmp
12:19:04.671 NotAllowedError: Could not remove the file at C:\Users\<my-user-name>\AppData\Local\Temp\nscopy-28.tmp
12:19:28.621 2152857611 ContentDispatchChooser.jsm:287
handleURI Choo
openLinkExternally chrome://communicator/content/contentAreaClick.js:253
contentAreaClick chrome://communicator/content/contentAreaClick.js:223
onclick chrome://messenger/content/messenger.xhtml:1
12:20:04.666 NotAllowedError: Could not remove the file at C:\Users\<my-user-name>\AppData\Local\Temp\nscopy-29.tmp
12:21:04.680 NotAllowedError: Could not remove the file at C:\Users\<my-user-name>\AppData\Local\Temp\nscopy-30.tmp
12:21:16.979 <Provider> does not support changing store on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/reactjs/react-redux/releases/tag/v2.0.0 for the migration instructions.

The mentioned nscopy*.tmp files were there in the Temp folder but, unfortunately, I restarted TB before trying to delete them manually. Restarting TB deleted the files so I don't know why it was not allowed to delete them.

I hope this helps but if not, I will try to delete the files manually the next time. What else can I do in order to provide more info?

Oops, sorry for the large font.

I pasted the log between two separtors consisting of some dashes. Bugzilla seems to convert that block into this large font.

The problem occurred again. There was no hibernation or rebooting since I had the problem the last time. Therefore, we can exclude the hibernation as a reason.

There are some interesting key points though.

  • Now only one of the two email addresses was missing from the mailbox (the one I wrote earlier: libreoffice@lev-lista.hu). The other one was present.
  • The error console showed similar "Could not remove" error messages to the ones I wrote above
  • Before quitting TB, I tried to delete the nscopy* files manually. I was able to delete all of them (11 files).
  • after restarting TB, the missing address has returned to the addressbook.

Does this help where to look for the bug?

How odd. I wonder what's in the files that can't be deleted. When you get the message again, copy one to a safe place (ie. out of the temp directory) and try to open it with a text editor.

Is your Thunderbird profile in the default place, which would be C:\Users\<you>\AppData\Roaming\Thunderbird\Profiles on most systems?

I checked the content of those files. They are various emails I was composing during the recent hours. They are simple plain emails, like this:

From - Mon, 18 Oct 2021 12:49:36 GMT
X-Mozilla-Status: 0000
X-Mozilla-Status2: 00000000
Message-ID: <a3a2af93-41d5-536c-529e-c70613a1a7ea@halmai.hu>
Date: Mon, 18 Oct 2021 23:49:36 +1100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
 Thunderbird/91.2.0
...

As per the profile path, no, my profile is not at the default location. It is at E:\halmai\Mail. This is how I have been using TB for ~8 years and it started to go wrong since the latest upgrade.

Does this help?

Oh, there is one more interesting thing!

Before restarting TB, I exported the address book again. It has 4 missing items now, compared to the one that I saved a couple of days ago, after a fresh restart. All the four addressees were parties to who I did send an email to during the last TB session.

I can even reproduce the problem.

When I start TB, I can send emails to anybody.
If I send an email to X, X is removed from the address book.
If I send an email to Y, Y is also removed from the address book.
And so on.

So, addrress book seems to be use-only-once. HAHA! :D

That is interesting. We update a counter on each address whenever you use it, but the counter is just another line in a database, so the rest of the data should be untouched. I don't think we've done anything that would affect that since 78.

Are you still using the same abook.sqlite file (assuming it's the default book) as you were when the problem began? Maybe try this:

  • export your contacts
  • close Thunderbird
  • rename abook.sqlite to something else
  • start Thunderbird (which should recreate an empty abook.sqlite) and import your contacts

If that works I'd like to take a look at the original file to see if there's anything weird about it. Would you be willing to email it to me?

Another thing that could be happening is some external program "helping" by messing with the files in your profile. That'd be weird but typically changes to the address books are written to a separate file before being merged to the main file, so something funny could be going on there.

I haven't changed anything about how to store the address book. Therefore, I believe it is the standard file (in the custom profile folder).

There are several abook.* files in my profile, including abook.sqlite and abook.v2.sqlite too. They have the same size (exactly 10*32k) and almost the same content.

I made the steps you wrote in the bullet points. Surprisingly, after restarting TB, the address book was not empty. Maybe it was restored from abook.v2.sqlite? I didn't need to import it back.

Anyway, it created a new abook.sqlite exactly 32k bytes long and I can see all the addresses in the address book. I can see them up until I send an email to someone because in that case, that particular email is deleted from the address book.

Should I rename the abook.v2.sqlite file too? (I'm not brave enough to make random trials on my profile without knowing exactly what I am doing.)

I made the steps you wrote in the bullet points. Surprisingly, after restarting TB, the address book was not empty.

Huh. Are they in "Personal Address Book" or "Collected Addresses"? I assumed the first but if they're in Collected Addresses then the file is history.sqlite instead of abook.sqlite.

Should I rename the abook.v2.sqlite file too?

abook.v2.sqlite is a backup that was made when we last changed the format, which is currently v3. The file itself shouldn't have any impact, but maybe move it away to avoid confusing the issue.

I'm running out of ideas. Something else you could try is set up a second profile and see if the same problem happens there.

csongor?

I'm running out of ideas. Something else you could try is set up a second profile and see if the same problem happens there.

Flags: needinfo?(csongor)

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

csongor?

Sorry for being silent, I didn't have time to check the last idea from @Geoff Lankow (:darktrojan) since then.

Now I tested it and it works. I did these steps:

  • I exported my contacts into CSV,
  • quit TB
  • renamed history.sqlite to something else
  • restarted TB
  • Address Book -> Tools -> Import -> Address Books -> Text file and browsed the CSV
  • I had two folders called "Collected Addresses" in the Address Book.
  1. the newly generated empty one of which the Delete command is disabled and
  2. the newly imported one, which contained all the addresses
  • I moved the addresses from the one I can delete into the other one and deleted the unneeded one.

Now I can reuse email addresses of the address book, even if I already used them once. I don't need to restart TB for this.

Thanks for the help.

Do you have any idea how it could have gone wrong?

Flags: needinfo?(csongor)

Thanks for the update. No idea what is wrong.

If you still have the "bad" address book, perhaps you could share it with dartrojan?

Status: UNCONFIRMED → RESOLVED
Closed: 9 months ago
Resolution: --- → INCOMPLETE

I still have the renamed history.sqlite.bak but it has a lot of confidential information. Is there any way how I could anonymise it?

Btw., my history.sqlite.bak file is 917504 bytes long. The new history.sqlite, which is supposed to have the same data, is just 557056.

Csongor

opened the Address Book to see if her address was there but it wasn't. So, I quit TB and restarted it. I opened the Address Book again and the address was there. I also was able to use that email address in a mail forwarding, the auto-complete worked just fine.

Geoff any ideas?

You need to log in before you can comment on or make changes to this bug.