actual: [Bug]: Random crash on Win11

Verified issue does not already exist?

  • I have searched and found no existing issue
  • I will be providing steps how to reproduce the bug (in most cases this will also mean uploading a demo budget file)

What happened?

App crashes randomly, console logs show a file read error:

VM89:2 Server Log: [Exception] [Error: EBUSY: resource busy or locked, open 'C:\Users\pcuciureanu\Documents\Actual\My-Finances-15bd76d\metadata.json'] {
  errno: -4082,
  code: 'EBUSY',
  syscall: 'open',
  path: 'C:\\Users\\pcuciureanu\\Documents\\Actual\\My-Finances-15bd76d\\metadata.json'
}

I’ve detailed the symptoms in Discord: https://discordapp.com/channels/937901803608096828/1171096337111064626/1282059693145198772

Cannot reproduce the issue reliably, the crash/hang happens mostly when on the Budget page or the Reports page (but this could only be a coincidence)

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Desktop App (Electron)

Operating System

Windows 11

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (8 by maintainers)

Most upvoted comments

Can’t find an associated issue, do you have a link I could monitor?

I don’t think there is one but there’s been work happening towards that end within the last few days - the PR’s named “(synced-prefs)”. I’ll update this issue when It’s done - hopefully by next release.

For further reading - it looks like we’re not the only ones affected by this issue - there’s some other suggestions too: https://techcommunity.microsoft.com/t5/microsoft-defender-for-endpoint/is-there-any-way-avoiding-files-locking-by-defender-for-endpoint/m-p/3937819

Uninstalled both, just to make sure nothing else is running, then installed only the latest fix you shared.

image

Same problems.

Perhaps for you to reproduce, I’m noticing that if I switch between months quickly (I have 3 or 4 at a time in the Budget view), it crashes quite reliably.

image

But you gotta be fast, clicking wildly 😃

Server Log: Loaded spreadsheet from cache (29658 items)

2 Server Log: ab [Error]: PostError: file-not-found
    at uA (C:\Users\pcuciureanu\AppData\Local\Programs\desktop-electron\resources\app.asar\node_modules\loot-core\lib-dist\bundle.desktop.js:115:5390)
    at uD (C:\Users\pcuciureanu\AppData\Local\Programs\desktop-electron\resources\app.asar\node_modules\loot-core\lib-dist\bundle.desktop.js:115:6263)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async lJ (C:\Users\pcuciureanu\AppData\Local\Programs\desktop-electron\resources\app.asar\node_modules\loot-core\lib-dist\bundle.desktop.js:135:2852)
    at async C:\Users\pcuciureanu\AppData\Local\Programs\desktop-electron\resources\app.asar\node_modules\loot-core\lib-dist\bundle.desktop.js:135:1592 {
  meta: undefined,
  reason: 'file-not-found',
  type: 'PostError'
}
ab [Error]: PostError: file-not-found
    at uA (C:\Users\pcuciureanu\AppData\Local\Programs\desktop-electron\resources\app.asar\node_modules\loot-core\lib-dist\bundle.desktop.js:115:5390)
    at uD (C:\Users\pcuciureanu\AppData\Local\Programs\desktop-electron\resources\app.asar\node_modules\loot-core\lib-dist\bundle.desktop.js:115:6263)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async lJ (C:\Users\pcuciureanu\AppData\Local\Programs\desktop-electron\resources\app.asar\node_modules\loot-core\lib-dist\bundle.desktop.js:135:2852)
    at async C:\Users\pcuciureanu\AppData\Local\Programs\desktop-electron\resources\app.asar\node_modules\loot-core\lib-dist\bundle.desktop.js:135:1592 {
  meta: undefined,
  reason: 'file-not-found',
  type: 'PostError'
}

2 Server Log: ab [Error]: PostError: file-not-found
    at uA (C:\Users\pcuciureanu\AppData\Local\Programs\desktop-electron\resources\app.asar\node_modules\loot-core\lib-dist\bundle.desktop.js:115:5390)
    at uD (C:\Users\pcuciureanu\AppData\Local\Programs\desktop-electron\resources\app.asar\node_modules\loot-core\lib-dist\bundle.desktop.js:115:6263)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async lJ (C:\Users\pcuciureanu\AppData\Local\Programs\desktop-electron\resources\app.asar\node_modules\loot-core\lib-dist\bundle.desktop.js:135:2852)
    at async C:\Users\pcuciureanu\AppData\Local\Programs\desktop-electron\resources\app.asar\node_modules\loot-core\lib-dist\bundle.desktop.js:135:1592 {
  meta: undefined,
  reason: 'file-not-found',
  type: 'PostError'
}

 Server Log: Loading fresh spreadsheet

 Server Log: Loaded spreadsheet from cache (29598 items)

VM21:2 Server Log: [Exception] [Error: EBUSY: resource busy or locked, open 'C:\Users\pcuciureanu\apps\Actual\My-Finances-15bd76d\metadata.json'] {
  errno: -4082,
  code: 'EBUSY',
  syscall: 'open',
  path: 'C:\\Users\\pcuciureanu\\apps\\Actual\\My-Finances-15bd76d\\metadata.json'
}

(anonymous) @ VM21:2

Cool, thanks for reporting. I’ll see if I can replicate this and get back to you.

Ok, it’s back—this invalidates the OneDrive hypothesis 😦

 Server Log: [Exception] [Error: EBUSY: resource busy or locked, open 'C:\Users\pcuciureanu\apps\Actual\My-Finances-15bd76d\metadata.json'] {
  errno: -4082,
  code: 'EBUSY',
  syscall: 'open',
  path: 'C:\\Users\\pcuciureanu\\apps\\Actual\\My-Finances-15bd76d\\metadata.json'
}

(anonymous) @ unknown
 Server Log: node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: EBUSY: resource busy or locked, open 'C:\Users\pcuciureanu\apps\Actual\My-Finances-15bd76d\metadata.json'] {
  errno: -4082,
  code: 'EBUSY',
  syscall: 'open',
  path: 'C:\\Users\\pcuciureanu\\apps\\Actual\\My-Finances-15bd76d\\metadata.json'
}

Node.js v20.11.1

image

Nothing I do can bring the app back, only a restart works.

And on reboot, same old story:

image

image

image