Wednesday, 23 September 2015

Cordova WP8 System.SystemException Microsoft.Phone.Interop.ni.dll

I just lost hours diagnosing the following error:

CordovaBrowser_LoadCompleted Apache Cordova native platform version 3.8.1 is starting Exception thrown: 'System.SystemException' in Microsoft.Phone.Interop.ni.dll

I replaced 'execScript' with 'eval' where Browser.InvokeScript was called, as suggested here. This didn't make things better. I also replaced the XHRHelper code with code written by Marius Seimanovs, as suggested here. No joy. I removed all my plugins. Still no dice.

So I setup a new blank WP8 cordova project and worked backwards, trying to break it by introducing my own pre-existing code that was already working in iOS, Android and locally on a Win machine.

I discovered that I had a poorly formatted Content-Security-Policy meta tag. That's all it was! I'd missed off the closing quote from the content attribute, and this brought it all crashing down.

The missing quote!

No comments:

Post a Comment

Comments are moderated, so you'll have to wait a little bit before they appear!