Gabrielr2508 opened a new issue #375: Uknown error on read a file URL: https://github.com/apache/cordova-plugin-file/issues/375 # Bug Report ## Problem I'm trying to update the plugin from version 1.3.3 to version 6.0.2. The write works as expected but the read don't works. I'm receiving "Invalid action" message in the error code. ### What is expected to happen? The method readAsText works as expected. ### What does actually happen? An uknown error is returned. ## Information <!-- Include all relevant information that might help understand and reproduce the problem --> Here is the code ```javascript window.resolveLocalFileSystemURL(Dengues.getPath(true), function(entry) { console.log(entry) entry.file(function(dbFile) { console.log(dbFile) var reader = new FileReader(); console.log(reader) reader.onloadend = function(evt) { var strjson = evt.target.result; console.log(evt) }; reader.readAsText(dbFile); }); }); ``` The file ```json FileEntry {isFile: true, isDirectory: false, name: "Dengues_2020-01-26_16-08-45.db", fullPath: "/Dengues_2020-01-26_16-08-45.db", filesystem: FileSystem, …} filesystem: FileSystem {name: "files-external", root: DirectoryEntry} fullPath: "/Dengues_2020-01-26_16-08-45.db" isDirectory: false isFile: true name: "Dengues_2020-01-26_16-08-45.db" nativeURL: "file:///storage/emulated/0/Android/data/com.sysvale.esus_ace/files/Dengues_2020-01-26_16-08-45.db" ``` The error ```json FileReader {_readyState: 0, _error: null, _result: null, _progress: null, _localURL: "", …} _error: FileErrorcode: "Invalid action" __proto__: Object _localURL: "cdvfile://localhost/files-external/Dengues_2020-01-26_16-08-45.db" _progress: 0 _readyState: 2 _realReader: FileReader {readyState: 0, result: null, error: null, onloadstart: null, onprogress: null, …} _result: null error: (...) onabort: (...) onerror: (...) onload: (...) onloadend: (...) onloadstart: (...) onprogress: (...) readyState: (...) result: (...) __proto__: Object ``` ### Command or Code <!-- What command or code is needed to reproduce the problem? --> ### Environment, Platform, Device <!-- In what environment, on what platform or on which device are you experiencing the issue? --> Platform: [email protected] Device: Emulator and Samsung Tablet T280 ### Version information <!-- What are relevant versions you are using? For example: Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins Other Frameworks: Ionic Framework and CLI version Operating System, Android Studio, Xcode etc. --> Cordova: 9.0.0 "cordova-android-support-gradle-release": "^3.0.1", "cordova-plugin-camera": "^4.1.0", "cordova-plugin-device": "^2.0.3", "cordova-plugin-dialogs": "^2.0.2", "cordova-plugin-file": "^6.0.2", "cordova-plugin-geolocation": "^4.0.2", "cordova-plugin-keyboard": "^1.2.0", "cordova.plugins.diagnostic": "^5.0.1", ## 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] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
