I have a UWP app that i'm seeing rare logs where FutureAccessList.Entrise is throwing a FileNotFoundException. From the logs i've been able to track down the exception to being thrown at this line:
var accessList = StorageApplicationPermissions.FutureAccessList.Entries
This is the relevant part of the callstack that I'm getting from the logs:
System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x20
at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32, Void*) + 0xbe
at __Interop.ForwardComStubs.Stub_3[TThis, TResult](__ComObject, Int32) + 0x37
at Drawboard.Services.FileSystemService.CleanseFutureAccessList(IList`1) + 0x66
This is only happening to a very small percentage of our userbase, however when it does hit, the application becomes unsuable.
Right now, the only mitigation I have for users is to tell them to reinstall the application, which seems to resolve the issue most of the time.
Looking at the documentation, there is no reason that I could see that would cause this exception to be thrown.
Does anyone have any idea what is going on here? For now, I can at least detect this case, and put a prompt up to the user suggesting they reinstall the app, but obviously this is just a temporary stop gap, and it would be great to be able to solve this problem without needing the user to perform a reinstall.