Bug: Intermittent browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Cleanup function threw an exception - at (unknown module):undefined - Win error 5 during operation remove on file dm-ui-test.file (Access is denied.
Status: RESOLVED
Priority: P5
Resolution: INCOMPLETE
Created: 2021-06-24 14:11:36+00:00
Resolved: 2021-07-20 17:05:35+00:00

**Filed by:** apavel [at] mozilla.com
**Parsed log:** https://treeherder.mozilla.org/logviewer?job_id=343736607&repo=mozilla-central
**Full log:** https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/E5F1Hyi3TMSZsjTyjXPl_w/runs/0/artifacts/public/logs/live_backing.log

---
```
[task 2021-06-24T11:52:01.697Z] 11:52:01     INFO - TEST-START | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js
[task 2021-06-24T11:52:02.057Z] 11:52:02     INFO - TEST-INFO | started process screenshot
[task 2021-06-24T11:52:02.129Z] 11:52:02     INFO - TEST-INFO | screenshot: exit 0
[task 2021-06-24T11:52:02.130Z] 11:52:02     INFO - Buffered messages logged at 11:52:01
[task 2021-06-24T11:52:02.130Z] 11:52:02     INFO - Entering test bound test_setUp
[task 2021-06-24T11:52:02.131Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | At the start of the test, there should be 0 downloads - 
[task 2021-06-24T11:52:02.131Z] 11:52:02     INFO - Created download directory: C:\Users\task_1624534546\AppData\LocalLow\Mozilla\Temp-{ca4f7048-1576-47c5-aa56-8719cf3d86de}\testsavedir3230026639
[task 2021-06-24T11:52:02.132Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Created C:\Users\task_1624534546\AppData\LocalLow\Mozilla\Temp-{ca4f7048-1576-47c5-aa56-8719cf3d86de}\testsavedir3230026639\downloaded.pdf - 
[task 2021-06-24T11:52:02.133Z] 11:52:02     INFO - Created downloaded PDF file at:C:\Users\task_1624534546\AppData\LocalLow\Mozilla\Temp-{ca4f7048-1576-47c5-aa56-8719cf3d86de}\testsavedir3230026639\downloaded.pdf
[task 2021-06-24T11:52:02.133Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Created C:\Users\task_1624534546\AppData\LocalLow\Mozilla\Temp-{ca4f7048-1576-47c5-aa56-8719cf3d86de}\testsavedir3230026639\downloaded.txt - 
[task 2021-06-24T11:52:02.134Z] 11:52:02     INFO - Created downloaded text file at:C:\Users\task_1624534546\AppData\LocalLow\Mozilla\Temp-{ca4f7048-1576-47c5-aa56-8719cf3d86de}\testsavedir3230026639\downloaded.txt
[task 2021-06-24T11:52:02.134Z] 11:52:02     INFO - Leaving test bound test_setUp
[task 2021-06-24T11:52:02.134Z] 11:52:02     INFO - Entering test bound Completed PDF download
[task 2021-06-24T11:52:02.135Z] 11:52:02     INFO - {"state":1,"contentType":"application/pdf","target":{}}
[task 2021-06-24T11:52:02.135Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | download target is a nsIFile - 
[task 2021-06-24T11:52:02.136Z] 11:52:02     INFO - Download succeeded? true
[task 2021-06-24T11:52:02.136Z] 11:52:02     INFO - Download target exists? true
[task 2021-06-24T11:52:02.137Z] 11:52:02     INFO - trigger the context menu
[task 2021-06-24T11:52:02.137Z] 11:52:02     INFO - context menu should be open, verify its menu items
[task 2021-06-24T11:52:02.138Z] 11:52:02     INFO - Got actual context menu items: 
[task 2021-06-24T11:52:02.138Z] 11:52:02     INFO - Open In System Viewer (downloadsCmd_openInSystemViewer)
[task 2021-06-24T11:52:02.138Z] 11:52:02     INFO - Always Open In System Viewer (downloadsCmd_alwaysOpenInSystemViewer)
[task 2021-06-24T11:52:02.138Z] 11:52:02     INFO - Open Containing Folder (downloadsCmd_show)
[task 2021-06-24T11:52:02.138Z] 11:52:02     INFO - ---
[task 2021-06-24T11:52:02.138Z] 11:52:02     INFO - Go To Download Page (downloadsCmd_openReferrer)
[task 2021-06-24T11:52:02.138Z] 11:52:02     INFO - Copy Download Link (downloadsCmd_copyLocation)
[task 2021-06-24T11:52:02.138Z] 11:52:02     INFO - ---
[task 2021-06-24T11:52:02.138Z] 11:52:02     INFO - Remove From History (cmd_delete)
[task 2021-06-24T11:52:02.138Z] 11:52:02     INFO - Clear Preview Panel (downloadsCmd_clearList)
[task 2021-06-24T11:52:02.139Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Context menu has the expected number of items - 
[task 2021-06-24T11:52:02.139Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Item at 0 matches expected selector: [command="downloadsCmd_openInSystemViewer"] - 
[task 2021-06-24T11:52:02.140Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Item at 1 matches expected selector: [command="downloadsCmd_alwaysOpenInSystemViewer"] - 
[task 2021-06-24T11:52:02.141Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Item at 2 matches expected selector: [command="downloadsCmd_show"] - 
[task 2021-06-24T11:52:02.141Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Item at 3 matches expected selector: menuseparator,.downloadCommandsSeparator - 
[task 2021-06-24T11:52:02.142Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Item at 4 matches expected selector: [command="downloadsCmd_openReferrer"] - 
[task 2021-06-24T11:52:02.142Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Item at 5 matches expected selector: [command="downloadsCmd_copyLocation"] - 
[task 2021-06-24T11:52:02.143Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Item at 6 matches expected selector: menuseparator - 
[task 2021-06-24T11:52:02.143Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Item at 7 matches expected selector: [command="cmd_delete"] - 
[task 2021-06-24T11:52:02.144Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Item at 8 matches expected selector: [command="downloadsCmd_clearList"] - 
[task 2021-06-24T11:52:02.144Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Expected no errors verifying context menu items - 
[task 2021-06-24T11:52:02.144Z] 11:52:02     INFO - Leaving test bound Completed PDF download
[task 2021-06-24T11:52:02.145Z] 11:52:02     INFO - Entering test bound Canceled PDF download
[task 2021-06-24T11:52:02.145Z] 11:52:02     INFO - {"state":3,"contentType":"application/pdf","target":{}}
[task 2021-06-24T11:52:02.146Z] 11:52:02     INFO - Download succeeded? false
[task 2021-06-24T11:52:02.146Z] 11:52:02     INFO - Download target exists? false
[task 2021-06-24T11:52:02.146Z] 11:52:02     INFO - Buffered messages logged at 11:52:02
[task 2021-06-24T11:52:02.147Z] 11:52:02     INFO - trigger the context menu
[task 2021-06-24T11:52:02.147Z] 11:52:02     INFO - context menu should be open, verify its menu items
[task 2021-06-24T11:52:02.148Z] 11:52:02     INFO - Got actual context menu items: 
[task 2021-06-24T11:52:02.148Z] 11:52:02     INFO - Go To Download Page (downloadsCmd_openReferrer)
[task 2021-06-24T11:52:02.148Z] 11:52:02     INFO - Copy Download Link (downloadsCmd_copyLocation)
[task 2021-06-24T11:52:02.148Z] 11:52:02     INFO - ---
[task 2021-06-24T11:52:02.148Z] 11:52:02     INFO - Remove From History (cmd_delete)
[task 2021-06-24T11:52:02.148Z] 11:52:02     INFO - Clear Preview Panel (downloadsCmd_clearList)
[task 2021-06-24T11:52:02.148Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Context menu has the expected number of items - 
[task 2021-06-24T11:52:02.149Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Item at 0 matches expected selector: [command="downloadsCmd_openReferrer"] - 
[task 2021-06-24T11:52:02.149Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Item at 1 matches expected selector: [command="downloadsCmd_copyLocation"] - 
[task 2021-06-24T11:52:02.150Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Item at 2 matches expected selector: menuseparator - 
[task 2021-06-24T11:52:02.150Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Item at 3 matches expected selector: [command="cmd_delete"] - 
[task 2021-06-24T11:52:02.151Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Item at 4 matches expected selector: [command="downloadsCmd_clearList"] - 
[task 2021-06-24T11:52:02.151Z] 11:52:02     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Expected no errors verifying context menu items - 
[task 2021-06-24T11:52:02.152Z] 11:52:02     INFO - Leaving test bound Canceled PDF download
[task 2021-06-24T11:52:02.152Z] 11:52:02     INFO - Buffered messages finished
[task 2021-06-24T11:52:02.153Z] 11:52:02     INFO - TEST-UNEXPECTED-FAIL | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | Cleanup function threw an exception - at (unknown module):undefined - Win error 5 during operation remove on file C:\Users\task_1624534546\AppData\Local\Temp\dm-ui-test.file (Access is denied.
[task 2021-06-24T11:52:02.153Z] 11:52:02     INFO - )
[task 2021-06-24T11:52:02.235Z] 11:52:02     INFO - GECKO(3064) | MEMORY STAT | vsize 2104281MB | vsizeMaxContiguous 65003435MB | residentFast 297MB | heapAllocated 129MB
[task 2021-06-24T11:52:02.235Z] 11:52:02     INFO - TEST-OK | browser/components/downloads/test/browser/browser_downloads_panel_context_menu.js | took 538ms
```