apache / apache/cordova-plugin-file
FileReader.onloadend event of the plugin Cordova-plugin-file is not getting triggered for Android device
- Dominant language
- JavaScript
- Stars
- 744
- Forks
- 754
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 1
Description
# Bug Report
## Problem
FileReader.onloadend event of the plugin **Cordova-plugin-file** is not getting triggered for Android device
### What is expected to happen?
FileReader.onloadend event of the plugin `cordova-plugin-file` should be triggered for Android device
### What does actually happen?
We are using Cordova plugin cordova-plugin-file to read a file in one of the mobile app. But, FileReader.onloadend event of this plugin is not getting triggered for Android. This issue is replicable in Android 10
## Information
We are using Cordova plugin -cordova-plugin-file to read a file in one of the mobile app. But, FileReader.onloadend event of this plugin is not getting triggered for Android. This issue is replicable in Android 10
### Command or Code
const reader = new FileReader();
reader.onloadend = (evt: any) => {
imgBlob = new Blob([evt.target.result], { type: 'image/jpeg' });
resolve(imgBlob);
};
### Environment, Platform, Device
We are experiencing this issue in Android device which is having Android 10
### Version information
cordova-plugin-file version - 6.0.2
cordova-android version - 9.1.0
## Checklist
- [ ] I searched for existing GitHub issues
- [ ] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
Contributor guide
Research direction
Start by reproducing the FileReader.onloadend failure on Android 10 with cordova-plugin-file 6.0.2 and cordova-android 9.1.0, using the JavaScript snippet in the report. Inspect the plugin's Android FileReader path and compare the event behavior with the expected callback; done means onloadend fires and the file result can be converted to the Blob shown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, javascript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100