Bug: Intermittent browser/base/content/test/general/browser_save_video_frame.js | Cleanup function threw an exception - [Exception... "Component returned failure code: 0x80520014 (NS_ERROR_FILE_DIR_NOT_EMPTY) [nsIFile.remove]"  nsresult: "0x80520014 (NS_ERROR_
Status: RESOLVED
Priority: P5
Resolution: INCOMPLETE
Created: 2021-10-10 18:31:57+00:00
Resolved: 2021-11-02 17:01:01+00:00

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

---
```
[task 2021-10-10T17:38:16.196Z] 17:38:16     INFO - TEST-START | browser/base/content/test/general/browser_save_video_frame.js
[task 2021-10-10T17:38:16.512Z] 17:38:16     INFO - TEST-INFO | started process screenshot
[task 2021-10-10T17:38:16.577Z] 17:38:16     INFO - TEST-INFO | screenshot: exit 0
[task 2021-10-10T17:38:16.578Z] 17:38:16     INFO - Buffered messages logged at 17:38:16
[task 2021-10-10T17:38:16.578Z] 17:38:16     INFO - Entering test bound 
[task 2021-10-10T17:38:16.579Z] 17:38:16     INFO - Loading video tab
[task 2021-10-10T17:38:16.579Z] 17:38:16     INFO - Wait tab event: load
[task 2021-10-10T17:38:16.581Z] 17:38:16     INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "http://mochi.test:8888/browser/browser/base/content/test/general/web_video.html" line: 0}]
[task 2021-10-10T17:38:16.581Z] 17:38:16     INFO - Tab event received: load
[task 2021-10-10T17:38:16.582Z] 17:38:16     INFO - Video tab loaded.
[task 2021-10-10T17:38:16.583Z] 17:38:16     INFO - Synthesizing right-click on video element
[task 2021-10-10T17:38:16.584Z] 17:38:16     INFO - Waiting for popup to fire popupshown.
[task 2021-10-10T17:38:16.584Z] 17:38:16     INFO - Popup fired popupshown
[task 2021-10-10T17:38:16.585Z] 17:38:16     INFO - Firing save snapshot command
[task 2021-10-10T17:38:16.586Z] 17:38:16     INFO - Waiting for transfer completion
[task 2021-10-10T17:38:16.587Z] 17:38:16     INFO - TEST-PASS | browser/base/content/test/general/browser_save_video_frame.js | Transfer completed - 
[task 2021-10-10T17:38:16.587Z] 17:38:16     INFO - Transfer complete
[task 2021-10-10T17:38:16.588Z] 17:38:16     INFO - Leaving test bound 
[task 2021-10-10T17:38:16.589Z] 17:38:16     INFO - Buffered messages finished
[task 2021-10-10T17:38:16.591Z] 17:38:16     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/general/browser_save_video_frame.js | Cleanup function threw an exception - [Exception... "Component returned failure code: 0x80520014 (NS_ERROR_FILE_DIR_NOT_EMPTY) [nsIFile.remove]"  nsresult: "0x80520014 (NS_ERROR_FILE_DIR_NOT_EMPTY)"  location: "JS frame :: chrome://mochitests/content/browser/browser/base/content/test/general/browser_save_video_frame.js :: <TOP_LEVEL> :: line 72"  data: no]
[task 2021-10-10T17:38:16.592Z] 17:38:16     INFO - GECKO(3768) | MEMORY STAT | vsize 1471MB | vsizeMaxContiguous 56MB | residentFast 511MB | heapAllocated 429MB
[task 2021-10-10T17:38:16.593Z] 17:38:16     INFO - TEST-OK | browser/base/content/test/general/browser_save_video_frame.js | took 352ms
[task 2021-10-10T17:38:16.593Z] 17:38:16     INFO - checking window state
[task 2021-10-10T17:38:16.595Z] 17:38:16     INFO - TEST-START | browser/base/content/test/general/browser_selectTabAtIndex.js
```