PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

MWB - Failed to read settings: The process cannot access the file 'FILE.json' because it is being used by another process errors in Event Viewer

Open LuckyPadddy opened this issue 1 year ago • 6 comments

Microsoft PowerToys version

0.82.0

Installation method

PowerToys auto-update

Running as admin

Yes

Area(s) with issue?

Mouse Without Borders

Steps to reproduce

For MWB, I am seeing an average of 150 Errors a day in the event event viewer.

The errors are always the same:

Failed to read settings: The process cannot access the file 'C:\Users\USER\AppData\Local\Microsoft\PowerToys\MouseWithoutBorders\settings.json' because it is being used by another process.

Note: I do see 2 process named Powertoys.MouseWithoutBNorders running simultaneously in Task Manager.

As far as I know, It's not affecting the usability of Mouse Without Borders. But I've been getting some system crashes from time to time. Not sure if it's related. That's why I went into my event viewer to look for a anything. The amount of MWB Errors stood out.

✔️ Expected Behavior

Not having 150 errors a day in event viewer

❌ Actual Behavior

Having 2500 Errors in 17 days since I installed PowerToys

Other Software

No response

LuckyPadddy avatar Jul 12 '24 14:07 LuckyPadddy

/bugreport

htcfreek avatar Jul 12 '24 16:07 htcfreek

Still present in version 0.83

LuckyPadddy avatar Aug 09 '24 23:08 LuckyPadddy

This error occurs seemingly at the same time as switching between machines, and will block input to both machines.

I have a near endless supply of this occurring several times per day on Windows 10, and Windows 11.

Failed to read settings: The process cannot access the file 'C:\Users\USER\AppData\Local\Microsoft\PowerToys\MouseWithoutBorders\settings.json' because it is being used by another process.

Every 30 minutes on average.

JIHarrison avatar Aug 19 '24 20:08 JIHarrison

I've just notice this on both of my systems. One is Win10, the other Win11. Still failing in v0.87.1. Two or three of these events per SECOND, so it's really difficult to find anything else there.

bitsmithsys avatar Jan 15 '25 22:01 bitsmithsys

I see this error in my event log almost every time I copy text to the clipboard. The copy works, but the error is there.

deanis74 avatar Mar 11 '25 16:03 deanis74

I have the same. Things I've noticed or tried:

  • Update: Error occurs on both machines, but much more frequently on Controlled machine, (which keeps mouse/keyboard from working on Controlled machine)
  • Typically happens after coming out of sleep mode
  • MWB-refreshing can help, but not always. Sometimes helps to refresh on Controlled machine. Sometimes both machines.
  • Controlled machine does have work VPN active
  • Controller machine does not have VPN active
  • Also have 2 PowerToys.MouseWithouBorders processes always running. They seem identical in Process properties, but have different PID's
  • One of the processes has 3 threads "waiting on network IO" in it's wait chain. The other is "running normally"
  • Not using MWBService (although this doesn't seem to change whether the error occurs or not)
  • MouseWithoutBordersHelper .exe and .dll have had extensions changed to keep the Helper from running. (I don't need clipboard copy/paste to be available)

Happy to provide additional details if needed.

jwhill67 avatar Mar 15 '25 16:03 jwhill67

I have this same issue. I noticed this issue after fighting with getting the mouse to show up in certain settings screens, and when UAC would pop up. It seems to be that another process is using the settings folder and causing the MWB service not to run. Why the service will not take precedent, I am not sure. I have played with it over and over again, and have briefly made it work from time to time, and when the service finally does stay running, I can finally see the mouse cursor over top of the UAC screen and actually use it. I wish I could find the fix for this.

319cheeto avatar Jun 26 '25 04:06 319cheeto

This issue is still a thing. My event viewer still gets flooded with MWB errors about this.

Image

LuckyPadddy avatar Aug 13 '25 23:08 LuckyPadddy

Yup, can also confirm on my side. The connection frequently drops (or the process crashes), taking seconds to recover. It happens 100% of the time with a UAC prompt, and randomly (every 3-4 mins?) when using the computer normally. I also have a VPN if that matters.

Arno500 avatar Nov 24 '25 14:11 Arno500