Zerokk opened a new issue #429:
URL: https://github.com/apache/cordova-plugin-file/issues/429


   # Bug Report
   
   ## Problem
   
   I'm having problems with this plugin to read images. My idea is to read an 
image file and convert it to Base64, but I can't read that image no matter what 
I do. These images are stored by the "Crop" plugin in the directory 
`Android\data\com.mycompany.myapp\cache`, and they actually reach there, but 
cannot be read by this plugin.
   
   ### What is expected to happen?
   
   The "File" plugin should correctly read the picture's data, or throw an 
error. 
   
   
   ### What does actually happen?
   
   It instead throws a silent error which stops execution, but doesn't crash 
the app.
   
   
   ## Information
   I explained the problem in further detail [in this StackOverflow 
question](https://stackoverflow.com/questions/64328501/silent-error-when-using-ionic-natives-file-plugin).
   
   
   
   ### Command or Code
   
   `  const base64 = await this.file.readAsDataURL(filePath, imageName);`
   
   Once you reach this line, nothing shows up. The code won't continue 
executing, and it won't throw any exception, even if wrapped inside a 
try-catch. Nonetheless, the plugin *seems* to work, as it correctly finds the 
image it has to read, using this line and returning "true":
   
   `const imageExists = await this.file.checkFile(filePath, imageName)`
   
   
   ### Environment, Platform, Device
   Xiaomi Pocophone F2
   
   
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Capacitor (2.2.0)
   Other Frameworks: Ionic Framework, Ionic Cli 6.11.1
   Operating System: Windows 10
   -->
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to