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/02/14 08:57:17 UTC

[GitHub] alex-steinberg edited a comment on issue #289: All files reads gave a error code 5; ENCODING_ERR in latest release on Android

alex-steinberg edited a comment on 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#issuecomment-463545943
 
 
   I'm getting the same issue, except using Ionic. It works perfectly on iOS. `cordova-plugin-file-opener2 2.1.4` and using `com.android.support:support-v13:26.+` (not v4 due to a plugin conflict).
   
   Opening the file:
   ```
   this.fileOpener.open('file:///android_asset/www/assets/pdf/mypdf.pdf', 'application/pdf')
           .then(() => console.log('File is opened'))
           .catch(e => console.log('Error opening file', e));
   // Error opening file {status: 9, message: "File not found"}
   ```
   Checking that the file exists:
   ```
   this.file.checkFile(path, filename)
           .then(result => console.log('File exists ', result))
           .catch(e => console.log('Problem checking file ', e));
   // Problem checking file {code: 5, message: "ENCODING_ERR"}
   ```
   Ionic info:
   ```
   Ionic:
   
      ionic (Ionic CLI)  : 4.1.2
      Ionic Framework    : ionic-angular 3.9.2
      @ionic/app-scripts : 3.2.0
   
   Cordova:
   
      cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
      Cordova Platforms     : android 7.1.4, ios 4.5.5
      Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 15 other plugins)
   
   System:
   
      Android SDK Tools : 26.1.1 (/Users/alexandrsteinberg/Library/Android/sdk)
      ios-deploy        : 2.0.0
      NodeJS            : v8.12.0 (/Users/alexandrsteinberg/.nvm/versions/node/v8.12.0/bin/node)
      npm               : 6.4.1
      OS                : macOS
      Xcode             : Xcode 10.1 Build version 10B61
   ```

----------------------------------------------------------------
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