Importing address book from a CSV file always reports an error even if successfully imported
Categories
(Thunderbird :: Address Book, defect)
Tracking
(thunderbird_esr78+ verified)
People
(Reporter: yuki, Assigned: yuki)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
510 bytes,
application/octet-stream
|
Details | |
48 bytes,
text/x-phabricator-request
|
wsmwk
:
approval-comm-esr78+
|
Details | Review |
Steps to reproduce
- Download the attached CSV file "example.csv". It was exported from a Thunderbird's address book and it contains just one contact.
- Start Thunderbird.
- Click the "Address Book" button in the toolbar.
- Choose "Tools" => "Import...", then an importer wizard appears.
- Choose "Address Book" and click the button "Next >".
- Choose the file type "Text file" and click the button "Next >".
- Choose the downloaded CSV file "example.csv".
- Field mapper dialog appears, and click the "OK" button.
Actual result
The wizard reports an error information: "An error occurred importing addresses from Text file (LDIF, .tab, .csv, .txt)", but all contacts in the CSV file looks to be imported successfully.
Expected result
The wizard reports no error information, and the CSV file is imported successfully.
Environment
- Daily 86.0a1 Build ID: 20210104105645 on Windows 10
- Thunderbird 78.6.0 Build ID: 20201211152611 on Windows 10
Assignee | ||
Comment 1•3 years ago
|
||
A low level log with MOZ_LOG=Import:5
contains only a log line *** Text address import done
for the case. The method nsTextAddress::ImportAddresses()
reports error messages on failure cases, but the log does not have such messages. And the method always returns NS_ERROR_NOT_IMPLEMENTED
even if there is no error while importing process. I think that the error message in the wizard looks to be originated from the error code.
The line returning NS_ERROR_NOT_IMPLEMENTED
was introduced at the bug 1587016. This problem doesn't appear at Thunderbird 68 but appears at Thunderbird 78 and later. Is it a regression?
Comment 2•3 years ago
|
||
Indeed that looks like it should just return NS_OK.
Can you submit a patch?
Assignee | ||
Comment 3•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
OK, I've posted a patch. It also changes the import helper to assert there is no error while importing of addressbooks. I've confirmed that all other unit tests still succeeded with this change.
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/0abe90e0e4d7
Do not report NS_ERROR_NOT_IMPLEMENTED when an addressbook is imported from a text file successfully. r=darktrojan
Updated•3 years ago
|
Updated•3 years ago
|
Comment 6•3 years ago
|
||
Comment on attachment 9196032 [details]
Bug 1685048 - Do not report NS_ERROR_NOT_IMPLEMENTED when an addressbook is imported from a text file successfully
[Approval Request Comment]
Regression caused by (bug #):
User impact if declined: error message when there is no error
Testing completed (on c-c, etc.): beta
Risk to taking this patch (and alternatives if risky): safe
Comment 7•3 years ago
|
||
Comment on attachment 9196032 [details]
Bug 1685048 - Do not report NS_ERROR_NOT_IMPLEMENTED when an addressbook is imported from a text file successfully
[Triage Comment]
Approved for esr78
Comment 8•3 years ago
|
||
bugherder uplift |
Thunderbird 78.8.0:
https://hg.mozilla.org/releases/comm-esr78/rev/683a4589dd93
Comment 9•3 years ago
•
|
||
Works for me in my tests of the 78.8.0 release candidate on Fedora 33 Workstation and Windows 10.
Description
•