Reputation: 257
I'm creating a PhoneGap app that works fine when initially installed, but then gives an error when loaded for a second time. The error is "An unknown error has occurred. Error 80020101." The error occurs when attempting to call the nativeReady.
I understand this error is commonly encountered in IE (this only happens in WP8, not in any other mobile OS), and means that there was a syntax error. So I need to know what's causing this. I've tried loading the scripts in markup and dynamically, neither of which has worked.
Console logs for first startup:
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.ni.dll
A first chance exception of type 'System.IO.IsolatedStorage.IsolatedStorageException' occurred in mscorlib.ni.dll
Updating IsolatedStorage for APP:DeviceID :: ea767f9b-c9d2-441d-9d41-9e7f92ddbde0
ScriptNotify :: Installed console!
About to load cordova
Detected Cordova
CordovaBrowser_LoadCompleted
About to load cordova
Detected Cordova
Logs for second startup:
ScriptNotify :: Installed console!
CordovaBrowser_LoadCompleted
About to load cordova
A first chance exception of type 'System.SystemException' occurred in Microsoft.Phone.Interop.ni.dll
Error calling js to fire nativeReady event. Did you include cordova.js in your html script tag?
Any help would be appreciated.
Upvotes: 2
Views: 972
Reputation: 14701
Whenever you start developing with phonegap in new platform or new computer, you should re-install your plugins. I suggest remove your plugins and re-install them.
For example:
Remove plugins
phonegap local plugin remove org.apache.cordova.console
phonegap local plugin remove org.apache.cordova.device
phonegap local plugin remove org.apache.cordova.inappbrowser
Add plugins
phonegap local plugin add org.apache.cordova.device
phonegap local plugin add org.apache.cordova.console
phonegap local plugin add org.apache.cordova.inappbrowser
After that control that, you included necessary cordova javascript files.
<script type="text/javascript" src="../../cordova.js"></script>
<script type="text/javascript" src="../../cordova_plugins.js"></script>
Upvotes: 2