Open
Bug 2003938
Opened 11 hours ago
test_last_backup_info_and_location rarely can fail with "OperationError: Could not remove `...\testLastBackupInfo-6': the directory is not empty (NS_ERROR_FILE_DIR_NOT_EMPTY)"
Categories
(Firefox :: Profile Backup, defect)
Firefox
Profile Backup
Tracking
()
NEW
People
(Reporter: dmcintosh, Unassigned)
Details
While re-running the tests to catch recent failures in bug 1911904, I got a failure in test_last_backup_info_and_location:
2:13.37 GECKO(28960) console.warn: BackupService: "Collided with a pre-existing archive name, so not clearing: " "FirefoxBackup_mozrunner_20251203-1536.html"
2:13.39 GECKO(28960) JavaScript error: , line 0: OperationError: Could not remove `C:\mozilla-build\msys2\tmp\testLastBackupInfo-6': the directory is not empty (NS_ERROR_FILE_DIR_NOT_EMPTY)
2:13.40 INFO Console message: [JavaScript Error: "OperationError: Could not remove `C:\mozilla-build\msys2\tmp\testLastBackupInfo-6': the directory is not empty (NS_ERROR_FILE_DIR_NOT_EMPTY)"]
2:13.50 FAIL A promise chain failed to handle a rejection: Could not remove `C:\mozilla-build\msys2\tmp\testLastBackupInfo-6': the directory is not empty (NS_ERROR_FILE_DIR_NOT_EMPTY) - stack: createBackupOnIdleDispatch/<@resource:///modules/backup/BackupService.sys.mjs:4458:25
async*createBackupOnIdleDispatch@resource:///modules/backup/BackupService.sys.mjs:4427:17
onIdle@resource:///modules/backup/BackupService.sys.mjs:4362:22
onObserve@resource:///modules/backup/BackupService.sys.mjs:4117:14
@resource:///modules/backup/BackupService.sys.mjs:4026:12
Rejection date: Wed Dec 03 2025 15:36:18 GMT-0500 (Eastern Standard Time) - false == true -
Stack trace:
resource://testing-common/PromiseTestUtils.sys.mjs:assertNoUncaughtRejections:266
chrome://mochikit/content/browser-test.js:handleTask:1311
chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1368
chrome://mochikit/content/browser-test.js:Tester_execTest:1515
chrome://mochikit/content/browser-test.js:nextTest/<:1255
chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1058
promise callback*chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus:1057
chrome://mochikit/content/browser-test.js:Tester_waitForWindowsState:550
chrome://mochikit/content/browser-test.js:nextTest:1148
chrome://mochikit/content/browser-test.js:testScope/test_finish/<:1967
chrome://mochikit/content/browser-test.js:run:1893
2:13.50 INFO Leaving test bound test_last_backup_info_and_location
My rough guess is that this code that tries to delete old backups (?) doesn't delete a backup, which causes that to be left in the directory, so createBackupOnIdleDispatch fails since the directory is non-empty.
I'm mainly filing this bug since I don't plan to work on it, but if it's an easy fix then it might avoid an intermittent later on. (I must've run the tests >30 times before hitting this.) Possible that this is being hit in CI, https://treeherder.mozilla.org/logviewer?job_id=536148144&repo=autoland&lineNumber=2194 looks kind of similar, but I don't think it's exactly the same.
You need to log in
before you can comment on or make changes to this bug.
Description
•