Frame.GoBack() occasionally throws "Exception: Unspecified error (Exception from HRESULT: 0x80004005)"

Hong 1,051 Reputation points
2021-05-29T22:49:34.423+00:00
if (Frame.CanGoBack)
{
   Frame.GoBack();
}

The above code works fine usually, but Frame.GoBack() occasionally throws the following:

System.Exception: Unspecified error (Exception from HRESULT: 0x80004005)
Stack Trace:
at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21
at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32) + 0xb8
at __Interop.ForwardComStubs.Stub_11TThis + 0x24

Could anyone shed some light on the possible causes?

Universal Windows Platform (UWP)
{count} votes