What does "No applicable app licenses found" mean for Windows.Devices.Enumeration.DeviceInformation.FindAllAsync(DeviceClass)?

Hong 1,246 Reputation points
2021-02-18T03:57:59.753+00:00

Both of the following throws the exception "No applicable app licenses found" on a computer:

await DeviceInformation.FindAllAsync(DeviceClass.VideoCapture);

await DeviceInformation.FindAllAsync(DeviceClass.AudioCapture);

Stack trace:
at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21
at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32, Int32, Void*) + 0xc2
at __Interop.ForwardComStubs.Stub_129TThis, TResult + 0x45
at Windows.Devices.Enumeration.DeviceInformation.FindAllAsync(DeviceClass) + 0x32

I cannot reproduce it. It is reported by analytics. Could anyone shed some light on what "No applicable app licenses found" means in this context?

[Edit]
I have just found that the following statements throw the same exception too:

await StorageLibrary.GetLibraryAsync(KnownLibraryId.Pictures);

StoreContext.GetDefault();
Developer technologies | Universal Windows Platform (UWP)
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.