I have an app which was working fine up until this week, and I've no idea what has suddenly changed.
Consider the following code. The first "console.log" outputs correctly, but NOT ONE of the others outputs anything at all.
console.log('requesting file system');
try {
requestFileSystem(1, 1024*1024, function(fs) {
console.log('file system received. requesting root directory');
fs.root.getDirectory( options.name, {create:true}, function( directory ) {
console.log('root directory received');
filesystems[options.name] = directory;
console.log('calling callback');
if ( callback ) me.fn( me.name, callback ).call( me, me );
console.log('callback called');
}, function(e) {
console.log('error handler 1');
console.log(e);
});
}, function(e) {
console.log('error handler 2');
console.log(e);
});
}
catch(e) {
console.log('error handler 3');
console.log(e);
}
Any ideas what to look for?
This issue lot of them are facing, stems from a bug in cordova nativetoJSbridge. It has been marked fixed in 3.6.0, but never worked in that version. Couple of versions above the specific version works.
cordova
using npm
and create a new project using CLI
.cordova plugin add
command.window.requestFileSystem
issue.If you are using CLI, even better. create a new project from CLI and copy your old project sources to new project and add the plugins using CLI or update your project using CLI.
As a side note, this bug had been around for a while, where the problem seems to be in
NativeToJsMessageQueue
https://issues.apache.org/jira/browse/CB-6761
Though from the bug it reads to be unresolved, it is fixed in latest version above 3.6.x