tl;dr; this is not something that should affect most users of Chrome, but may be worth fixing. This bug is at first glance not specific to Yandex, but broadly may also happen with other vendors such as AntiVirus programs.
Yandex runs 2 processes, BrowserManager.exe and BrowserManagerShow.exe, abbreviated to BM and BMS respectively. For the issue to repro:
* Chrome needs to be uninstalled and in the uninstall box, the user needs to explicitly check "Delete all User Data"
* Then Chrome needs to be reinstalled without a reboot or logoff or closing BM in between* (*closing BM and waiting 5 minutes causes the BM process to release handles and Chrome can be reinstalled)
The reason this happens: BM and BMS open handles to the "%LocalAppData%\Google\Chrome\User Data\Default" directory with Share R/W/D. If Chrome is then uninstalled and the user tells it to delete all User Data, these files are only marked for deletion, not actually deleted since there is an open handle held by BM/BMS.
Subsequently, if Chrome is re-installed, it tries to create the "%LocalAppData%\Google\Chrome\User Data\Default" directory and CreateFile gives back an error to the effect of "oops, Delete Pending". So Chrome throws up a "cannot create User Data directory" error dialog.
* Perhaps have Chrome create a different directory if "Default" is held. This has the pro of not encountering this issue not just with Yandex, but also with AntiVirus vendors that are known to hold handles. The con may be that (say) "Default1" is now a non-standard location.
* Chrome could rename and then delete the directory during Uninstall. Not sure if this will work but worth a try.
* Specifically handle the "Delete Pending" file error code and ask the user to logoff or restart the machine. Not user friendly, but if this is a rare edge-case, may be worth doing it this way.