Google is preparing a fix for a long-standing Chromium bug, and it actually started with Microsoft.

The issue has frustrated browser users for a long time. Every so often, someone would open Chrome or another Chromium-based browser and be greeted by what looked like a fresh installation. Bookmarks and passwords were still there, but browser preferences and other profile data appeared to be gone because an important file had disappeared.

We’ve added a couple of screenshots of such reports below for reference:

chrome-profile-reset-data-gone-report
Report on Reddit
chrome-profile-reset-data-deleted
Report on Google Support Forums

The culprit is a file called Local State, which stores browser-wide settings.

Whenever Chromium updates that file, Windows uses a function called ReplaceFile to swap the old version with the new one. Under normal conditions, the process finishes almost instantly. Problems begin when another application, such as antivirus software or a file indexing tool, locks the folder at exactly the wrong moment.

If that happens, Windows returns an error known as ERROR_UNABLE_TO_MOVE_REPLACEMENT_2. At that point, the old file has already been moved aside, but the new one can’t be written. The browser is left without a valid Local State file, which makes it look like the user profile has been reset.

Microsoft was the first to uncover how often this was happening.

In a Chromium bug report filed earlier this year, Microsoft Edge engineer Ting Shao said Edge telemetry showed the sequence affecting around 100,000 users on the stable channel. Since Edge and Chrome are both built on Chromium, engineers from Microsoft and Google began working together to reduce the failures.

microsoft-engineer-on-local-state-issue-chromium-tracker

The first improvement arrived in March. Developers added a backup file to the replacement process so the original file wouldn’t be lost as easily if something interrupted the update.

That change helped significantly, but it didn’t eliminate the problem. Microsoft said telemetry still showed a small number of failures, with roughly 0.016% of Edge users continuing to hit the issue.

microsoft-edge-local-state-bug-reset-data

Now, Chromium developers have prepared another layer of protection.

A new patch from Chromium developer Greg Thompson that we spotted changes what happens when Windows refuses to complete the file replacement. Instead of giving up immediately, the browser will repeatedly retry the operation, giving any antivirus scan or background process time to release the directory.

If those retries still don’t work, Chromium will make another attempt to restore the original file, reducing the chances of the Local State file disappearing altogether.

chrome-gerrit-replacefile-discussion

The change doesn’t solve the underlying Windows file-locking behavior, but it should make Chromium much more resilient when it runs into it.

The patch has already received initial code review approvals and is expected to arrive in Chromium Canary builds first before eventually making its way to Chrome, Edge, and other Chromium-based browsers. Until then, users won’t benefit from the additional protection until those browser updates begin rolling out.

We stand out from the tech-media crowd because we break news stories; we mainly bring you stuff that you won’t find anywhere in the mainstream tech media. Our stories have been picked up by some of the world’s most popular websites and media outlets—more info is available here.

Dwayne Cubbins
2764 Posts

I cover fast-moving stories across apps, online platforms, and everyday tech — phones, wearables, consoles, and whatever else people are fighting with this week. Bugs, rollouts, scams, policy enforcement, and the occasional internet-culture rabbit hole are all fair game. My goal is simple — make confusing tech news readable. When I'm not working, I'm working out or chilling with my dog. Got a tip? You can find me on X @dcubbins.