Reputation: 14142
I am having issues getting a legacy mobile app to run in an emulator - it all seems to run in the browser without any issues but when I run the cordova emulate command the app attempts to install but I always get a white screen (nothing else) & the app isn't visible to use.
I am running Cordova CLI v5.0.0 although the app was made about a year ago so was developed in an older version of Cordova.
Can anyone suggest the best ways to debug this app to find the cause of the problem & why the problem only persists when I run the emulate command but seems fine in the browser?
-- update -- I have installed the Samsung drivers to allow me to connect my OnePlusOne device to adb, and I am know using the Android Studio program to collate errors etc..
In Android studio I can see the logs (see gist below):
https://gist.github.com/gkimpson/fbde0f5a7d1017daae17
Its quite long so added it externally - any ideas why I am having problems with my app?
-- update -- This line seems to be the problem
D/SystemWebChromeClient﹕ file:///android_asset/www/js/app/modules/stickers/stickers.js: Line 357 : Uncaught TypeError: window.requestFileSystem is not a function
The code in stickers.js is below for that section..
if (window.isDevice) {
window.requestFileSystem(window.PERSISTENT, 512, onInitFs, errorHandler);
} else {
callback(fc);
}
Upvotes: 1
Views: 3139
Reputation: 11721
Ok here is what I had to do when I migrated from cordova 3.6 to cordova 5.
But first, I suggest you a little reading :
Cordova Android 4 release notes
The white list plugin documentation And in addition the CSP documentation
To sum-up, the security has changed in cordova, if you don't add the white list plugin your app will have no network access, and the plugins are now installed via npm instead of via git.
So what I did (a little bit hardcore maybe):
and you can run cordova plugin save
and cordova platform save
to have all your plugins and platforms saved in config.xml
Upvotes: 2