Bug: Intermittent /exthandler/tests/mochitest/browser_extension_correction.js | Cleanup function threw an exception - NotAllowedError: Could not remove the file at C:\Users\task_1610584184\AppData\LocalLow\Mozilla\Temp-{...}\testsavedir701226299\file_as.exe
Status: RESOLVED
Priority: P5
Resolution: INCOMPLETE
Created: 2021-01-14 05:27:43+00:00
Resolved: 2021-02-16 17:00:29+00:00

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

---
```
[task 2021-01-14T00:55:26.450Z] 00:55:26     INFO - TEST-START | uriloader/exthandler/tests/mochitest/browser_extension_correction.js
[task 2021-01-14T00:55:26.888Z] 00:55:26     INFO - GECKO(6600) | JavaScript error: resource://gre/modules/HelperAppDlg.jsm, line 615: TypeError: can't access property "postShowCallback", this.dialog is null
[task 2021-01-14T00:55:26.928Z] 00:55:26     INFO - GECKO(6600) | console.log: Downloads: Attempting to notify that a new download has started or finished.
[task 2021-01-14T00:55:26.928Z] 00:55:26     INFO - GECKO(6600) | console.log: Downloads: Showing new download notification.
[task 2021-01-14T00:55:26.928Z] 00:55:26     INFO - GECKO(6600) | console.log: Downloads: Attempting to notify that a new download has started or finished.
[task 2021-01-14T00:55:26.929Z] 00:55:26     INFO - GECKO(6600) | console.log: Downloads: Showing new download notification.
[task 2021-01-14T00:55:26.929Z] 00:55:26     INFO - GECKO(6600) | console.log: Downloads: Closing the downloads panel.
[task 2021-01-14T00:55:26.931Z] 00:55:26     INFO - GECKO(6600) | console.log: Downloads: Downloads panel is not showing - nothing to do.
[task 2021-01-14T00:55:27.039Z] 00:55:27     INFO - GECKO(6600) | JavaScript error: resource://gre/modules/HelperAppDlg.jsm, line 615: TypeError: can't access property "postShowCallback", this.dialog is null
[task 2021-01-14T00:55:27.077Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Attempting to notify that a new download has started or finished.
[task 2021-01-14T00:55:27.077Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Showing new download notification.
[task 2021-01-14T00:55:27.078Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Attempting to notify that a new download has started or finished.
[task 2021-01-14T00:55:27.078Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Showing new download notification.
[task 2021-01-14T00:55:27.078Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Closing the downloads panel.
[task 2021-01-14T00:55:27.078Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Downloads panel is not showing - nothing to do.
[task 2021-01-14T00:55:27.189Z] 00:55:27     INFO - GECKO(6600) | JavaScript error: resource://gre/modules/HelperAppDlg.jsm, line 615: TypeError: can't access property "postShowCallback", this.dialog is null
[task 2021-01-14T00:55:27.230Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Attempting to notify that a new download has started or finished.
[task 2021-01-14T00:55:27.230Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Showing new download notification.
[task 2021-01-14T00:55:27.230Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Attempting to notify that a new download has started or finished.
[task 2021-01-14T00:55:27.231Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Showing new download notification.
[task 2021-01-14T00:55:27.231Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Closing the downloads panel.
[task 2021-01-14T00:55:27.231Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Downloads panel is not showing - nothing to do.
[task 2021-01-14T00:55:27.329Z] 00:55:27     INFO - GECKO(6600) | JavaScript error: resource://gre/modules/HelperAppDlg.jsm, line 615: TypeError: can't access property "postShowCallback", this.dialog is null
[task 2021-01-14T00:55:27.388Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Attempting to notify that a new download has started or finished.
[task 2021-01-14T00:55:27.388Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Showing new download notification.
[task 2021-01-14T00:55:27.388Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Attempting to notify that a new download has started or finished.
[task 2021-01-14T00:55:27.388Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Showing new download notification.
[task 2021-01-14T00:55:27.389Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Closing the downloads panel.
[task 2021-01-14T00:55:27.389Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Downloads panel is not showing - nothing to do.
[task 2021-01-14T00:55:27.490Z] 00:55:27     INFO - GECKO(6600) | JavaScript error: resource://gre/modules/HelperAppDlg.jsm, line 615: TypeError: can't access property "postShowCallback", this.dialog is null
[task 2021-01-14T00:55:27.551Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Attempting to notify that a new download has started or finished.
[task 2021-01-14T00:55:27.552Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Showing new download notification.
[task 2021-01-14T00:55:27.552Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Attempting to notify that a new download has started or finished.
[task 2021-01-14T00:55:27.552Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Showing new download notification.
[task 2021-01-14T00:55:27.552Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Closing the downloads panel.
[task 2021-01-14T00:55:27.552Z] 00:55:27     INFO - GECKO(6600) | console.log: Downloads: Downloads panel is not showing - nothing to do.
[task 2021-01-14T00:55:28.447Z] 00:55:28     INFO - GECKO(6600) | console.log: Downloads: Attempting to notify that a new download has started or finished.
[task 2021-01-14T00:55:28.447Z] 00:55:28     INFO - GECKO(6600) | console.log: Downloads: Showing new download notification.
[task 2021-01-14T00:55:28.447Z] 00:55:28     INFO - GECKO(6600) | console.log: Downloads: Attempting to notify that a new download has started or finished.
[task 2021-01-14T00:55:28.447Z] 00:55:28     INFO - GECKO(6600) | console.log: Downloads: Showing new download notification.
[task 2021-01-14T00:55:28.448Z] 00:55:28     INFO - GECKO(6600) | console.log: Downloads: Closing the downloads panel.
[task 2021-01-14T00:55:28.448Z] 00:55:28     INFO - GECKO(6600) | console.log: Downloads: Downloads panel is not showing - nothing to do.
[task 2021-01-14T00:55:28.473Z] 00:55:28     INFO - TEST-INFO | started process screenshot
[task 2021-01-14T00:55:28.552Z] 00:55:28     INFO - TEST-INFO | screenshot: exit 0
[task 2021-01-14T00:55:28.553Z] 00:55:28     INFO - Buffered messages logged at 00:55:26
[task 2021-01-14T00:55:28.553Z] 00:55:28     INFO - Entering test bound test_common_initialize
[task 2021-01-14T00:55:28.554Z] 00:55:28     INFO - Leaving test bound test_common_initialize
[task 2021-01-14T00:55:28.554Z] 00:55:28     INFO - Entering test bound setup
[task 2021-01-14T00:55:28.554Z] 00:55:28     INFO - Leaving test bound setup
[task 2021-01-14T00:55:28.555Z] 00:55:28     INFO - Entering test bound test_enforce_useful_extension
[task 2021-01-14T00:55:28.556Z] 00:55:28     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: "data:text/html," line: 0}]
[task 2021-01-14T00:55:28.556Z] 00:55:28     INFO - Checking image/png
[task 2021-01-14T00:55:28.556Z] 00:55:28     INFO - Waiting for dialog.
[task 2021-01-14T00:55:28.557Z] 00:55:28     INFO - TEST-PASS | uriloader/exthandler/tests/mochitest/browser_extension_correction.js | image/png should get an extension - 
[task 2021-01-14T00:55:28.557Z] 00:55:28     INFO - Console message: [JavaScript Error: "TypeError: can't access property "postShowCallback", this.dialog is null" {file: "resource://gre/modules/HelperAppDlg.jsm" line: 615}]
[task 2021-01-14T00:55:28.558Z] 00:55:28     INFO - initDialog/<@resource://gre/modules/HelperAppDlg.jsm:615:7
[task 2021-01-14T00:55:28.558Z] 00:55:28     INFO - 
[task 2021-01-14T00:55:28.559Z] 00:55:28     INFO - Download changed!
[task 2021-01-14T00:55:28.559Z] 00:55:28     INFO - Download succeeded or errored
[task 2021-01-14T00:55:28.560Z] 00:55:28     INFO - TEST-PASS | uriloader/exthandler/tests/mochitest/browser_extension_correction.js | Downloaded file should also match somefile.png - 
[task 2021-01-14T00:55:28.560Z] 00:55:28     INFO - Checking audio/ogg
[task 2021-01-14T00:55:28.561Z] 00:55:28     INFO - Waiting for dialog.
[task 2021-01-14T00:55:28.561Z] 00:55:28     INFO - Buffered messages logged at 00:55:27
[task 2021-01-14T00:55:28.561Z] 00:55:28     INFO - TEST-PASS | uriloader/exthandler/tests/mochitest/browser_extension_correction.js | audio/ogg should get an extension - 
[task 2021-01-14T00:55:28.562Z] 00:55:28     INFO - Console message: [JavaScript Error: "TypeError: can't access property "postShowCallback", this.dialog is null" {file: "resource://gre/modules/HelperAppDlg.jsm" line: 615}]
[task 2021-01-14T00:55:28.562Z] 00:55:28     INFO - initDialog/<@resource://gre/modules/HelperAppDlg.jsm:615:7
[task 2021-01-14T00:55:28.563Z] 00:55:28     INFO - 
[task 2021-01-14T00:55:28.563Z] 00:55:28     INFO - Download changed!
[task 2021-01-14T00:55:28.563Z] 00:55:28     INFO - Download succeeded or errored
[task 2021-01-14T00:55:28.564Z] 00:55:28     INFO - TEST-PASS | uriloader/exthandler/tests/mochitest/browser_extension_correction.js | Downloaded file should also match somefile.oga - 
[task 2021-01-14T00:55:28.564Z] 00:55:28     INFO - Checking video/webm
[task 2021-01-14T00:55:28.564Z] 00:55:28     INFO - Waiting for dialog.
[task 2021-01-14T00:55:28.564Z] 00:55:28     INFO - TEST-PASS | uriloader/exthandler/tests/mochitest/browser_extension_correction.js | video/webm should get an extension - 
[task 2021-01-14T00:55:28.564Z] 00:55:28     INFO - Console message: [JavaScript Error: "TypeError: can't access property "postShowCallback", this.dialog is null" {file: "resource://gre/modules/HelperAppDlg.jsm" line: 615}]
[task 2021-01-14T00:55:28.564Z] 00:55:28     INFO - initDialog/<@resource://gre/modules/HelperAppDlg.jsm:615:7
[task 2021-01-14T00:55:28.564Z] 00:55:28     INFO - 
[task 2021-01-14T00:55:28.564Z] 00:55:28     INFO - Download changed!
[task 2021-01-14T00:55:28.564Z] 00:55:28     INFO - Download succeeded or errored
[task 2021-01-14T00:55:28.564Z] 00:55:28     INFO - TEST-PASS | uriloader/exthandler/tests/mochitest/browser_extension_correction.js | Downloaded file should also match somefile.webm - 
[task 2021-01-14T00:55:28.565Z] 00:55:28     INFO - Checking application/msword
[task 2021-01-14T00:55:28.565Z] 00:55:28     INFO - Waiting for dialog.
[task 2021-01-14T00:55:28.565Z] 00:55:28     INFO - TEST-PASS | uriloader/exthandler/tests/mochitest/browser_extension_correction.js | application/msword should get an extension - 
[task 2021-01-14T00:55:28.565Z] 00:55:28     INFO - Console message: [JavaScript Error: "TypeError: can't access property "postShowCallback", this.dialog is null" {file: "resource://gre/modules/HelperAppDlg.jsm" line: 615}]
[task 2021-01-14T00:55:28.565Z] 00:55:28     INFO - initDialog/<@resource://gre/modules/HelperAppDlg.jsm:615:7
[task 2021-01-14T00:55:28.565Z] 00:55:28     INFO - 
[task 2021-01-14T00:55:28.565Z] 00:55:28     INFO - Download changed!
[task 2021-01-14T00:55:28.565Z] 00:55:28     INFO - Download succeeded or errored
[task 2021-01-14T00:55:28.565Z] 00:55:28     INFO - TEST-PASS | uriloader/exthandler/tests/mochitest/browser_extension_correction.js | Downloaded file should also match somefile.doc - 
[task 2021-01-14T00:55:28.565Z] 00:55:28     INFO - Checking application/pdf
[task 2021-01-14T00:55:28.565Z] 00:55:28     INFO - Waiting for dialog.
[task 2021-01-14T00:55:28.565Z] 00:55:28     INFO - TEST-PASS | uriloader/exthandler/tests/mochitest/browser_extension_correction.js | application/pdf should get an extension - 
[task 2021-01-14T00:55:28.566Z] 00:55:28     INFO - Console message: [JavaScript Error: "TypeError: can't access property "postShowCallback", this.dialog is null" {file: "resource://gre/modules/HelperAppDlg.jsm" line: 615}]
[task 2021-01-14T00:55:28.566Z] 00:55:28     INFO - initDialog/<@resource://gre/modules/HelperAppDlg.jsm:615:7
[task 2021-01-14T00:55:28.566Z] 00:55:28     INFO - 
[task 2021-01-14T00:55:28.566Z] 00:55:28     INFO - Download changed!
[task 2021-01-14T00:55:28.566Z] 00:55:28     INFO - Download succeeded or errored
[task 2021-01-14T00:55:28.566Z] 00:55:28     INFO - TEST-PASS | uriloader/exthandler/tests/mochitest/browser_extension_correction.js | Downloaded file should also match somefile.pdf - 
[task 2021-01-14T00:55:28.566Z] 00:55:28     INFO - Checking application/x-gobbledygook
[task 2021-01-14T00:55:28.566Z] 00:55:28     INFO - Waiting for dialog.
[task 2021-01-14T00:55:28.566Z] 00:55:28     INFO - TEST-PASS | uriloader/exthandler/tests/mochitest/browser_extension_correction.js | application/x-gobbledygook should not get an extension - 
[task 2021-01-14T00:55:28.567Z] 00:55:28     INFO - Checking application/octet-stream
[task 2021-01-14T00:55:28.567Z] 00:55:28     INFO - Waiting for dialog.
[task 2021-01-14T00:55:28.567Z] 00:55:28     INFO - TEST-PASS | uriloader/exthandler/tests/mochitest/browser_extension_correction.js | application/octet-stream should not get an extension - 
[task 2021-01-14T00:55:28.567Z] 00:55:28     INFO - Checking binary/octet-stream
[task 2021-01-14T00:55:28.567Z] 00:55:28     INFO - Waiting for dialog.
[task 2021-01-14T00:55:28.567Z] 00:55:28     INFO - TEST-PASS | uriloader/exthandler/tests/mochitest/browser_extension_correction.js | binary/octet-stream should not get an extension - 
[task 2021-01-14T00:55:28.567Z] 00:55:28     INFO - Checking application/x-msdownload
[task 2021-01-14T00:55:28.567Z] 00:55:28     INFO - Waiting for dialog.
[task 2021-01-14T00:55:28.567Z] 00:55:28     INFO - Buffered messages logged at 00:55:28
[task 2021-01-14T00:55:28.568Z] 00:55:28     INFO - TEST-PASS | uriloader/exthandler/tests/mochitest/browser_extension_correction.js | application/x-msdownload should not get an extension - 
[task 2021-01-14T00:55:28.568Z] 00:55:28     INFO - Leaving test bound test_enforce_useful_extension
[task 2021-01-14T00:55:28.568Z] 00:55:28     INFO - Entering test bound test_broken_saved_handlerinfo_and_useless_mimetypes
[task 2021-01-14T00:55:28.568Z] 00:55:28     INFO - Waiting for dialog.
[task 2021-01-14T00:55:28.568Z] 00:55:28     INFO - TEST-PASS | uriloader/exthandler/tests/mochitest/browser_extension_correction.js | binary/octet-stream should get an extension - 
[task 2021-01-14T00:55:28.568Z] 00:55:28     INFO - Download changed!
[task 2021-01-14T00:55:28.568Z] 00:55:28     INFO - Download succeeded or errored
[task 2021-01-14T00:55:28.568Z] 00:55:28     INFO - TEST-PASS | uriloader/exthandler/tests/mochitest/browser_extension_correction.js | Downloaded file should also match file_as.exe - 
[task 2021-01-14T00:55:28.568Z] 00:55:28     INFO - Leaving test bound test_broken_saved_handlerinfo_and_useless_mimetypes
[task 2021-01-14T00:55:28.569Z] 00:55:28     INFO - Console message: [JavaScript Error: "OperationError: Could not remove the non-empty directory at C:\Users\task_1610584184\AppData\LocalLow\Mozilla\Temp-{b7d2aeb2-4636-438d-8b1c-8f10c437ee36}\testsavedir701226299.
[task 2021-01-14T00:55:28.569Z] 00:55:28     INFO - Specify the `recursive: true` option to mitigate this error" {file: "chrome://mochitests/content/browser/uriloader/exthandler/tests/mochitest/head.js" line: 266}]
[task 2021-01-14T00:55:28.569Z] 00:55:28     INFO - setDownloadDir/<@chrome://mochitests/content/browser/uriloader/exthandler/tests/mochitest/head.js:266:10
[task 2021-01-14T00:55:28.569Z] 00:55:28     INFO - 
[task 2021-01-14T00:55:28.569Z] 00:55:28     INFO - Buffered messages finished
[task 2021-01-14T00:55:28.569Z] 00:55:28     INFO - TEST-UNEXPECTED-FAIL | uriloader/exthandler/tests/mochitest/browser_extension_correction.js | Cleanup function threw an exception - NotAllowedError: Could not remove the file at C:\Users\task_1610584184\AppData\LocalLow\Mozilla\Temp-{b7d2aeb2-4636-438d-8b1c-8f10c437ee36}\testsavedir701226299\file_as.exe
[task 2021-01-14T00:55:28.569Z] 00:55:28     INFO - GECKO(6600) | MEMORY STAT | vsize 2104310MB | vsizeMaxContiguous 65178952MB | residentFast 355MB | heapAllocated 144MB
[task 2021-01-14T00:55:28.569Z] 00:55:28     INFO - TEST-OK | uriloader/exthandler/tests/mochitest/browser_extension_correction.js | took 2080ms
[task 2021-01-14T00:55:28.569Z] 00:55:28     INFO - checking window state
[task 2021-01-14T00:55:28.569Z] 00:55:28     INFO - TEST-START | uriloader/exthandler/tests/mochitest/browser_first_prompt_not_blocked_without_user_interaction.js
[task 2021-01-14T00:55:29.145Z] 00:55:29     INFO - GECKO(6600) | MEMORY STAT | vsize 2104314MB | vsizeMaxContiguous 65178952MB | residentFast 357MB | heapAllocated 148MB
[task 2021-01-14T00:55:29.145Z] 00:55:29     INFO - TEST-OK | uriloader/exthandler/tests/mochitest/browser_first_prompt_not_blocked_without_user_interaction.js | took 593ms
[task 2021-01-14T00:55:29.155Z] 00:55:29     INFO - checking window state
[task 2021-01-14T00:55:29.165Z] 00:55:29     INFO - TEST-START | uriloader/exthandler/tests/mochitest/browser_open_internal_choice_persistence.js```