Bug: Intermittent TV components/aboutlogins/tests/browser/browser_openImportCSV.js | [JavaScript Error: "Error: TelemetryStopwatch: key "FX_MIGRATION_LOGINS_IMPORT_MS" was already initialized" {file: "resource://gre/modules/LoginCSVImport.jsm" line: 136}]
Status: RESOLVED
Priority: P5
Resolution: INCOMPLETE
Created: 2021-01-21 08:34:39+00:00
Resolved: 2021-02-16 17:01:23+00:00

**Filed by:** malexandru [at] mozilla.com
**Parsed log:** https://treeherder.mozilla.org/logviewer?job_id=327335467&repo=autoland
**Full log:** https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/UNB9Ud5DRPaHnDZPUgN-EA/runs/0/artifacts/public/logs/live_backing.log
**Reftest URL:** https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml#logurl=https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/UNB9Ud5DRPaHnDZPUgN-EA/runs/0/artifacts/public/logs/live_backing.log&only_show_unexpected=1

---
```
[task 2021-01-21T04:51:33.581Z] 04:51:33     INFO - TEST-START | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js
[task 2021-01-21T04:51:34.217Z] 04:51:34     INFO - GECKO(1506) | JavaScript error: resource://gre/modules/LoginCSVImport.jsm, line 136: Error: TelemetryStopwatch: key "FX_MIGRATION_LOGINS_IMPORT_MS" was already initialized
[task 2021-01-21T04:51:34.217Z] 04:51:34     INFO - GECKO(1506) | console.warn: LoginHelper(Main): "Couldn't parse origin for" "" ({})
[task 2021-01-21T04:51:34.217Z] 04:51:34     INFO - GECKO(1506) | JavaScript error: resource://gre/modules/LoginCSVImport.jsm, line 222: Error: TelemetryStopwatch: finishing nonexisting stopwatch. Histogram: "FX_MIGRATION_LOGINS_IMPORT_MS", key: "login_csv"
[task 2021-01-21T04:51:34.217Z] 04:51:34     INFO - TEST-INFO | started process screencapture
[task 2021-01-21T04:51:34.324Z] 04:51:34     INFO - TEST-INFO | screencapture: exit 0
[task 2021-01-21T04:51:34.324Z] 04:51:34     INFO - Buffered messages logged at 04:51:33
[task 2021-01-21T04:51:34.324Z] 04:51:34     INFO - Entering test bound setup_head
[task 2021-01-21T04:51:34.324Z] 04:51:34     INFO - Leaving test bound setup_head
[task 2021-01-21T04:51:34.324Z] 04:51:34     INFO - Entering test bound test_open_import_from_csv
[task 2021-01-21T04:51:34.325Z] 04:51:34     INFO - Buffered messages logged at 04:51:34
[task 2021-01-21T04:51:34.325Z] 04:51:34     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | Sanity check the temporary file doesn't exist. - true == true - 
[task 2021-01-21T04:51:34.325Z] 04:51:34     INFO - showCallback
[task 2021-01-21T04:51:34.325Z] 04:51:34     INFO - fileName: /var/folders/kz/vb9b18n16kq283760bsh3k1h000017/T/testdir-16362/firefox_logins-3.csv
[task 2021-01-21T04:51:34.325Z] 04:51:34     INFO - done showCallback
[task 2021-01-21T04:51:34.325Z] 04:51:34     INFO - Console message: [JavaScript Error: "Error: TelemetryStopwatch: key "FX_MIGRATION_LOGINS_IMPORT_MS" was already initialized" {file: "resource://gre/modules/LoginCSVImport.jsm" line: 136}]
[task 2021-01-21T04:51:34.325Z] 04:51:34     INFO - importFromCSV@resource://gre/modules/LoginCSVImport.jsm:136:24
[task 2021-01-21T04:51:34.325Z] 04:51:34     INFO - receiveMessage@resource:///actors/AboutLoginsParent.jsm:439:44
[task 2021-01-21T04:51:34.325Z] 04:51:34     INFO - 
[task 2021-01-21T04:51:34.326Z] 04:51:34     INFO - Buffered messages finished
[task 2021-01-21T04:51:34.326Z] 04:51:34     INFO - TEST-UNEXPECTED-FAIL | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | [JavaScript Error: "Error: TelemetryStopwatch: key "FX_MIGRATION_LOGINS_IMPORT_MS" was already initialized" {file: "resource://gre/modules/LoginCSVImport.jsm" line: 136}]
[task 2021-01-21T04:51:34.326Z] 04:51:34     INFO - importFromCSV@resource://gre/modules/LoginCSVImport.jsm:136:24
[task 2021-01-21T04:51:34.326Z] 04:51:34     INFO - receiveMessage@resource:///actors/AboutLoginsParent.jsm:439:44
[task 2021-01-21T04:51:34.326Z] 04:51:34     INFO -  - 
[task 2021-01-21T04:51:34.326Z] 04:51:34     INFO - Stack trace:
[task 2021-01-21T04:51:34.326Z] 04:51:34     INFO - chrome://mochikit/content/browser-test.js:test_ok:1323
[task 2021-01-21T04:51:34.326Z] 04:51:34     INFO - chrome://mochitests/content/browser/browser/components/aboutlogins/tests/browser/head.js:onConsoleMessage:154
[task 2021-01-21T04:51:34.326Z] 04:51:34     INFO - resource://specialpowers/SpecialPowersChild.jsm:observe/<:158
[task 2021-01-21T04:51:34.327Z] 04:51:34     INFO - Console message: [JavaScript Error: "Error: TelemetryStopwatch: finishing nonexisting stopwatch. Histogram: "FX_MIGRATION_LOGINS_IMPORT_MS", key: "login_csv"" {file: "resource://gre/modules/LoginCSVImport.jsm" line: 222}]
[task 2021-01-21T04:51:34.327Z] 04:51:34     INFO - importFromCSV@resource://gre/modules/LoginCSVImport.jsm:222:26
[task 2021-01-21T04:51:34.327Z] 04:51:34     INFO - 
[task 2021-01-21T04:51:34.327Z] 04:51:34     INFO - Console message: [JavaScript Warning: "Sending message that cannot be cloned. Are you trying to send an XPCOM object?" {file: "resource:///actors/AboutLoginsParent.jsm" line: 448}]
[task 2021-01-21T04:51:34.327Z] 04:51:34     INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-01-21T04:51:34.330Z] 04:51:34     INFO - TEST-UNEXPECTED-FAIL | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | [JavaScript Error: "Error: TelemetryStopwatch: finishing nonexisting stopwatch. Histogram: "FX_MIGRATION_LOGINS_IMPORT_MS", key: "login_csv"" {file: "resource://gre/modules/LoginCSVImport.jsm" line: 222}]
[task 2021-01-21T04:51:34.330Z] 04:51:34     INFO - importFromCSV@resource://gre/modules/LoginCSVImport.jsm:222:26
[task 2021-01-21T04:51:34.330Z] 04:51:34     INFO -  - 
[task 2021-01-21T04:51:34.330Z] 04:51:34     INFO - Stack trace:
[task 2021-01-21T04:51:34.331Z] 04:51:34     INFO - chrome://mochikit/content/browser-test.js:test_ok:1323
[task 2021-01-21T04:51:34.331Z] 04:51:34     INFO - chrome://mochitests/content/browser/browser/components/aboutlogins/tests/browser/head.js:onConsoleMessage:154
[task 2021-01-21T04:51:34.331Z] 04:51:34     INFO - resource://specialpowers/SpecialPowersChild.jsm:observe/<:158
[task 2021-01-21T04:51:34.430Z] 04:51:34     INFO - GECKO(1506) | Waiting for 1 events, got 1
[task 2021-01-21T04:51:34.431Z] 04:51:34     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | waiting for telemetry event count - 1 == 1 - 
[task 2021-01-21T04:51:34.431Z] 04:51:34     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | content must be in snapshot. Has [parent,content]. - true == true - 
[task 2021-01-21T04:51:34.431Z] 04:51:34     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | After filtering we must have the expected number of events. - 1 == 1 - 
[task 2021-01-21T04:51:34.431Z] 04:51:34     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | category in event pwmgr#mgmt_menu_item_used#import_from_csv must match. - "pwmgr" matches "pwmgr" - 
[task 2021-01-21T04:51:34.441Z] 04:51:34     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | method in event pwmgr#mgmt_menu_item_used#import_from_csv must match. - "mgmt_menu_item_used" matches "mgmt_menu_item_used" - 
[task 2021-01-21T04:51:34.441Z] 04:51:34     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | object in event pwmgr#mgmt_menu_item_used#import_from_csv must match. - "import_from_csv" matches "import_from_csv" - 
[task 2021-01-21T04:51:34.441Z] 04:51:34     INFO - waiting for Import file picker to get opened
[task 2021-01-21T04:51:34.441Z] 04:51:34     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | Import file picker opened - 
[task 2021-01-21T04:51:34.441Z] 04:51:34     INFO - Waiting for the import to complete
[task 2021-01-21T04:51:34.682Z] 04:51:34     INFO - GECKO(1506) | Waiting for 1 events, got 1
[task 2021-01-21T04:51:34.682Z] 04:51:34     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | waiting for telemetry event count - 1 == 1 - 
[task 2021-01-21T04:51:34.682Z] 04:51:34     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | parent must be in snapshot. Has [parent,content]. - true == true - 
[task 2021-01-21T04:51:34.682Z] 04:51:34     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | After filtering we must have the expected number of events. - 1 == 1 - 
[task 2021-01-21T04:51:34.683Z] 04:51:34     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | category in event pwmgr#mgmt_menu_item_used#import_csv_complete must match. - "pwmgr" matches "pwmgr" - 
[task 2021-01-21T04:51:34.683Z] 04:51:34     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | method in event pwmgr#mgmt_menu_item_used#import_csv_complete must match. - "mgmt_menu_item_used" matches "mgmt_menu_item_used" - 
[task 2021-01-21T04:51:34.683Z] 04:51:34     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | object in event pwmgr#mgmt_menu_item_used#import_csv_complete must match. - "import_csv_complete" matches "import_csv_complete" - 
[task 2021-01-21T04:51:34.683Z] 04:51:34     INFO - Leaving test bound test_open_import_from_csv
[task 2021-01-21T04:51:34.683Z] 04:51:34     INFO - Entering test bound test_open_import_from_csv_with_invalid_file
[task 2021-01-21T04:51:35.065Z] 04:51:35     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | Sanity check the temporary file doesn't exist. - true == true - 
[task 2021-01-21T04:51:35.217Z] 04:51:35     INFO - showCallback
[task 2021-01-21T04:51:35.217Z] 04:51:35     INFO - fileName: /var/folders/kz/vb9b18n16kq283760bsh3k1h000017/T/testdir-16362/firefox_logins-4.csv
[task 2021-01-21T04:51:35.221Z] 04:51:35     INFO - done showCallback
[task 2021-01-21T04:51:35.221Z] 04:51:35     INFO - Console message: [JavaScript Error: "FILE_FORMAT_ERROR" {file: "resource://gre/modules/LoginCSVImport.jsm" line: 62}]
[task 2021-01-21T04:51:35.221Z] 04:51:35     INFO - ImportFailedException@resource://gre/modules/LoginCSVImport.jsm:62:5
[task 2021-01-21T04:51:35.221Z] 04:51:35     INFO - importFromCSV@resource://gre/modules/LoginCSVImport.jsm:170:13
[task 2021-01-21T04:51:35.221Z] 04:51:35     INFO - 
[task 2021-01-21T04:51:35.314Z] 04:51:35     INFO - GECKO(1506) | Waiting for 1 events, got 1
[task 2021-01-21T04:51:35.314Z] 04:51:35     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | waiting for telemetry event count - 1 == 1 - 
[task 2021-01-21T04:51:35.314Z] 04:51:35     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | content must be in snapshot. Has [content]. - true == true - 
[task 2021-01-21T04:51:35.314Z] 04:51:35     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | After filtering we must have the expected number of events. - 1 == 1 - 
[task 2021-01-21T04:51:35.315Z] 04:51:35     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | category in event pwmgr#mgmt_menu_item_used#import_from_csv must match. - "pwmgr" matches "pwmgr" - 
[task 2021-01-21T04:51:35.315Z] 04:51:35     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | method in event pwmgr#mgmt_menu_item_used#import_from_csv must match. - "mgmt_menu_item_used" matches "mgmt_menu_item_used" - 
[task 2021-01-21T04:51:35.315Z] 04:51:35     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | object in event pwmgr#mgmt_menu_item_used#import_from_csv must match. - "import_from_csv" matches "import_from_csv" - 
[task 2021-01-21T04:51:35.315Z] 04:51:35     INFO - waiting for Import file picker to get opened
[task 2021-01-21T04:51:35.315Z] 04:51:35     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | Import file picker opened - 
[task 2021-01-21T04:51:35.316Z] 04:51:35     INFO - Waiting for the import error dialog
[task 2021-01-21T04:51:35.316Z] 04:51:35     INFO - Dialog hidden=false
[task 2021-01-21T04:51:35.318Z] 04:51:35     INFO - Generic dialog error title about-logins-import-dialog-error-file-format-title
[task 2021-01-21T04:51:35.318Z] 04:51:35     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | Dialog should not be hidden - false == false - 
[task 2021-01-21T04:51:35.318Z] 04:51:35     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | Dialog error title should be correct - "about-logins-import-dialog-error-file-format-title" == "about-logins-import-dialog-error-file-format-title" - 
[task 2021-01-21T04:51:35.318Z] 04:51:35     INFO - TEST-PASS | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | Dialog error description should be correct - "about-logins-import-dialog-error-file-format-description" == "about-logins-import-dialog-error-file-format-description" - 
[task 2021-01-21T04:51:35.318Z] 04:51:35     INFO - Leaving test bound test_open_import_from_csv_with_invalid_file
[task 2021-01-21T04:51:35.336Z] 04:51:35     INFO - Console message: SENTINEL
[task 2021-01-21T04:51:35.336Z] 04:51:35     INFO - GECKO(1506) | MEMORY STAT | vsize 7064MB | residentFast 295MB | heapAllocated 116MB
[task 2021-01-21T04:51:35.336Z] 04:51:35     INFO - TEST-OK | browser/components/aboutlogins/tests/browser/browser_openImportCSV.js | took 1783ms
[task 2021-01-21T04:51:35.365Z] 04:51:35     INFO - checking window state
[task 2021-01-21T04:51:35.365Z] 04:51:35     INFO - GECKO(1506) | Completed ShutdownLeaks collections in process 1506```