Unable to read event cache file: corrupt

Package: com.unity.services.analytics - 4.4.0

What is happening?

the class DiskCache in DiskCache.cs reads a file called “C:\Users\YOUR_USERNAME_HERE\AppData\LocalLow\COMPANY\PROJECT\eventcache”

If this file is corrupted or unreadable it should be deleted.
But the package opens the file using “k_SystemCalls.OpenFileForReading” and this keeps ownership of the file. So any deleting will fail. keeping the corrupted file present.

How to test
You can test this by having an empty “eventcache” file on the expected location as that is considered a corrupted file.

What it is affecting.
This is affecting all services initialization and thus also breaks other services including Vivox.

I bumped into this “Unable to read event cache file: corrupt” error

I fixed this by deleting a folder that I got on an error shown a bit close to this one. If I remember correct that error was IOException and it showed a folder named from that project
"C:\Users\YOUR_USERNAME_HERE\AppData\LocalLow\COMPANY\PROJECT"

So in my case I removed the whole folder and not just the eventcache and it worked.