On Windows (no bug on Mac) sometimes see JavaScript error when app starts using log.
kmackey1 opened this issue · 2 comments
Sometimes when my Windows app starts, I will see 5 JavaScript errors with "EBUSY: resource busy or locked, open 'C:\Users\kmackey\product\logs\main.log'"
Using Process Monitor, usually, but not always, I see MsSense.exe (the main service executable for Defender for Endpoint, the service is running as a service with the name SENSE) accessing the file. I tried adding the log file as an exception to Defender, but I still see the errors.
Also in Process Monitor, I see some of my app's operations resulting in sharing violations, though they don't always result in the JavaScript errors. Here are the operations that seem to result in the errors (from different app runs):
Desired Access: Generic Read/Write, Disposition: OverwriteIf, Options: Synchronous IO Non-Alert, Attributes: N, ShareMode: Read, Write, Delete, AllocationSize: 0
Desired Access: Append Data/Add Subdirectory/Create Pipe Instance, Write EA, Read Attributes, Write Attributes, Read Control, Synchronize, Disposition: OpenIf, Options: Synchronous IO Non-Alert, Attributes: N, ShareMode: Read, Write, Delete, AllocationSize: 0
It looks like you have a few different instances of your app running. For such a case, it's better to use a different log file name for each instance.
I should have added that this problem is not happening on the macOS version of the app. Only Windows.