You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/01/16 15:51:14 UTC

[GitHub] domingosl opened a new issue #289: All files reads gave a error code 5; ENCODING_ERR in latest release on Android

domingosl opened a new issue #289: All files reads gave a error code 5;  ENCODING_ERR in latest release on Android
URL: https://github.com/apache/cordova-plugin-file/issues/289
 
 
   ### How to replicate the issue
   
   ```
   window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fs) {
       fs.root.getFile(cordova.file.applicationDirectory + "www/index.html", { }, function (fileEntry) {
          //DO NOTHING
       }, function(err) {
         console.log("error accesing the file", err);
       });
   
     }, function error(err) {
       console.log("error requesting the filesystem", err);
     });
   ```
   
   This outputs:
   
   > error accessing the file FileErrorĀ {code: 5}
   
   The file exists, it is a Cordova project, and it also shows by doing:
   
   ```
   function listDir(path){
     window.resolveLocalFileSystemURL(path,
       function (fileSystem) {
         var reader = fileSystem.createReader();
         reader.readEntries(
           function (entries) {
             console.log(entries);
           },
           function (err) {
             console.log(err);
           }
         );
       }, function (err) {
         console.log(err);
       }
     );
   }
   
   listDir(cordova.file.applicationDirectory + "www/index.html");
   ```
   
   This shows that the file is present.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org