apache / apache/cordova-plugin-file
Encoding error (code 5) - FileReader.readAsText on iOS 12.1.4
- Dominant language
- JavaScript
- Stars
- 744
- Forks
- 754
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 1
Description
# Bug Report
Since iOS 12.1.4 we are having troubles to read files with FileReader.readAsText().
## Problem
readAsText returns null and an error with code 5 (encoding err?) will be thrown. No problems on android or former iOS version.
### What is expected to happen?
readAsText() normally ends with onloadend delivering the content of a file as a string.
### What does actually happen?
onloadend delivers null and onerror will be called aswell with the encoding err (code 5).
## Information
Same code - no problems at all
### Command or Code
### Environment, Platform, Device
### Version information
## Checklist
- [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
Contributor guide
Research direction
Start by reproducing FileReader.readAsText on iOS 12.1.4 and observe the onloadend and onerror callbacks. Compare the result with Android and earlier iOS versions; done means the file content is delivered as a string without the code 5 encoding error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, javascript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100