Closed Bug 1789793 Opened 2 years ago Closed 2 years ago

Autocomplete recipient and contact search no longer works - jscarddav://abook-1.sqlite: [JavaScript Error: "Could not extract integer from "/1". Caused by bad data in date field, for example NaN-

Categories

(Thunderbird :: Address Book, defect)

Thunderbird 102
defect

Tracking

(thunderbird_esr102 fixed, thunderbird105 fixed)

RESOLVED FIXED
106 Branch
Tracking Status
thunderbird_esr102 --- fixed
thunderbird105 --- fixed

People

(Reporter: prolibre, Assigned: darktrojan)

References

()

Details

Attachments

(2 files)

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

Steps to reproduce:

The problem arises when I want to send a message or search for a contact in my address book.
The problem is since the last version (102 under windows 10). I have uninstalled and reinstalled thunderbird (by deleting all the folders in the profile) but it still doesn't work.
My address book is remote (under nextcloud) but I have the same result after importing the book locally.

Actual results:

When I want to add a recipient to my new message, no contact from my notebook is proposed (no auto-complete).
When I search for a contact in my address book the search does not work.

Here is the error message in console:
Error: Could not extract integer from "/1" Ical.jsm:154:13
[Exception... "Exception thrown by jscarddav://abook-1.sqlite: [JavaScript Error: "Could not extract integer from "/1"" {file: "resource:///modules/calendar/Ical.jsm" line: 154}]'[JavaScript Error: "Could not extract integer from "/1"" {file: "resource:///modules/calendar/Ical.jsm" line: 154}]' when calling method: [nsIAbDirectory::search]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: resource:///modules/AbAutoCompleteSearch.jsm :: startSearch :: line 484" data: yes] AbAutoCompleteSearch.jsm:484:13

Summary: Autocomplete recipient and contact search no longer works → Autocomplete recipient and contact search no longer works - jscarddav://abook-1.sqlite: [JavaScript Error: "Could not extract integer from "/1"

We have multiple examples of this.

Geoff, what is next step or what do we need to diagnose this?

Flags: needinfo?(geoff)
See Also: → 1783091

I had the same problem and was able to reproduce it. For me it was a weirdly formated birthday (in the exported .vcf file):
BDAY;VALUE=DATE:Nan-09-25

Any letter in the birthday seems to break contact search/indexing.

.vcf-entries that work:
BDAY;VALUE=DATE:0925
BDAY;VALUE=DATE:20200925
BDAY;VALUE=DATE:--09-25

.vcf-entries that break the search:
BDAY;VALUE=DATE:Nan-09-25
BDAY;VALUE=DATE:x-09-25
BDAY;VALUE=DATE:x0925

For example:
BEGIN:VCARD
VERSION:4.0
N:;Person1;;;
FN:Person1
BDAY;VALUE=DATE:Nan1231
UID:f40d13e5-10c4-429a-b7a9-63bc68cc9ca2
EMAIL;PREF=1:p1@p1.de
END:VCARD

Hope that helps.
Best regards

(In reply to JS from comment #2)

I had the same problem and was able to reproduce it. For me it was a weirdly formated birthday (in the exported .vcf file):
(...)
Hope that helps.
Best regards

Thank you very much for this lead. I exported my address book and went through the birthday dates but nothing seems to match your situation. I will see if I can find a tool to check my .vcf file

Welcome! Apparently Thunderbird 102 has problems handling untypically formatted contact entries. This may not only concern bithdays.

Also check these:
https://bugzilla.mozilla.org/show_bug.cgi?id=1783091
https://bugzilla.mozilla.org/show_bug.cgi?id=1780888

A tool for checking .vcf files would be great! Especially if it could also heal corrupted files and update files to new VCF versions.

I see two problems:

  • Search shouldn't fail if a card can't be parsed. It should report the error and move on. I'll fix this.
  • How on Earth did we get NaN into the date field? Is that our fault or somebody else's (given that this is a CardDAV book)? Perhaps Thomas can try to recreate that.
Assignee: nobody → geoff
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(geoff)
Target Milestone: --- → 106 Branch
Attachment #9294160 - Flags: approval-comm-beta?

(In reply to JS from comment #2)

I solved my problem with the instructions from @JS
I don't know if I should leave this report open because in fact the problem is related to a wrong entry in my address book.
Indeed I found a field ANNIVERSARY whereas the version 3 of vcard does not include this one.
I think it's a problem caused by nextcloud.

Here is an example that crashes the search and autocomplete:

BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.1.2//EN
UID:47cf4d06-9cf0-4d64-8ced-b954143fe7d9
FN:BLABLA BLABLABLA
N:BLABLA;BLABLABLA;;;
TEL;TYPE=HOME:04 00 00 00 00
TEL;TYPE=CELL:+33 0 00 00 00 00
DAVDROID1.EMAIL;TYPE=X-INTERNET:blabla.blablabla@gmail.com
DAVDROID1.X-ABLABEL:Internet
BDAY;VALUE=DATE:19490707
REV:20171117T184602Z
ANNIVERSARY;VALUE=TEXT:07/07/1949
X-MOZILLA-HTML:FALSE
END:VCARD

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/f6aa91069332
Don't break address book search if an unparseable card is found. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

Comment on attachment 9294160 [details]
Bug 1789793 - Don't break address book search if an unparseable card is found. r=#thunderbird-reviewers

[Triage Comment]
approved for beta

just a try/catch, so very safe

Attachment #9294160 - Flags: approval-comm-beta? → approval-comm-beta+
See Also: 1783091

Comment on attachment 9294160 [details]
Bug 1789793 - Don't break address book search if an unparseable card is found. r=#thunderbird-reviewers

[Triage Comment]
Approved for esr102 (conditional upon successful beta)

Attachment #9294160 - Flags: approval-comm-esr102+

Where does the unparsable card get reported - error console?

Flags: needinfo?(geoff)

That's where reportError reports, yes.

Flags: needinfo?(geoff)

I think it would be nice to have a more "intrusive" notification, don't you think? Normal users may never realize whats going on.

Suggestion for a tool ... or point to one that might already exist: We need a scanner that helps find the "unparsable addresses."
My symptoms after migration to 102 were exactly as those stated in the original post.
The cause was 2 or 3? improperly formatted addresses out of several hundred. I tried the divide and conquer approach to diagnosing, but ended up manually validating every single address. Painful. If I missed the existence of a good diagnosis tool, it's too late. :)
Once corrected, address functioning is back in good working order.

The fixed version of Thunderbird will be able to find the corrupted contacts. But it won't tell you. At least not in a way the normal user will notice (as far as I understand).

See Also: → 1791692

I've filed a new bug for discussion about it.

Summary: Autocomplete recipient and contact search no longer works - jscarddav://abook-1.sqlite: [JavaScript Error: "Could not extract integer from "/1" → Autocomplete recipient and contact search no longer works - jscarddav://abook-1.sqlite: [JavaScript Error: "Could not extract integer from "/1". Caused by bad data in date field, for example NaN-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: