Crash due to System.UnauthorizedAccessException but the CAP is enabled!! RRS feed

  • Question

  • I have this weird crash happing at random times for users. I have not been able to reproduce it myself however.

    I use Unity 4.5 that builds the Project and in it I use PubCenter, Admob, Adduplex and Flurry analytics.

    The crash log says it's because the  ID_CAP_WEBBROWSERCOMPONENT is not Active but as you see below it actually is.

    Here is the crash report:

    System.UnauthorizedAccessException: Access to WebBrowser requires ID_CAP_WEBBROWSERCOMPONENT to be defined in the manifest. ---> System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.
       at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
       at MS.Internal.XcpImports.TileHostV2_SetNativeContentProvider(TileHostV2 tileHostV2, String dllName, String activateFnName, String className)
       at MS.Internal.TileHostV2.BindToAgWebBrowserControl()
       at Microsoft.Phone.Controls.WebBrowserInterop..ctor(Control webBrowser, WebBrowserInteropCallbacks callbacks)
       --- End of inner exception stack trace ---
       at Microsoft.Phone.Controls.WebBrowserInterop..ctor(Control webBrowser, WebBrowserInteropCallbacks callbacks)
       at Microsoft.Phone.Controls.WebBrowserCompatibility.GetLifetimeManager(Boolean shouldUseQuirkMax7_0, Control webBrowser, WebBrowserInteropCallbacks callbacks, GetCachedWebBrowserPropertiesCallback propertiesCallback)
       at Microsoft.Phone.Controls.WebBrowser..ctor()<br/>Cannot create instance of type 'Microsoft.Phone.Controls.WebBrowser' [Line: 1 Position: 536]<br/>   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       at A.c778af7b26605e0bb7fadf1547d7f5530.c0abff9d923d0bf6c1429724f2fda9b52()
       at A.c778af7b26605e0bb7fadf1547d7f5530..ctor()
       at A.c1990939c9f0994f38d19ba1ba3c6f29f.c6378947b8e1ece80a1ebda75f538b77e.c5981871cc72256a07087565d53815fa9()
       at A.cb13734590548fbc05daf69d86b29c6a0.c0f441c3c50c96d82cf26d030849ea12d.c92ab5cdad972eb7266e92194d3610e23(Object cdd8c35e97430f4f64b10805327750323)

    And this is the WMAppManifest.xml settings:
          <Capability Name="ID_CAP_IDENTITY_DEVICE" />
          <Capability Name="ID_CAP_MEDIALIB_AUDIO" />
          <Capability Name="ID_CAP_MEDIALIB_PLAYBACK" />
          <Capability Name="ID_CAP_NETWORKING" />
          <Capability Name="ID_CAP_SENSORS" />
          <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
          <Capability Name="ID_CAP_PHONEDIALER" />
          <Capability Name="ID_CAP_IDENTITY_USER" />
          <Capability Name="ID_CAP_MEDIALIB_PHOTO" />
          <Capability Name="ID_CAP_LOCATION" />


    Monday, May 12, 2014 9:13 PM

All replies

  • Has anyone seen a similar issue?

    I've even tried to create a new Project but the issue still remains!


    Monday, May 12, 2014 9:14 PM
  • I'm having the same problem. I have the ID_CAP_WEBBROWSERCOMPONENT capability enabled but I'm getting bug reports with the same UnauthorizedAccessException. I'm also using PubCenter, Admob and Adduplex. I don't know if it matters but my project is WP 8.0 and the error reports that I've seen so far are from 8.1 devices. I also haven't been able to reproduce the exception myself. Very frustrating.
    Sunday, December 21, 2014 9:25 PM